CakePHP: SmtpTransport vulnerable to CRLF header injection
High severity. Published 8 September 2026. 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.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| cakephp/cakephp (opens in a new tab) | >= 4.5.0, < 4.5.12 | >= 4.6.0, < 4.6.5 | >= 5.0.0, < 5.1.8 | >= 5.2.0, < 5.2.14 | >= 5.3.0, < 5.3.7 | 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show cakephp/cakephp
composer auditAdvisory details
| Severity | High |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-77634 (opens in a new tab) |
| GHSA | GHSA-2qh5-382h-3jpc (opens in a new tab) |
| Weakness | CWE-93 |
What the advisory says
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.
Source: GHSA-2qh5-382h-3jpc (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection (critical, 17 September 2026)
- CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver (critical, 8 September 2026)