Skip to main content

mail-mime-parser CVE-2026-61815

| EUVDEUVD-2026-86335 HIGH
Improper Neutralization of CRLF Sequences ('CRLF Injection') (CWE-93)
2026-09-24 GitHub_M GHSA-36h5-qg4p-q2qf
7.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send email with CRLF-laden attachment filename
  2. Delivery
    App parses inbound mail via library
  3. Exploit
    Filename interpolated into Content-* headers unstripped
  4. Execution
    App re-sends/forwards constructed message
  5. Impact
    Forged Bcc header exfiltrates message copy

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 consuming PHP application uses zbateson/mail-mime-parser to BUILD or FORWARD a MIME message using an attacker-influenced attachment filename - specifically, reusing a parsed getFilename() value (e.g. from inbound mail) or otherwise passing an untrusted filename into the attachment APIs, which then interpolates it into Content-Type/Content-Disposition without stripping CR/LF. The library must be a vulnerable version (below 3.0.6 on the 4.x line's predecessor, below 4.0.2, or any EOL 1.x/2.x release). LIMITING FACTOR: a bare parse-only application that never re-serializes or re-sends the filename is NOT exposed; the flaw only manifests when the untrusted filename is reflected into a newly-constructed outgoing message. The vendor workaround (preg_replace('/[\r\n]+/', ' ', $filename) before use) neutralizes it without upgrading.

Impact

CVSS 3.1 rates this 7.2 (HIGH) with vector AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N - network-reachable, low-complexity, no authentication or user interaction, with a scope change. However, this is a LIBRARY-level flaw whose real-world exploitability is entirely conditional on the consuming application's behavior: it only matters when the host application re-attaches, forwards, or re-sends a MIME message using an attacker-influenced attachment filename (e.g. the result of getFilename() on parsed inbound mail). The PR:N/UI:N metrics reflect the attacker merely sending an email, but the AC:L rating arguably understates the requirement that a downstream app actually reflow the untrusted filename into a newly-constructed outgoing message - a case for AC:H. No EPSS score, no CISA KEV listing, and no public exploit code are present in the provided data, so this is a real-but-not-urgent hardening issue rather than a confirmed active threat. Impact is genuinely limited: C:L/I:L (forged headers such as Bcc can leak a copy of one message or manipulate headers), with A:N. Priority should be MEDIUM - patch in routine cycles, prioritizing any application that programmatically forwards or re-mails parsed messages.

Exploit ScenarioDerived

An attacker sends an inbound email to an application (e.g. a ticketing/helpdesk or auto-forwarding gateway) that parses the message with mail-mime-parser and later re-sends or forwards it, reusing the parsed attachment filename. The attacker crafts a filename containing CRLF sequences plus a forged 'Bcc:' header line, so when the library interpolates the filename into Content-Type/Content-Disposition the forged header is serialized into the outgoing message, silently exfiltrating a copy to the attacker. No public exploit code is identified at time of analysis, and success depends on the consuming application re-serializing the untrusted filename.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 24, 2026

CRLF header injection in zbateson/mail-mime-parser before 3.0.6 and 4.0.2 allows an attacker-influenced attachment filename - including one harvested directly from parsed inbound mail - to be interpolated unescaped into Content-Type and Content-Disposition, so a filename containing \r\n serializes into one or more additional attacker-controlled header lines, for example a forged Bcc: that silently exfiltrates a copy of the outgoing message. Exploitation is limited to PHP applications that use the library to build or forward MIME messages with untrusted filenames (reusing getFilename() output or passing an attacker-supplied name into the attachment APIs); parse-only applications that never re-serialize the filename are not exposed. Per the CVSS vector the issue is network-reachable and requires no authentication or user interaction, no public exploit code was identified at time of analysis, and the vendor has shipped fixes in 3.0.6 and 4.0.2 while the 1.x and 2.x lines are end-of-life and will not be patched.

RemediationAI

Upgrade to a fixed release: 3.0.6 or later on the 3.x line, or 4.0.2 or later on the 4.x line; users on the end-of-life 1.x or 2.x lines must migrate to a supported release line because no patch will be issued for those branches. If upgrading is not immediately possible, the vendor-documented workaround is to neutralize the filename before it reaches the attachment APIs or before any parsed value is reused - strip CR and LF via preg_replace('/[\r\n]+/', ' ', $filename) - and apply the same sanitation to the output of getFilename() before reflecting it into a newly constructed message; note the trade-off that this rewrites the displayed filename (CR/LF sequences collapse to a single space) and must be applied at every sink, since sanitizing only one call site leaves other header-construction paths exposed. Compensating control scoping: applications that only parse inbound messages and never re-serialize the filename are not exposed and can schedule the upgrade normally, whereas applications that re-attach or forward parsed filenames should treat this as urgent and audit for other header-injection sinks (subject lines, arbitrary header setters, other Content-* parameters) that the workaround does not cover. Full details are in the vendor advisory GHSA-36h5-qg4p-q2qf (https://github.com/zbateson/mail-mime-parser/security/advisories/GHSA-36h5-qg4p-q2qf); upgrading remains the preferred remediation because it addresses the encoding logic rather than individual call sites.

Affected VersionsENISA

mail-mime-parser < 3.0.6
mail-mime-parser 4.0.0, < 4.0.2

Affected Packages

composer zbateson/mail-mime-parser fix: 3.0.6, 4.0.2
euvd mail_mime_parser fix: 3.0.6, 4.0.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 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

The library implements an alternative to PHP's imap* functions and Pear mail libraries for reading Internet Message Format (RFC 822/5322) messages, and it also exposes APIs for constructing MIME parts and messages. Root cause is CWE-93, Improper Neutralization of CRLF Sequences ('CRLF Injection', historically 'HTTP Header Injection' generalized to arbitrary header contexts): attachment filenames are written into the parameter values of the Content-Type and Content-Disposition headers - e.g. Content-Disposition: attachment; filename="..." - without first removing carriage-return and line-feed characters. Because RFC 822/5322 headers are line-delimited, an embedded \r\n terminates the intended header and begins a new one, letting the attacker inject arbitrary header fields (a forged Bcc:, Cc:, or other routing/header directives) into the serialized message. The scope-change flag in the CVSS vector (S:C) reflects that the injected content takes effect outside the library's own security scope - in the mail transport/recipient domain where the extra header silently redirects message copies. The affected CPE, cpe:2.3:a:zbateson:mail-mime-parser:*:*:*:*:*:*:*:*, carries no version bounds and therefore matches all releases of the package; the vendor advisory narrows the practical affected range to <3.0.6 on the 3.x line, <4.0.2 on the 4.x line, and the unsupported 1.x/2.x lines. The transitive reach of the package means the vulnerable code typically sits deep inside an application's mail-handling path rather than being invoked directly by end users.

Know when Mail Mime Parser 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

Vendor (GitHub_M) PRIMARY 7.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

Attacker only sends mail (PR:N/UI:N/AV:N), but success depends on a downstream app re-serializing the untrusted filename, so AC:H; injected headers affect a separate mail-delivery context (S:C) leaking/altering one message (C:L/I:L, A:N).

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Sep 24, 2026 - 19:04 EUVD
CVE Published
Sep 24, 2026 - 17:53 cve.org
HIGH 7.2

DescriptionCVE.org

zbateson/mail-mime-parser is a mail mime parser alternative to PHP's imap* functions and Pear libraries for reading messages in Internet Message Format RFC 822. Prior to version 3.0.6 and 4.0.2, CRLF (carriage-return / line-feed) header injection (CWE-93) affecting any application that uses this library to build or forward MIME messages with an attacker-influenced attachment filename. Attachment filenames are interpolated into the Content-Type and Content-Disposition header values without stripping CR/LF, so a filename containing \r\n serializes as one or more additional, attacker-controlled header lines (for example a forged Bcc: that silently exfiltrates a copy of the outgoing message). The untrusted filename can come directly from parsed inbound mail, so no local construction is required - an application that re-attaches or re-sends a parsed filename is exposed. Versions 3.0.6 and 4.0.2 patch the issue. Versions 1.x and 2.x are also affected but are end-of-life and will not receive patches; users on those lines should upgrade to a fixed release. If upgrading is not immediately possible, strip CR and LF from any filename before passing it to attachment APIs, and from the result of getFilename() before reusing it in a constructed message - e.g. preg_replace('/[\r\n]+/', ' ', $filename).

Technical POC Analysis

CWE-93: Improper Neutralization of CRLF Sequences.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

A CRLF header injection flaw in the zbateson/mail-mime-parser PHP library (CVE-2026-61815) allows an attacker-controlled attachment filename to inject extra email headers - such as a forged Bcc - into messages that an application builds or forwards, silently sending copies of outbound business correspondence to an address of the attacker's choosing. Exposure is limited to PHP applications that re-serialize untrusted filenames into MIME output, such as mail-sending, ticketing, CRM, or document-distribution services, while parse-only integrations that never rebuild a message are not affected. Leadership should care because affected systems sit directly on the outbound email path, making the primary risk quiet, persistent disclosure of confidential communications and attachments rather than an outage.

Business Impact: High
Compensating Controls

Apply vendor patch. Where immediate upgrade is not possible, sanitize attachment filenames at the application layer by stripping CR/LF characters and enforcing a strict allowlist of permitted characters before calling the library, avoid re-serializing getFilename() output from inbound untrusted mail, and monitor outbound messages for unexpected or injected headers such as Bcc until the upgrade to 3.0.6 or 4.0.2 is complete.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
popular PHP MIME-parsing Composer library, but only a subset of apps re-send filenames
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy