Summary
Symfony Path Disclosure
An issue was discovered in Symfony 2.7.x before 2.7.50, 2.8.x before 2.8.49, 3.x before 3.4.20, 4.0.x before 4.0.15, 4.1.x before 4.1.9, and 4.2.x before 4.2.1. When using the scalar type hint string in a setter method (e.g. setName(string $name)) of a class that's the data_class of a form, and when a file upload is submitted to the corresponding field instead of a normal text input, then UploadedFile::__toString() is called which will then return and disclose the path of the uploaded file. If combined with a local file inclusion issue in certain circumstances this could escalate it to a Remote Code Execution.
Impact
The application accepts file uploads without adequately restricting the file type or content. Typical impact: remote code execution if the uploaded file can be served and executed on the server.
CVE-2018-19789 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9, 4.2.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
symfony/symfony to 2.7.50 or later; symfony/symfony to 2.8.49 or later; symfony/symfony to 3.4.20 or later; symfony/symfony to 4.0.15 or later; symfony/symfony to 4.1.9 or later; symfony/symfony to 4.2.1 or later; symfony/form to 2.7.50 or later; symfony/form to 2.8.49 or later; symfony/form to 3.4.20 or later; symfony/form to 4.0.15 or later; symfony/form to 4.1.9 or later; symfony/form to 4.2.1 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2018-19789? CVE-2018-19789 is a medium-severity unrestricted upload of dangerous file types vulnerability in symfony/symfony (composer), affecting versions >= 2.7.0, < 2.7.50. It is fixed in 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9, 4.2.1. The application accepts file uploads without adequately restricting the file type or content.
- How severe is CVE-2018-19789? CVE-2018-19789 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2018-19789?
symfony/symfony(composer) (versions >= 2.7.0, < 2.7.50)symfony/form(composer) (versions >= 2.7.0, < 2.7.50)
- Is there a fix for CVE-2018-19789? Yes. CVE-2018-19789 is fixed in 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9, 4.2.1. Upgrade to this version or later.
- Is CVE-2018-19789 exploitable, and should I be worried? Whether CVE-2018-19789 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2018-19789 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2018-19789?
- Upgrade
symfony/symfonyto 2.7.50 or later - Upgrade
symfony/symfonyto 2.8.49 or later - Upgrade
symfony/symfonyto 3.4.20 or later - Upgrade
symfony/symfonyto 4.0.15 or later - Upgrade
symfony/symfonyto 4.1.9 or later - Upgrade
symfony/symfonyto 4.2.1 or later - Upgrade
symfony/formto 2.7.50 or later - Upgrade
symfony/formto 2.8.49 or later - Upgrade
symfony/formto 3.4.20 or later - Upgrade
symfony/formto 4.0.15 or later - Upgrade
symfony/formto 4.1.9 or later - Upgrade
symfony/formto 4.2.1 or later
- Upgrade