---
id: "CVE-2026-118515"
page: "https://infrastack.ai/live/CVE-2026-118515"
kind: "vulnerability"
aliases: ["CVE-2026-118515"]
title: "Symfony Serializer: crafted request body turns server files into uploads"
severity: "high"
cvss: 8.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["maprequestpayload", "package", "php", "symfony", "symfony-serializer"]
not_affected_if: ["no-uploadedfile-in-dtos", "static-export"]
published_at: "2026-11-06T17:17:16+00:00"
first_seen_at: "2026-11-06T17:43:12+00:00"
updated_at: "2026-11-06T17:44:54+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118515", "first_seen_at": "2026-11-06T17:43:12+00:00"}]
exploit_sources: []
---

# Symfony Serializer: crafted request body turns server files into uploads

Link for people: https://infrastack.ai/live/CVE-2026-118515 (this .md is for agents)

The Symfony Serializer's DataUriNormalizer does not cover subclasses such as UploadedFile, so ObjectNormalizer builds them from attacker-supplied data including a file path. An attacker can make the application treat any PHP-readable file on the server as an uploaded file, exposing its contents or moving it when move() is called.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed Symfony version with `composer show symfony/serializer` or `composer show symfony/framework-bundle`.
- Look for DTOs or deserialized types with an `UploadedFile` property, especially those used with `#[MapRequestPayload]`.
- Confirm whether the app uses FrameworkBundle's default serializer or builds its own serializer without DataUriNormalizer.

## Fix

- Symfony 5.4: upgrade to `5.4.56` or later
- Symfony 6.4: upgrade to `6.4.50` or later
- Symfony 7.4: upgrade to `7.4.23` or later
- Symfony 8.1: upgrade to `8.1.11` or later

## Timeline

- 2026-11-06T17:43:12+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118515

## Documents

- [advisory] Vendor advisory: github.com https://github.com/symfony/symfony/security/advisories/GHSA-h38r-xrmh-cwhr
- [fix] Patch: github.com https://github.com/symfony/symfony/commit/72ece5bb3084e8233325166357f85c8c0650ee86
- [fix] Patch: github.com https://github.com/symfony/symfony/commit/c459104eb18ebda31e112c5490970da3f30bd668

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
