Symfony has Email Header / SMTP Command Injection via CRLF in Symfony\Component\Mime\Address

Description

Description

Symfony\Component\Mime\Address is the value-object every Symfony Mailer address (to/cc/bcc/from/reply-to) flows through; its constructor is documented as validating the address and throwing on invalid input, so developers treat it as a security boundary.

The constructor accepts email addresses whose local-part (the part before @) is an RFC-5322 quoted string containing raw \r\n bytes, e.g. "x\r\nBcc: attacker@evil"@example.com. The stored address is later emitted verbatim into (1) the rendered message headers and (2) SmtpTransport's MAIL FROM:<...> / RCPT TO:<...> protocol lines, turning the embedded CRLF into a new mail header and/or a new SMTP command.

Resolution

The Address constructor now rejects addresses containing line breaks.

The patch for this issue is available here for branch 5.4.

Credits

We would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.

Basic information

Type
reviewed
Severity
high
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-05-27 20:42:07 UTC
Updated
2026-05-27 20:42:08 UTC
GitHub reviewed
2026-05-27 20:42:07 UTC

EPSS Score

No EPSS score in this advisory JSON.

CVSS Scores

Base score Version Severity Vector
7.1 4.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network.
Attack complexity (AC:L)
Exploitation conditions are straightforward and stable.
Attack requirements (AT:N)
No additional preconditions are required beyond normal reachability.
Privileges required (PR:L)
Low privileges are required.
User interaction (UI:N)
No user interaction is required.
Vulnerable system confidentiality impact (VC:N)
No confidentiality impact on the vulnerable system.
Vulnerable system integrity impact (VI:H)
High integrity impact on the vulnerable system.
Vulnerable system availability impact (VA:N)
No availability impact on the vulnerable system.
Subsequent system confidentiality impact (SC:N)
No confidentiality impact on subsequent systems.
Subsequent system integrity impact (SI:N)
No integrity impact on subsequent systems.
Subsequent system availability impact (SA:N)
No availability impact on subsequent systems.

Identifiers

CWEs

CWE id Name
CWE-93 Improper Neutralization of CRLF Sequences ('CRLF Injection')

Affected packages (8)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
composer symfony/mime < 5.4.52 5.4.52
composer symfony/symfony < 5.4.52 5.4.52
composer symfony/mime >= 6.0.0, < 6.4.40 6.4.40
composer symfony/mime >= 7.0.0, < 7.4.12 7.4.12
composer symfony/mime >= 8.0.0, < 8.0.12 8.0.12
composer symfony/symfony >= 6.0.0, < 6.4.40 6.4.40
composer symfony/symfony >= 7.0.0, < 7.4.12 7.4.12
composer symfony/symfony >= 8.0.0, < 8.0.12 8.0.12

References

cvelogic Threat Intelligence