CVE-2026-119417: CakePHP: SmtpTransport vulnerable to CRLF header injection

Published Aug 24, 2026
·
Updated

Impact

Custom mail headers added with Message::setHeaders() or addHeaders() do not have CRLF replaced allowing header injection if user controlled data is added to message headers without stripping CRLF bytes.

Patches 5.3.7, 5.2.14, 5.1.9, 4.6.5, 4.5.12 contain fixes for this issue.

Workarounds You can strip CRLF bytes from email header values before setting header values.

Other sources

CakePHP 4.5.12, 4.6.5, 5.1.8 through 5.1.10, 5.2.14 through 5.2.15, 5.3.7, and 5.4.0 through 5.4.3 contain an email header injection vulnerability because SmtpTransport and MailTransport strip only CRLF pairs from header values, an incomplete fix for CVE-2026-77634. Attackers controlling custom headers set via Message::setHeaders() or Message::addHeaders() can insert a bare CR or LF to inject headers like Bcc, redirecting or altering outgoing mail.

— NVD

CakePHP is a rapid development framework for PHP. Prior to versions 4.5.12, 4.6.5, 5.1.8, 5.2.14, and 5.3.7 on their respective release lines, custom mail headers added with Message::setHeaders() or Message::addHeaders() do not have CRLF bytes removed, allowing header injection when user-controlled data is used in message headers. This issue is fixed in versions 4.5.12, 4.6.5, 5.1.8, 5.2.14, and 5.3.7.

— OSV

Affected Software

8 affected componentsFixes available
composer/cakephp/cakephp>=4.5.0<4.5.12
4.5.12
composer/cakephp/cakephp>=4.6.0<4.6.5
4.6.5
composer/cakephp/cakephp>=5.0.0<5.1.9
5.1.9
composer/cakephp/cakephp>=5.2.0<5.2.14
5.2.14
composer/cakephp/cakephp>=5.3.0<5.3.7
5.3.7
ubuntu/cakephp*
ubuntu/cakephp*
ubuntu/cakephp*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/cakephp/cakephp to a version that resolves this vulnerability.

    Fixed in 4.5.12
  2. Upgrade

    Upgrade composer/cakephp/cakephp to a version that resolves this vulnerability.

    Fixed in 4.6.5
  3. Upgrade

    Upgrade composer/cakephp/cakephp to a version that resolves this vulnerability.

    Fixed in 5.1.9
  4. Upgrade

    Upgrade composer/cakephp/cakephp to a version that resolves this vulnerability.

    Fixed in 5.2.14
  5. Upgrade

    Upgrade composer/cakephp/cakephp to a version that resolves this vulnerability.

    Fixed in 5.3.7
  6. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 5.3.7
  7. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 5.2.14
  8. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 5.1.9
  9. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 4.6.5
  10. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 4.5.12
  11. Compensating control

    Strip bare CR and LF bytes from email header values before setting them with Message::setHeaders() or Message::addHeaders().

Event History

Aug 24, 2026
CVE Published
via OSV·08:33 PM
Data Sourced
via OSV·08:33 PM
DescriptionSeverityWeakness
Sep 8, 2026
Advisory Published
via OSV·08:56 PM
Data Sourced
via OSV·08:56 PM
Affected Software
Oct 30, 2026
CVE Published
via MITRE·11:30 AM
Data Sourced
via MITRE·11:30 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications are exposed when they use CakePHP mail delivery and place attacker-controlled data into custom headers through Message::setHeaders() or Message::addHeaders(). The affected transports described are SmtpTransport and MailTransport.

2

What does an attacker need to exploit it?

An attacker needs control over a value used as a custom email header. By supplying a bare carriage return or line feed, they can inject additional headers such as Bcc and redirect or alter outgoing mail.

3

Are the listed fixed versions fully protected?

The data identifies 5.3.7, 5.2.14, 5.1.9, 4.6.5, and 4.5.12 as containing fixes. It also notes that some versions containing an incomplete earlier fix remain vulnerable, including 5.1.8 through 5.1.10, 5.2.14 through 5.2.15, 5.3.7, and 5.4.0 through 5.4.3.

4

What can be done before patching?

Strip carriage return and line feed bytes from every email header value before passing it to setHeaders() or addHeaders(). Do not place untrusted input directly into custom mail headers.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203