# CakePHP: SmtpTransport vulnerable to CRLF header injection

High severity, published 2026-09-08. Update cakephp/cakephp to the fixed version of your branch (4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7): composer update cakephp/cakephp.

Canonical URL: https://buzzphp.com/security/ghsa-2qh5-382h-3jpc · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high |
| Published | 2026-09-08 |
| Updated | 2026-09-08 |
| CVE | [CVE-2026-77634](https://nvd.nist.gov/vuln/detail/CVE-2026-77634) |
| GHSA | [GHSA-2qh5-382h-3jpc](https://github.com/advisories/GHSA-2qh5-382h-3jpc) |
| Weakness | CWE-93 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| cakephp/cakephp | >= 4.5.0, < 4.5.12 or >= 4.6.0, < 4.6.5 or >= 5.0.0, < 5.1.8 or >= 5.2.0, < 5.2.14 or >= 5.3.0, < 5.3.7 | 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 |

## What to do

Update cakephp/cakephp to the fixed version of your branch (4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7): composer update cakephp/cakephp.

Check which version you run with `composer show cakephp/cakephp`, and every affected package with `composer audit`.

## About this advisory

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.

## Links

- [GHSA-2qh5-382h-3jpc on GitHub](https://github.com/advisories/GHSA-2qh5-382h-3jpc)
- [CVE-2026-77634 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-77634)
- [All Composer security advisories](https://buzzphp.com/security)
