CVE-2026-46489: Symfony Unvalidated File Upload Base64

Direct base64 encoding of an uploaded file without prior MIME type or content validation. If this base64 string is rendered inline as a data URI, unrestricted SVG uploads could lead to Stored XSS. Ensure the uploaded file is validated using `$validator->validate(...)` or functions like `getimagesize()` before reading its contents.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0PHP
greprules fetch cve-2026-46489-symfony-unvalidated-file-upload-base64 --engine opengrep

Description

Direct base64 encoding of an uploaded file without prior MIME type or content validation. If this base64 string is rendered inline as a data URI, unrestricted SVG uploads could lead to Stored XSS. Ensure the uploaded file is validated using `$validator->validate(...)` or functions like `getimagesize()` before reading its contents.