An attacker who controls the name of a parameter in a structured email header, such as Content-Disposition, can end that header early and add headers of their own to the message. Symfony checked parameter values but wrote parameter names out exactly as given.

Who is affected

Apps that send mail with the Mime component (symfony/mime, also part of symfony/symfony) and let user input decide a parameter name in headers like Content-Type or Content-Disposition. Parameter values were already checked and encoded, so apps that only put user input in values, like an attachment's file name, aren't exposed.

What to do

Update to 5.4.55, 6.4.49, 7.4.22 or 8.1.10. Symfony 8.0 no longer gets fixes, so 8.0 users need 8.1.10.

The Symfony advisory first listed 5.4.52, 6.4.40, 7.4.12 and 8.0.12 as fixed. The fix never made it into those releases, so if you updated to one of them, you're still affected. The fix rejects parameter names with characters the email standards don't allow.

Reported by Fabian Fleischer.