- Packages
- symfony/serializer, symfony/symfony
- Fixed in
- 5.4.56, 6.4.50, 7.4.23, 8.1.11
- Published
- Tue 1 Dec 2026, 21:17 LisbonUpdated Wed 2 Dec 2026, 00:45 Lisbon
- Installs on Packagist
- 396M
In plain words
An attacker can make an application treat an existing server file as an uploaded file without sending an upload. This affects code that deserialises untrusted data into an object with an UploadedFile property or a similar file-subclass property, including through #[MapRequestPayload]. Depending on how the application handles uploads, this can expose files readable by PHP, move server files or reveal whether a path exists.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| symfony/serializer | < 5.4.56 | 5.4.56 |
| symfony/serializer | >= 6.0.0, < 6.4.50 | 6.4.50 |
| symfony/serializer | >= 7.0.0, < 7.4.23 | 7.4.23 |
| symfony/serializer | >= 8.0.0, < 8.1.11 | 8.1.11 |
| symfony/symfony | < 5.4.56 | 5.4.56 |
| symfony/symfony | >= 6.0.0, < 6.4.50 | 6.4.50 |
| symfony/symfony | >= 7.0.0, < 7.4.23 | 7.4.23 |
| symfony/symfony | >= 8.0.0, < 8.1.11 | 8.1.11 |
How serious is it?
High is a CVSS score of 7.0 to 8.9: serious impact with few preconditions. Plan the update within days, ahead of feature work, and check the logs for signs it was tried.
symfony/serializer has 396M installs on Packagist, so the advisory reaches a large number of projects: expect scanners to look for it soon.
Am I affected?
In composer.lock, look for symfony/serializer or symfony/symfony with a version < 5.4.56, >= 6.0.0, < 6.4.50, >= 7.0.0, < 7.4.23 or >= 8.0.0, < 8.1.11. Check whether request bodies or other untrusted data are deserialised into objects with an UploadedFile property or another subclass of the file types described above, including DTOs used with #[MapRequestPayload]. Assert\File does not prevent this. The fixed versions are 5.4.56, 6.4.50, 7.4.23 and 8.1.11; their protection also requires DataUriNormalizer ahead of the object normalizer, as configured by FrameworkBundle.
Did you install symfony/serializer, or did a dependency?
Composer says why a package is in your project:
composer why symfony/serializer
If the output names your own project, you required symfony/serializer directly and the update is yours to make. If it names another package, symfony/serializer came in through it, and that package's version constraint decides which release you can install. To see what stands between you and the fix, ask Composer directly:
composer why-not symfony/serializer 5.4.56
Every line it prints is a constraint that blocks 5.4.56. Update the package it names, or raise your own constraint, and run it again until it prints nothing. If you stay on an older branch, ask about its fix instead: 6.4.50, 7.4.23, 8.1.11.
What to do
Check which version you have, then update to a fixed release for your branch (5.4.56, 6.4.50, 7.4.23, 8.1.11):
composer show symfony/serializer | grep versions
composer update symfony/serializer
If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.
Check the whole project at once
Composer 2.4 and later can list every installed package with a known advisory, this one included once Packagist has it:
composer audit --locked
--locked reads composer.lock instead of the vendor folder, so you can run it on a release tag or in CI without installing anything. It exits with a non-zero code when it finds an advisory, which is enough to fail a build. Run it on every branch you still support, not only the newest: an older release your customers run is affected in the same way.
Under the Cyber Resilience Act
No exploitation of this vulnerability is known, so on its own it does not start the Article 14 reporting clock, which covers actively exploited vulnerabilities. That changes if you learn it is being exploited through your product: then the 24-hour early warning applies.
Either way, if symfony/serializer ships inside a product you sell, the CRA treats its vulnerabilities as yours. Article 13(5) asks for due diligence on the components you include, and from 11 December 2027 Annex I asks you to ship security fixes without delay and free of charge for the support period you declared. A short note in your changelog saying which release updated symfony/serializer, and why, is the evidence you will want later.
What goes in each Article 14 report · Does the CRA apply to your product?
symfony/serializer's record
This is the only advisory for symfony/serializer since the digest started following Composer packages in September 2026. One advisory says little about a package's quality; what matters is how fast the fix came, and here it is out.
The advisory's description
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.
Weakness: CWE-73 External Control of File Name or Path. Reported by nicolas-grekas.