CVE-2026-77634

CakePHP: SmtpTransport vulnerable to CRLF header injection

Published Aug 24, 2026 CVSS 4.0 · 8.2 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

CakePHP’s SmtpTransport components fail to strip carriage‑return and line‑feed characters from custom mail headers set with Message::setHeaders() or Message::addHeaders(). This omission permits an attacker who can supply input to these header functions to inject additional email headers into the outgoing message. The injected headers may change how the message is treated by mail servers or could be used to forge sender or recipient addresses, potentially enabling phishing or spam defacement. The weakness is a classic CRLF injection flaw (CWE‑93) and can compromise the integrity of email communications.

Affected Systems

The vulnerability affects CakePHP versions prior to 4.5.12, 4.6.5, 5.1.8, 5.2.14, and 5.3.7 on their respective release lines. All other versions above those revision numbers are considered patched.

Risk and Exploitability

With a CVSS score of 8.2, the issue is rated as high severity. The EPSS score is not available, suggesting insufficient publicly observable exploitation data, but the vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that the attack vector is web-based, local to the application, as an attacker can exploit the flaw by sending web requests that include crafted header values to the application. The high CVSS score and lack of patches on older releases make the risk significant for users still running unpatched CakePHP.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade CakePHP to the latest released version that includes the patch (4.5.12, 4.6.5, 5.1.8, 5.2.14, or 5.3.7 and later).
  • Sanitize any user‑controlled data before passing it to Message::setHeaders() or Message::addHeaders(), ensuring that all CRLF characters are removed or encoded.
  • Limit or review the usage of custom mail headers in the application code, preferring standard headers whenever possible and validating header values against a whitelist.

Generated by OpenCVE AI on August 24, 2026 at 21:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2qh5-382h-3jpc CakePHP: SmtpTransport vulnerable to CRLF header injection
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
First Time appeared Cakephp
Cakephp cakephp
Vendors & Products Cakephp
Cakephp cakephp
Type Values Removed Values Added
Description 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.
Title CakePHP: SmtpTransport vulnerable to CRLF header injection
Weaknesses CWE-93
References
Metrics cvssV4_0

{'score': 8.2, 'vector': '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'}

Weaknesses
  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 25, 2026, 7:23 PM
Reserved
Aug 20, 2026, 8:52 PM
Status
Deferred
Published
Aug 24, 2026, 9:17 PM
Modified
Oct 12, 2026, 9:10 PM