Source. This article is based on CVE-2026-45070: Email Header Injection via Non-Token Characters in Mime Parameter Names. Details were checked against it on November 4, 2026; check the source for later changes.
The Symfony project published CVE-2026-45070, an email header injection issue in the MIME component (symfony/mime). The Symfony advisory is dated 20 May 2026. It was later corrected: the first version of the post named fixed releases that, the maintainers now say, do not contain the fix. Packagist logged the updated advisory on 28 October 2026, so if you patched in the spring and wrote down the version numbers, check them again.
Per the advisory, the affected ranges are anything before 5.4.55, 6.x before 6.4.49, 7.x before 7.4.22 and 8.x before 8.1.10. The fixed releases are 5.4.55, 6.4.49, 7.4.22 and 8.1.10. Packagist and OSV rate the issue as medium or moderate; the Symfony post itself does not give a severity.
What the advisory says
Symfony's ParameterizedHeader class serialises structured headers such as Content-Type and Content-Disposition, which carry key=value parameters. The advisory states that Symfony validates and encodes parameter values, but does not validate parameter names. A name is written into the header as given.
Header parameter names must be RFC "tokens", which exclude whitespace, CR/LF and a set of special characters. If an application builds a parameter name from untrusted input and that input contains \r\n, the current header ends early and the attacker can add further headers to the rendered message. The advisory calls this the classic CRLF header-injection pattern, applied to the parameter-name position.
The advisory credits Fabian Fleischer with the report and Alexandre Daubois with the fix. We have not reproduced the issue, and we are not describing exploit payloads; they are not needed to patch.
The version correction matters
The advisory has a note that is easy to miss. It says the original post listed 5.4.52, 6.4.40, 7.4.12 and 8.0.12 as fixed. According to the maintainers, the fix commit was never merged into a release branch, so those versions are still affected. The fix first shipped in 5.4.55, 6.4.49, 7.4.22 and 8.1.10.
Two practical consequences. First, a lock file sitting on 5.4.52, 6.4.40 or 7.4.12 looks patched if you trust an old note, and is not. Second, the advisory says Symfony 8.0 is no longer maintained, so 8.0 users must move to 8.1.10 rather than wait for an 8.0 patch.
Who is affected, and how to tell
Two conditions need to hold. You use symfony/mime (directly, or through symfony/mailer and a full-stack Symfony application), and some code path lets a user influence the name of a header parameter. Typical places to look are custom attachment handling, code that sets Content-Disposition or Content-Type parameters from request data, and mail templates built from form fields. Ordinary use that sets only the parameter value, such as a filename, is the case the advisory says Symfony already encodes.
Start with the installed version:
composer show symfony/mime
composer why symfony/mime
Compare the output with the fixed releases above for your branch. Also check symfony/symfony if your project still requires the monolithic package, since Packagist lists the same CVE against it.
Then search your own code for places that construct header parameters:
grep -rn "ParameterizedHeader\|setParameter\|Content-Disposition" src/ app/ lib/
Any hit where the parameter name is not a hard-coded string deserves a read.
The fix
- Update the constraint in
composer.jsonso it can resolve to a fixed release for your branch (5.4.55, 6.4.49, 7.4.22 or 8.1.10 or later). - Run the update for the component and its related packages:
composer update symfony/mime symfony/mailer --with-all-dependencies - Re-run
composer show symfony/mimeand confirm the installed version is at or above the fixed release. - Deploy, and clear the application cache as you normally do for a Symfony release.
Per the advisory, the patched ParameterizedHeader now rejects parameter names containing bytes outside the RFC token set. That means code that previously passed an odd name will now fail loudly instead of silently producing a malformed header. Run your mail-related tests after the upgrade; if you have none, that is the gap to close first. The patch for the 5.4 branch is linked from the advisory.
If you are on an unmaintained branch such as 8.0, or on 5.4 and cannot move to a newer major yet, the patched 5.4.55 and 8.1.10 are the only fixed targets the advisory names for those lines. Plan the minor jump now.
If you cannot upgrade right now
The advisory does not give a workaround. The only mitigation we can derive from its description is on your side: do not let untrusted input become a header parameter name, and reject or whitelist names before they reach the MIME component. Treat that as a stopgap, not a fix, because it relies on you finding every call site.
How to confirm it worked
Check the resolved version in composer.lock, not just composer.json, on the machine that serves traffic. If you build in CI, add a step that fails when composer audit reports an advisory for any package in the lock file. composer audit reads the same Packagist advisory data, so it would have caught the corrected version ranges.
When this points to a bigger problem
A patch note that changes after release is a reminder that dependency state is something you have to verify, not remember. Teams on old Symfony 4.x or 5.x projects, or on PHP applications that vendor their own copy of a mailer, often cannot apply a point release without touching half the codebase. That is the situation we are usually called in for. We inventory what is installed, add tests around the mail and upload paths, and move the platform to a supported release in stages. If that sounds like your system, see our PHP platform development work. Related reading: our legacy PHP security audit guide, the PHP 5.6/7.x to PHP 8 upgrade notes and the guide to adding tests to legacy code.
Frequently asked questions
Which Symfony versions fix CVE-2026-45070?
Per the Symfony advisory, 5.4.55, 6.4.49, 7.4.22 and 8.1.10. Earlier numbers listed in the original post (5.4.52, 6.4.40, 7.4.12, 8.0.12) do not contain the fix.
Can I stay on Symfony 8.0?
The advisory says 8.0 is no longer maintained, so 8.0 users have to upgrade to 8.1.10.
Is there a workaround if I cannot upgrade?
The advisory does not state one. Upgrading is the documented fix; avoiding untrusted input in header parameter names reduces exposure but is not a substitute.
Need a Symfony or PHP dependency upgrade done safely?
We inventory your installed versions, add tests around the risky paths and move your application to patched, supported releases in stages.
See our PHP Platform Development