Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. symfony/form
  4. ›
  5. CVE-2018-19789

CVE-2018-19789: Unrestricted Upload of File with Dangerous Type

December 18, 2018 (updated May 10, 2019)

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.

References

  • symfony.com/cve-2018-19789

Code Behaviors & Features

Detect and mitigate CVE-2018-19789 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.7.38 before 2.7.50, all versions starting from 2.8.0 before 2.8.49, all versions starting from 3.0.0 before 3.4.20, all versions starting from 4.0.0 before 4.0.15, all versions starting from 4.1.0 before 4.1.9, all versions starting from 4.2.0 before 4.2.1

Fixed versions

  • 2.7.50
  • 2.8.49
  • 3.4.20
  • 4.0.15
  • 4.1.9
  • 4.2.1

Solution

Upgrade to versions 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9, 4.2.1 or above.

Impact 5.3 MEDIUM

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-434: Unrestricted Upload of File with Dangerous Type

Source file

packagist/symfony/form/CVE-2018-19789.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:04 +0000.