Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted input containing embedded CRLF sequence
-
DeliveryApplication passes value to Message::setHeaders() or Message::addHeaders() unsanitized
-
ExploitCRLF terminates current header field during SMTP serialization
-
ExecutionInjected header line appended to outbound email DATA stream
-
PersistMail server processes attacker-controlled header
-
ImpactEmail delivered with manipulated routing or disclosure of content
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
|
| Exploitation Conditions | Exploitation requires that the CakePHP application explicitly passes user-controlled data as a value to Message::setHeaders() or Message::addHeaders() - this is not a default framework behavior and must be deliberately coded by the application developer. Standard mailer usage (setting recipients, subject, and body via built-in typed methods) is not affected. The CVSS 4.0 AT:P metric directly encodes this prerequisite: the vulnerable code path must be present and reachable. Exploitation is further bounded to the email message context: the attacker cannot access the server filesystem, execute code, or read application data. What limits exploitation is the non-default configuration requirement combined with the absence of any confidentiality or availability impact - only applications that have explicitly wired external input into custom header fields are at realized risk. |
| Impact | The CVSS 4.0 score of 8.2 (VI:H) accurately reflects that successful exploitation produces high-integrity impact - an attacker can inject arbitrary SMTP headers - but the AT:P (Attack Target Presence) metric is the decisive limiting factor: exploitation is only possible when an application explicitly routes user-controlled data into custom email headers, which is not default CakePHP behavior. The network attack vector (AV:N) and no-privileges requirement (PR:N) expand the theoretical attacker surface, but the realized risk population narrows sharply to applications that have explicitly coded user input into setHeaders()/addHeaders() call sites. No EPSS data was provided in the source intelligence, and this CVE is not listed in the CISA KEV catalog, providing no signal of mass or targeted exploitation; no public exploit code has been identified. Confidentiality and availability are unaffected per the CVSS vector (VC:N/VA:N), bounding the blast radius to integrity of outbound email. Overall, the patch priority is high for any organization whose CakePHP application accepts external input into custom mail headers, but teams that do not use this pattern face near-zero realized risk and can treat this as a routine upgrade cycle. |
| Exploit ScenarioDerived | An attacker submits a crafted contact-form value such as 'legitimate-value\r\nBcc: attacker@evil.com' through an endpoint whose application code passes that value directly to Message::setHeaders() to populate a custom tracking or reply header. CakePHP's transport layer serializes the unsanitized string into the outbound SMTP DATA stream, where the CRLF sequence terminates the original header and the trailing text is parsed as a new Bcc field by the mail server, silently copying every outgoing message to the attacker's address. No public exploit code has been identified, but CRLF injection in mail headers is a well-documented and trivially constructed attack class. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 24, 2026
Email header injection in CakePHP's Mailer component allows CRLF sequences embedded in custom header values to split SMTP headers and introduce attacker-controlled fields. All supported release lines are affected - 4.5.x, 4.6.x, 5.1.x, 5.2.x, and 5.3.x - when applications pass user-controlled data to Message::setHeaders() or Message::addHeaders(). An attacker who can influence those header values can inject arbitrary SMTP headers (e.g., Bcc, Reply-To, Content-Type), potentially hijacking email routing or silently copying messages; no public exploit identified at time of analysis.
RemediationAI
Vendor-released patches are available: upgrade to CakePHP 4.5.12, 4.6.5, 5.1.8, 5.2.14, or 5.3.7 depending on the active release line, as confirmed by the official security advisory at https://github.com/cakephp/cakephp/security/advisories/GHSA-2qh5-382h-3jpc and corroborated by commits 08188962bcd99a95da1e49f62e786f2d688f1e41, 2afe42b02d8ddc5d442bca5e8bb61910a727646e, 3e09dae6cbdc983754fa3a8e6aae74da102a3ea1, and b67b622457362b075bb37e625a82af73a0b3c9c3. If an immediate upgrade is not feasible, the targeted compensating control is to audit every call site of Message::setHeaders() and Message::addHeaders() and strip \r and \n characters from any user-supplied string before passing it to those methods; this approach is error-prone relative to upgrading because it must be applied consistently at every call site and may be missed in future code additions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 6 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CakePHP (CPE: cpe:2.3:a:cakephp:cakephp:*:*:*:*:*:*:*:*) is a PHP rapid-development framework whose Mailer component wraps outbound email via both an SMTP transport (SmtpTransport) and PHP's native mail() transport (MailTransport). Both transports call getHeadersString() to serialize message headers into the raw SMTP wire format, where headers are delimited by CRLF (\r\n) sequences per RFC 2822. Prior to the patched releases, no sanitization was applied to values supplied through Message::setHeaders() or Message::addHeaders(), meaning a CRLF pair embedded in a header value would terminate the current header line and begin a new one - the classic CWE-93 (Improper Neutralization of CRLF Sequences) pattern. The commit diff confirms the fix: a sanitization callback (str_replace("\r\n", '', $val)) was added to the getHeadersString() call inside SmtpTransport::_sendData(), and equivalent coverage was added to the MailTransport test suite.
Know when Cakephp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Network vector reflects web-delivered input; PR:N as no attacker account is needed; S:U because impact stays within the email message; I:H for arbitrary header injection; C and A are N per actual impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
A vulnerability affecting CakePHP versions 4.5 through 5.3 (CVE-2026-77634) could allow attackers to hijack email communications by injecting malicious headers, potentially redirecting sensitive business emails or spoofing internal communications. Organizations using CakePHP to send user-influenced emails risk compromise of email-based authentication, regulatory notifications, and confidential business operations.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
The Xml class in CakePHP 2.1.x before 2.1.5 and 2.2.x before 2.2.1 allows remote attackers to read arbitrary files via X
The clientIp function in CakePHP 3.2.4 and earlier allows remote attackers to spoof their IP via the CLIENT-IP HTTP head
CakePHP 2.x and 3.x before 3.1.5 might allow remote attackers to bypass the CSRF protection mechanism via the _method pa
CakePHP is a development framework for PHP web apps. Rated critical severity (CVSS 9.8), this vulnerability is remotely
SQL injection in the CakePHP PHP framework (versions prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7) allows unauthenti
SQL injection in CakePHP's database layer allows attackers to inject arbitrary SQL when an application uses FunctionsBui
Authentication bypass in the CakePHP Authentication plugin's CookieAuthenticator (versions before 2.11.2, 3.0.0-3.3.6, a
An issue was discovered in SmtpTransport in CakePHP 3.7.6. Rated high severity (CVSS 7.5), this vulnerability is remotel
Local file inclusion in CakePHP's View::_getElementFileName() allows remote attackers to include arbitrary PHP files fro
CakePHP versions prior to 5.2.12 and 5.3.1 contain a stored cross-site scripting vulnerability in the PaginatorHelper::l
CakePHP before 4.0.6 mishandles CSRF token generation. Rated medium severity (CVSS 4.3), this vulnerability is remotely
EUVD-2026-65123
GHSA-2qh5-382h-3jpc
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB