Skip to content

4.x - Strip CRLF from message headers in SmtpTransport - #19513

Merged
markstory merged 3 commits into
4.xfrom
backport-19512
Jun 29, 2026
Merged

markstory merged 3 commits into
4.xfrom
backport-19512

Conversation

@markstory

Copy link
Copy Markdown
Member

Strip CRLF bytes from message headers when delivering mail by SmtpTransport. This prevents header injection should userland code supply user data into messages headers.

Thank you to Himanshu Anand for reporting this issue.

Backport of #19512 to 4.x

Strip CRLF bytes from message headers when delivering mail by
SmtpTransport. This prevents header injection should userland code
supply user data into messages headers.

Thank you to Himanshu Anand for reporting this issue.
@markstory
markstory merged commit 0818896 into 4.x Jun 29, 2026
9 of 11 checks passed
@markstory
markstory deleted the backport-19512 branch June 29, 2026 14:26
markstory added a commit that referenced this pull request Jul 15, 2026
* Strip CRLF from message headers in SmtpTransport

Strip CRLF bytes from message headers when delivering mail by
SmtpTransport. This prevents header injection should userland code
supply user data into messages headers.

Thank you to Himanshu Anand for reporting this issue.

* Fix failing test from previous fix

* Fix php incompatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant