Improper input validation in Symfony - CVE-2018-19789

 

Improper input validation in Symfony - CVE-2018-19789

Published: December 19, 2018 / Updated: December 19, 2018


Vulnerability identifier: #VU16614
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2018-19789
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to an error 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 A remote unauthenticated attacker can submit a file upload to the corresponding field instead of a normal text input, call `UploadedFile::__toString()` which will then return and disclose the path of the uploaded file. If combined with a local file inclusion issue in certain circumstances a remote attacker can execute arbitrary code with elevated privileges.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.



Affected software

Symfony
Debian Linux
Fedora
symfony (Debian package)
php-symfony
php-symfony3
php-symfony4

How to mitigate CVE-2018-19789

The vulnerability has been fixed in the versions 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9 and 4.2.1.

Symfony - addressed in versions 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9, 4.2.01
symfony (Debian package) - addressed in versions 2.3.21+dfsg-4+deb8u4, 2.8.7+dfsg-1.3+deb9u2
php-symfony - addressed in versions 2.8.49-1.fc28, 2.8.49-1.fc29
php-symfony3 - addressed in versions 3.4.20-1.fc28, 3.4.20-1.fc29
php-symfony4 - addressed in versions 4.0.15-1.fc28, 4.1.9-1.fc29

External References

Related Security Bulletins