CakePHP: SmtpTransport vulnerable to CRLF header injectionGHSA-2qh5-382h-3jpc
Fix: cakephp/cakephp@0818896GHSA-2qh5-382h-3jpc is a CWE-93 vulnerability in cakephp/cakephp. A fix is available for cakephp/cakephp — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-2qh5-382h-3jpc.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
cakephp/cakephp🐘cakephp/cakephp🐘cakephp/cakephp🐘cakephp/cakephp🐘cakephp/cakephpReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | cakephp/cakephp | ≥ 4.5.0&&< 4.5.12 | 4.5.12composer require cakephp/cakephp:^4.5.12 |
| 🐘Packagist | cakephp/cakephp | ≥ 4.6.0&&< 4.6.5 | 4.6.5composer require cakephp/cakephp:^4.6.5 |
| 🐘Packagist | cakephp/cakephp | ≥ 5.0.0&&< 5.1.9 | 5.1.9composer require cakephp/cakephp:^5.1.9 |
| 🐘Packagist | cakephp/cakephp | ≥ 5.2.0&&< 5.2.14 | 5.2.14composer require cakephp/cakephp:^5.2.14 |
| 🐘Packagist | cakephp/cakephp | ≥ 5.3.0&&< 5.3.7 | 5.3.7composer require cakephp/cakephp:^5.3.7 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cakephp/cakephp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update cakephp/cakephp to 4.5.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2qh5-382h-3jpc is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-2qh5-382h-3jpc in your dependencies?
Find it across Packagist, including transitive dependencies.