Skip to main content
← Vulnerabilities

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

Affects Symfony before 5.4.56, 6.4.50, 7.4.23 and 8.1.11 where a Serializer lacks DataUriNormalizer ahead of the object normalizer. The FrameworkBundle serializer is protected. Fixed in 5.4.56, 6.4.50, 7.4.23 and 8.1.11.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

8.4HighCNA
Exploited
No known exploitation
Fix
Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 5.4.56, 6.4.50, 7.4.23, 8.1.11.

Published
Last modified
35/100 · provisional
Unclear
None on Exploit-DB, Metasploit or GitHub

Summary

Symfony's Serializer component can be tricked into building UploadedFile objects from client-supplied data, including a file path, so an attacker can make the application treat any file readable by PHP on the server as an upload. An attacker can do this remotely, without logging in, by sending a crafted JSON or form request body, and the impact depends on what the application does with the file, such as exposing its contents or moving it.

Read the original description

The Symfony Serializer component DataUriNormalizer handles only the exact types SplFileInfo, SplFileObject, and File, so for a property typed with a subclass such as UploadedFile, ObjectNormalizer instantiates the object through its constructor from attacker-controlled data, including the file path. This allows an arbitrary file on the server to be treated as an uploaded file in Symfony versions prior to 5.4.56, 6.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11.

A request body such as {"image": {"path": "/path/to/project/.env.local", "originalName": "a.png", "test": true}} makes the application handle any file on the server as an upload, without the file being sent. With test: true, UploadedFile::isValid() skips is_uploaded_file() and move() falls back to rename(). Assert\File does not prevent this because it validates the file at the attacker-chosen path, which exists on the server. Any code that deserializes untrusted data into a type that holds such a property is affected. That includes #[MapRequestPayload] on a DTO with an UploadedFile property, which is how uploads are mapped in Symfony 8.1; a single unauthenticated request with a JSON or form body is enough. Depending on what the application does with the upload, this can expose any file readable by PHP (for instance, when uploads are stored and served back), move any such file when move() is called, and reveal whether a path exists.

A serializer built without DataUriNormalizer ahead of the object normalizer is not protected by the fix; the serializer configured by FrameworkBundle is.

cve.now Index

35Pcve.now Index 35 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure17/25No login or user action needed, reachable over the network without a login · Unknown: Advisories don't say whether default setups are affected
  • Reach10/20Affects Packagist packages
  • Severity8.4/10CVSS 8.4
  • No patch0/5No signal

What would change the score

  • Would score about 80 if added to CISA KEV
  • Would score about 75 if CISA's SSVC rates exploitation active
  • Would score about 40 if advisories confirm default setups are exposed

What to do

  • Upgrade to a fixed version: 5.4.56, 6.4.50, 7.4.23, 8.1.11.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • symfony/serializerPackagist

    fixed in 5.4.56; From 6.0.0 · fixed in 6.4.50; From 7.0.0 · fixed in 7.4.23; From 8.0.0 · fixed in 8.1.11

Evidence 3

  1. Advisory
  2. Patch
  3. Patch

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-118515

Is CVE-2026-118515 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

An attacker can make the application treat any file that PHP can read on the server as an uploaded file. This can expose the file's contents when uploads are stored and served back, move the file when move() is called, and reveal whether a path exists.Source: github.com

Which versions are affected by CVE-2026-118515?

symfony/serializer (Packagist): before 5.4.56; from 6.0.0 before 6.4.50; from 7.0.0 before 7.4.23; from 8.0.0 before 8.1.11.Source: cve.now feed data

Am I affected, and how do I check?

Affected releases are Symfony before 5.4.56, 6.x before 6.4.50, 7.x before 7.4.23, and 8.x before 8.1.11. The exposure applies when a Serializer is built without DataUriNormalizer ahead of the object normalizer and untrusted request data is deserialized into a type with an UploadedFile or other SplFileInfo-subclass property. Check the installed Symfony version and how the Serializer is configured.Source: github.com

How do I fix CVE-2026-118515?

Upgrade to 5.4.56, 6.4.50, 7.4.23 or 8.1.11, whichever matches your release line. The facts list no workaround.Source: github.com