CVE-2026-119417

CakePHP through 5.4.3 Email Header Injection via Bare CR/LF in SmtpTransport and MailTransport

Published Oct 30, 2026 CVSS 4.0 · 6.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

CakePHP transports that send email only strip CRLF pairs from header values, allowing an attacker who can control header values to inject arbitrary headers. The injection can add Bcc or other headers, redirecting outgoing mail or modifying the message content. This flaw prevents accidental disclosure of the intended recipient list and enables an attacker to spoof the sender or alter email content without execution of arbitrary code.

Affected Systems

CakePHP framework versions 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 are vulnerable. The vulnerability resides in SmtpTransport and MailTransport components that sanitize headers. All installations of the affected CakePHP releases that use custom headers via Message::setHeaders() or Message::addHeaders() are impacted.

Risk and Exploitability

The CVSS score is 6.3, indicating a moderate severity. EPSS data is not available, and the flaw is not listed in CISA’s KEV catalog. Exploitation requires an attacker to influence header values, which may be possible through application logic that accepts user input or through a misconfigured API endpoint. Once the header payload is accepted, an attacker can inject a carriage return or line feed to delimit new headers and introduce a Bcc field, causing mail to be sent to arbitrary addresses. This can lead to spam, phishing, or data leakage of private email addresses.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade CakePHP to a version where the header sanitization fix has been applied (e.g., 5.4.4 or later).
  • If immediate upgrade is not possible, validate or sanitize custom header inputs to strip any CR or LF characters before setting Message::setHeaders() or Message::addHeaders().
  • Restrict or disable application code that allows arbitrary custom headers, ensuring only trusted header values are used.
  • Monitor outgoing email logs for unexpected Bcc or unauthorized recipients and investigate anomalies.

Generated by OpenCVE AI on October 30, 2026 at 12:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title CakePHP through 5.4.3 Email Header Injection via Bare CR/LF in SmtpTransport and MailTransport
First Time appeared Cakephp
Cakephp cakephp
Weaknesses CWE-93
CPEs cpe:2.3:a:cakephp:cakephp:*:*:*:*:*:*:*:*
Vendors & Products Cakephp
Cakephp cakephp
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N'}

cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 30, 2026, 3:55 PM
Reserved
Oct 30, 2026, 2:41 AM
Status
Deferred
Published
Oct 30, 2026, 12:16 PM
Modified
Oct 30, 2026, 7:07 PM