Skip to content
OpenAdvisories
Medium · 5.3 CVE-2018-19789 EUVD-2022-5696GHSA-x3cf-w64x-4cp2

Symfony Path Disclosure

Published Dec 18, 2018 · Updated Aug 5, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS symfony No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS symfony No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
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

References