{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-118515","assignerOrgId":"596c5446-0ce5-4ba2-aa66-48b3b757a647","state":"PUBLISHED","assignerShortName":"Checkmarx","dateReserved":"2026-10-28T14:33:36.992Z","datePublished":"2026-11-06T16:17:01.487Z","dateUpdated":"2026-11-06T16:17:01.487Z"},"containers":{"cna":{"providerMetadata":{"orgId":"596c5446-0ce5-4ba2-aa66-48b3b757a647","shortName":"Checkmarx","dateUpdated":"2026-11-06T16:17:01.487Z"},"title":"Symfony: The Serializer Builds UploadedFile Objects From Request Data, Letting a Client Point an Upload at Any Server File","problemTypes":[{"descriptions":[{"lang":"en","cweId":"CWE-73","description":"CWE-73 External control of file name or path","type":"CWE"}]}],"affected":[{"vendor":"sensiolabs","product":"symfony","collectionURL":"https://packagist.org/packages/symfony/serializer","packageName":"symfony/serializer","repo":"https://github.com/symfony/serializer","modules":["Symfony\\Component\\Serializer\\Normalizer\\DataUriNormalizer::denormalize()"],"versions":[{"status":"affected","version":"0","lessThan":"5.4.56","versionType":"git"},{"status":"affected","version":"6.0.0","lessThan":"6.4.50","versionType":"git"},{"status":"affected","version":"7.0.0","lessThan":"7.4.23","versionType":"git"},{"status":"affected","version":"8.0.0","lessThan":"8.1.11","versionType":"git"}],"defaultStatus":"unaffected"}],"cpeApplicability":[{"operator":"OR","nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","versionStartIncluding":"0","versionEndExcluding":"5.4.56"},{"vulnerable":true,"criteria":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0.0","versionEndExcluding":"6.4.50"},{"vulnerable":true,"criteria":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0.0","versionEndExcluding":"7.4.23"},{"vulnerable":true,"criteria":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","versionStartIncluding":"8.0.0","versionEndExcluding":"8.1.11"}]}]}],"descriptions":[{"lang":"en","value":"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.\n\nA 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.\nAny 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.\n\nA serializer built without DataUriNormalizer ahead of the object normalizer is not protected by the fix; the serializer configured by FrameworkBundle is.","supportingMedia":[{"type":"text/html","base64":false,"value":"<div>The Symfony Serializer component&nbsp;<code>DataUriNormalizer</code>&nbsp;handles only the exact types&nbsp;<code>SplFileInfo</code><span>, </span><code>SplFileObject</code><span>, and </span><code>File</code><span>, so for a property typed with a subclass such as </span><code>UploadedFile</code><span>, </span><code>ObjectNormalizer</code><span> 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.</span></div><div>A request body such as&nbsp;<code>{\"image\": {\"path\": \"/path/to/project/.env.local\", \"originalName\": \"a.png\", \"test\": true}}</code>&nbsp;makes the application handle any file on the server as an upload, without the file being sent. With&nbsp;<code>test: true</code>,&nbsp;<code>UploadedFile::isValid()</code>&nbsp;skips&nbsp;<code>is_uploaded_file()</code>&nbsp;and&nbsp;<code>move()</code>&nbsp;falls back to&nbsp;<code>rename()</code>.&nbsp;<code>Assert\\File</code>&nbsp;does not prevent this because it validates&nbsp;the file at the attacker-chosen path, which exists on the server.<br><div>Any code that deserializes untrusted data into a type that holds such a property is affected. That includes&nbsp;<code>#[MapRequestPayload]</code>&nbsp;on a DTO with an&nbsp;<code>UploadedFile</code>&nbsp;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&nbsp;<code>move()</code>&nbsp;is called, and reveal whether a path exists.</div><div>A serializer built without&nbsp;<code>DataUriNormalizer</code>&nbsp;ahead of the object normalizer is not protected by the fix; the serializer configured by&nbsp;<code>FrameworkBundle</code>&nbsp;is.</div></div>"}]}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-h38r-xrmh-cwhr","tags":["third-party-advisory"]},{"url":"https://github.com/symfony/symfony/commit/72ece5bb3084e8233325166357f85c8c0650ee86","tags":["patch"]},{"url":"https://github.com/symfony/symfony/commit/c459104eb18ebda31e112c5490970da3f30bd668","tags":["patch"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.4,"vectorString":"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"}}],"credits":[{"lang":"en","value":"Oliver Wenzel","type":"reporter"},{"lang":"en","value":"Nicolas Grekas","type":"remediation developer"}],"source":{"advisory":"GHSA-h38r-xrmh-cwhr","discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 1.0.5"}}}}