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.
Published: 2026-10-30
Score: 6.3 Medium
EPSS: n/a
KEV: No
Impact: Email Spoofing and Unintended Recipients
Action: Patch
AI Analysis

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.

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

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 yet.

History

Fri, 30 Oct 2026 11:45:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-30T11:30:49.444Z

Reserved: 2026-10-30T02:41:11.166Z

Link: CVE-2026-119417

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-30T12:16:38.213

Modified: 2026-10-30T12:16:38.213

Link: CVE-2026-119417

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T13:30:12Z

Weaknesses
  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')