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.0: 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/E:U/U:Amber
CVE-ID: CVE-2018-19789
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: SensioLabs
Affected software:
Symfony

Detailed vulnerability description

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.



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.

Sources