{"id":"CVE-2018-19789","published":"2018-12-18T22:00:00Z","modified":"2024-08-05T11:44:20Z","title":"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…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.03589,"percentile":0.897,"provenance":"source"},"cwes":[],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OA4WVFN5FYPIXAPLWZI6N425JHHDSWAZ/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4TD3E7FZIXLVFG3SMFJPDEKPZ26TJOW7/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"http://www.securityfocus.com/bid/106249","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://symfony.com/blog/cve-2018-19789-disclosure-of-uploaded-files-full-path","tags":["x_refsource_CONFIRM"]},{"url":"https://lists.debian.org/debian-lts-announce/2019/03/msg00009.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JZMRJ7VTHCY5AZK24G4QGX36RLUDTDKE/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://www.debian.org/security/2019/dsa-4441","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://seclists.org/bugtraq/2019/May/21","tags":["mailing-list","x_refsource_BUGTRAQ"]}],"priority":{"score":17.9,"factors":[{"name":"EPSS percentile","points":17.94}]},"affected":[{"ecosystem":"Packagist","package":"symfony/symfony","vulnerableRanges":[">=2.7.0, <2.7.50",">=2.8.0, <2.8.49",">=3.0.0, <3.4.20",">=4.0.0, <4.0.15",">=4.1.0, <4.1.9",">=4.2.0, <4.2.1"],"patched":["2.7.50","2.8.49","3.4.20","4.0.15","4.1.9","4.2.1"],"from":["GHSA-x3cf-w64x-4cp2"],"provenance":"source"},{"ecosystem":"Packagist","package":"symfony/form","vulnerableRanges":[">=2.7.0, <2.7.50",">=2.8.0, <2.8.49",">=3.0.0, <3.4.20",">=4.0.0, <4.0.15",">=4.1.0, <4.1.9",">=4.2.0, <4.2.1"],"patched":["2.7.50","2.8.49","3.4.20","4.0.15","4.1.9","4.2.1"],"from":["GHSA-x3cf-w64x-4cp2"],"provenance":"source"}],"summary":{"text":"The flaw is in Symfony's form handling: when a setter in a form's data_class takes a scalar string type hint (such as setName(string $name)), submitting a file upload to that field causes UploadedFile::__toString() to be invoked, which discloses the uploaded file's path. An attacker who can submit a form to such a field, with a file upload in place of a text input, can obtain that path, and where it is combined with a local file inclusion weakness in certain circumstances this could escalate to remote code execution.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:26:25Z"},"euvd":{"id":"EUVD-2022-5696","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2017-16790","published":"2018-08-06","fixed":"3.3.13","kev":false,"link":{"from":"CVE-2017-16790","to":"CVE-2018-19789","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:symfony/form","fromFixed":"2.7.38","toFixed":"2.7.50","daysApart":134},{"kind":"version-step","provenance":"source","package":"Packagist:symfony/form","fromFixed":"3.3.13","toFixed":"3.4.20","daysApart":134}]}},{"cve":"CVE-2018-14773","published":"2018-08-03","fixed":"4.1.3","kev":false,"link":{"from":"CVE-2018-14773","to":"CVE-2018-19789","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"2.7.49","toFixed":"2.7.50","daysApart":137},{"kind":"version-step","provenance":"source","package":"Packagist:symfony/symfony","fromFixed":"4.0.14","toFixed":"4.0.15","daysApart":137}]}},{"cve":"CVE-2018-14774","published":"2018-08-03","fixed":"4.1.3","kev":false},{"cve":"CVE-2018-19790","published":"2018-12-18","fixed":"4.1.9","kev":false},{"cve":"CVE-2018-19789","published":"2018-12-18","fixed":"4.2.1","kev":false},{"cve":"CVE-2019-10909","published":"2019-05-16","fixed":"4.2.7","kev":false},{"cve":"CVE-2019-10910","published":"2019-05-16","fixed":"4.2.7","kev":false},{"cve":"CVE-2019-10911","published":"2019-05-16","fixed":"4.2.7","kev":false}],"package":"Packagist:symfony/symfony"}}