Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | symfony | 3.4.20+dfsg-1 | — |
| Debian 13 | symfony | 3.4.20+dfsg-1 | — |
| Debian 12 | symfony | 3.4.20+dfsg-1 | — |
| Debian 9 | symfony | 2.8.7+dfsg-1.3+deb9u2 | DSA-4441-1 |
| Debian 8 | symfony | 2.3.21+dfsg-4+deb8u4 | DLA-1707-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | symfony | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | symfony | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | symfony/form | >= 2.7.0, < 2.7.50 | 2.7.50 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/form | >= 2.8.0, < 2.8.49 | 2.8.49 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/form | >= 3.0.0, < 3.4.20 | 3.4.20 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/form | >= 4.0.0, < 4.0.15 | 4.0.15 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/form | >= 4.1.0, < 4.1.9 | 4.1.9 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/form | >= 4.2.0, < 4.2.1 | 4.2.1 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/symfony | >= 2.7.0, < 2.7.50 | 2.7.50 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/symfony | >= 2.8.0, < 2.8.49 | 2.8.49 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/symfony | >= 3.0.0, < 3.4.20 | 3.4.20 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/symfony | >= 4.0.0, < 4.0.15 | 4.0.15 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/symfony | >= 4.1.0, < 4.1.9 | 4.1.9 | GHSA-x3cf-w64x-4cp2 |
| Packagist | symfony/symfony | >= 4.2.0, < 4.2.1 | 4.2.1 | GHSA-x3cf-w64x-4cp2 |
Advisories 2
- DSA-4441-1 symfony - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1707-1 symfony - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- FEDORA-2018-8c06b6defd vendor-advisory
- FEDORA-2018-66547a8c14 vendor-advisory
- 106249 vdb-entry
- https://symfony.com/blog/cve-2018-19789-disclosure-of-uploaded-files-full-path
- [debian-lts-announce] 20190310 [SECURITY] [DLA 1707-1] symfony security update mailing-list
- FEDORA-2018-6edf04d9d6 vendor-advisory
- DSA-4441 vendor-advisory
- 20190510 [SECURITY] [DSA 4441-1] symfony security update mailing-list