Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › PHP

CVE-2026-118515 — Symfony: The Serializer Builds UploadedFile Objects From Request Data, Letting a Client Point an Upload at Any Server File

High · CVSS 8.4EPSS 0.5% First seen December 01, 2026

One of 2 composer:symfony/serializer vulnerabilities published together by GitHub Advisory: our article covers all of them.

PHPWebVulnerabilities

Severity breakdown

High · 8.4 CVSS 4.0 base score from the CNA

An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Special conditions
only in some setups or conditions
Login needed
no
User action needed
no
Impact
high on confidentiality and availability, low on integrity
Impact on other systems
none

Vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X · CVSS 4.0 8.4 from GitHub: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N

Weakness

  • CWE-73: External Control of File Name or Path

Affected and fixed versions

ProductAffected versionsFixed in
symfony/serializer (Packagist)< 5.4.565.4.56
≥ 6.0.0, < 6.4.506.4.50
≥ 7.0.0, < 7.4.237.4.23
≥ 8.0.0, < 8.1.118.1.11
symfony/symfony (Packagist)< 5.4.565.4.56
≥ 6.0.0, < 6.4.506.4.50
≥ 7.0.0, < 7.4.237.4.23
≥ 8.0.0, < 8.1.118.1.11

From the GitHub Advisory Database; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Details

Description

DataUriNormalizer builds \SplFileInfo, \SplFileObject and Symfony\Component\HttpFoundation\File\File objects from data URIs, for those exact types only. A property typed with a subclass of them, like UploadedFile, was left to ObjectNormalizer, which instantiated it through its constructor from the denormalized data, path, original name and test flag included. With #[MapRequestPayload] and a DTO holding an UploadedFile property, which is how uploads are mapped in Symfony 8.1, a request needs no upload at all to make the application handle any file of the server as one:

{"name": "x", "image": {"path": "/path/to/project/.env.local", "originalName": "a.png", "test": true}}

The same works with a form body, and with any code that deserializes untrusted data into a type holding such a property, on every maintained branch. test: true makes UploadedFile::isValid() skip is_uploaded_file() and move() fall back to rename(); code that reads the file without calling isValid() does not even need it. Depending on what the application does with the upload, this exposes any file readable by PHP, for instance when uploads are stored and served back, moves any such file when move() is called as the upload documentation shows, and reveals whether a path exists. Assert\File does not prevent it, since it validates the real server file.

Resolution

DataUriNormalizer now handles every subclass of \SplFileInfo as well: it passes through an instance of the expected type, as the files of a request are, and rejects any other data with a NotNormalizableValueException, which #[MapRequestPayload] turns into a 422. File, \SplFileInfo and \SplFileObject are still built from data URIs when the type is spelled as their ::class constant. Any other spelling of these classes, like a leading backslash, a different case or a class alias, is handled like a subclass.

A serializer built without DataUriNormalizer ahead of the object normalizer does not get this protection; the serializer configured by FrameworkBundle has it.

The patches for this issue are available here for branch 5.4 and here for branch 6.4 (and forward-ported to 7.4, 8.1 and 8.2).

Credits

Symfony would like to thank Oliver Wenzel for reporting the issue and Nicolas Grekas for providing the fix.

Symfony would also like to thank Bruno Dias and Miguel Neves from Checkmarx for their help getting a CVE assigned.

Source: GHSA-h38r-xrmh-cwhr / CVE-2026-118515, GitHub Advisory Database, licensed CC BY 4.0.

Affected

  • composer:symfony/serializer
  • composer:symfony/symfony

What to do

  • Check whether you run an affected product or version and apply the vendor's update or mitigation.
  • Follow the vendor advisory and the references below for fixed versions and workarounds.

Frequently asked questions

What is CVE-2026-118515?

DataUriNormalizer builds \SplFileInfo, \SplFileObject and Symfony\Component\HttpFoundation\File\File objects from data URIs, for those exact types only. A property typed with a subclass of them, like UploadedFile, was left to ObjectNormalizer, which instantiated it through its constructor from the denormalized data, path, original name and test flag included. Weakness type: External Control of File Name or Path (CWE-73).

How severe is CVE-2026-118515?

CVE-2026-118515 has a CVSS 4.0 base score of 8.4 (high), from the CNA. An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.

Is CVE-2026-118515 being exploited?

Not as far as is known: CVE-2026-118515 is not in CISA's Known Exploited Vulnerabilities catalog as of December 1, 2026. EPSS estimates a 0.5% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-118515?

symfony/serializer (Packagist) < 5.4.56 (fixed in 5.4.56); symfony/serializer (Packagist) ≥ 6.0.0, < 6.4.50 (fixed in 6.4.50); symfony/serializer (Packagist) ≥ 7.0.0, < 7.4.23 (fixed in 7.4.23); symfony/serializer (Packagist) ≥ 8.0.0, < 8.1.11 (fixed in 8.1.11); and more, listed on this page.

How do I fix CVE-2026-118515?

Update to a fixed release: symfony/serializer (Packagist) 5.4.56; symfony/serializer (Packagist) 6.4.50; symfony/serializer (Packagist) 7.4.23.

Timeline & sources

References

Related vulnerabilities & news