Skip to main content

mail-mime-parser CVE-2026-121946

| EUVDEUVD-2026-116903 MEDIUM
Improper Neutralization of CRLF Sequences ('CRLF Injection') (CWE-93)
2026-11-04 VulnCheck GHSA-5gqw-c8wj-82xp
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted Content-Type via file upload
  2. Delivery
    App passes value to addAttachmentPart() as $mimeType
  3. Exploit
    CR/LF terminates Content-Type header early
  4. Execution
    Forged Bcc line serialized into built message
  5. Impact
    Message silently blind-copied to attacker

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 the consuming application to pass an attacker-influenced string into one of the message-building methods that build headers without stripping CR/LF: $mimeType or $encoding in IMessage::addAttachmentPart()/addAttachmentPartFromFile(), $charset in setTextPart()/setHtmlPart(), or $micalg/$protocol in setAsMultipartSigned() (affected versions >=3.0.0 up to and including 4.0.5; fixed in 3.0.9 and 4.0.6). The realistic exposure is the MIME type, e.g. a browser-supplied upload Content-Type forwarded as $mimeType. Key limiting factors per the vendor: parsing/processing hostile inbound email does NOT trigger this (header values read from parsed messages never reach this builder code); setRawHeader()/addRawHeader() are explicitly out of scope; and charset, encoding, micalg and protocol are normally chosen by the application, so reaching the flaw through them requires an unusual application design. No exploitation is possible on fixed versions, which replace control characters with a space.

Impact

This is a medium-severity CRLF header-injection flaw (CWE-93) in a PHP library, not a drop-everything emergency. The supplied CVSS 4.0 vector (6.9) encodes AV:N/AC:L/PR:N/UI:N with low integrity/confidentiality impact on both the vulnerable and a subsequent system, consistent with a forged header being delivered into outgoing mail. The vuln.today decision label is 'this_month' (not act_now/emergency), and there is no CISA KEV listing and no EPSS score in the input, so there is no signal of active or widespread exploitation - treat it as a routine-priority patch. A working PoC is published inside the GHSA advisory itself, so exploitability is demonstrated, but PoC availability is not the same as in-the-wild exploitation. The single most important caveat is that the PR:N in the vector overstates real-world exposure: the vendor states explicitly that exploitation requires the consuming application to pass attacker-influenced data into specific message-building methods, and that only the MIME type is a likely untrusted input (e.g. a browser-supplied upload Content-Type) - charset, encoding, micalg and protocol are normally application-chosen and 'require an unusual design' to be attacker-controlled. Parsing hostile email does NOT trigger this. So the realistic risk is confined to applications that build (not just parse) MIME messages using untrusted values.

Exploit ScenarioDerived

A web application lets users upload a file and passes the browser-supplied Content-Type straight into IMessage::addAttachmentPart() as $mimeType. An attacker sets that upload Content-Type to a value containing CRLF followed by 'Bcc: attacker@evil.test', causing the generated Content-Type header to terminate early and a forged Bcc line to be serialized into the outgoing message, silently copying mail to the attacker. A functional PoC demonstrating exactly this (and the charset variant) is published in the vendor's GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 04, 2026

CRLF header injection in the PHP library zbateson/mail-mime-parser (3.0.0 through 4.0.5) lets an attacker who controls a value handed to the message-building helpers inject forged header lines, such as a Bcc, into MIME messages the application generates. The flaw is reachable only when the consuming application forwards attacker-influenced input into addAttachmentPart()/addAttachmentPartFromFile() ($mimeType, $encoding), setTextPart()/setHtmlPart() ($charset) or setAsMultipartSigned() ($micalg, $protocol) - most plausibly an upload's browser-supplied Content-Type; parsing hostile inbound email does not trigger it, and the vendor notes the charset, encoding, micalg and protocol arguments are normally application-chosen, so reaching the bug through them requires unusual design. All requests are unauthenticated per the assessed vector, and fixes are released in 3.0.9 and 4.0.6; the advisory includes a public PoC reference that is not verified as working exploit code, and there is no evidence of active exploitation (not in CISA KEV).

RemediationAI

Vendor-released patch: 4.0.6 for the 4.x line and 3.0.9 for the 3.x line; both replace control characters (\x00-\x1F, \x7F) with a space in the affected header arguments. Upgrade the Composer dependency accordingly - for example composer require zbateson/mail-mime-parser:^4.0.6 or, if pinned to the older major, ^3.0.9 - and consult https://github.com/zbateson/mail-mime-parser/security/advisories/GHSA-gmgm-r6fh-fq6g for the full commit set. If an immediate upgrade is not possible, the vendor's stated workaround is to strip CR and LF (or all control characters) from any externally influenced value before passing it to IMessage::addAttachmentPart(), addAttachmentPartFromFile(), setTextPart(), setHtmlPart() or setAsMultipartSigned(); treat browser-supplied upload Content-Type values as untrusted by default, since that is the argument most likely to carry attacker input. The vendor describes the code change as the complete fix, and no change is required to inbound message parsing because that path never reaches the vulnerable builder code; applications that deliberately pass raw headers through setRawHeader()/addRawHeader() remain their own responsibility and are out of scope.

Affected VersionsENISA

mail-mime-parser 4.0.0 <4.0.6
mail-mime-parser 0.3.0 <3.0.9

Affected Packages

euvd mail_mime_parser fix: 3.0.9, 4.0.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CWE-93 (improper neutralization of CRLF sequences) in the Composer package composer/zbateson/mail-mime-parser, a PHP MIME message parser and builder. The message-building helpers interpolate caller-supplied strings directly into raw header values: MultipartHelper::createContentPartForMimeType() writes "$mimeType;\r\n\tcharset=\"$charset\"" as Content-Type, MultipartHelper::setContentPartForMimeType() writes $charset, MultipartHelper::createAndAddPartForAttachment() writes $mimeType and $encoding, and PrivacyHelper::setMessageAsMultipartSigned() writes $micalg and $protocol into the multipart/signed Content-Type. A CR or LF in any of these ends the generated Content-Type or Content-Transfer-Encoding header early, and the remainder is serialized as additional header lines (for example a forged Bcc, or a second Content-Disposition overriding the intended one). MIME parameter quoting offers no protection because it has no escape for CRLF - a value can close the quote and start a new line. This is an incomplete fix for CVE-2026-61815 (GHSA-36h5-qg4p-q2qf), which sanitized only the attachment filename ($safe) passed to addAttachmentPart(); the other arguments were left raw. Version 4.0.6/3.0.9 adds AbstractHelper::stripControlChars(), which replaces \x00-\x1F and \x7F with a space in $mimeType, $charset, $encoding, $micalg and $protocol before the headers are built, matching the treatment already applied to the filename. The parsing path is unaffected: header values read from a parsed message never pass through this builder code, so processing hostile email does not trigger the flaw, and setRawHeader()/addRawHeader() are explicitly out of scope as documented raw APIs.

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 (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 7.2 HIGH

A remote user can supply the injected value (e.g. upload Content-Type) with no auth or interaction (AV:N/AC:L/PR:N/UI:N); the forged header affects a separate mail system (S:C) with low confidentiality/integrity impact and no availability impact.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

zbateson mail-mime-parser before 3.0.9 and 4.x before 4.0.6 contains a CRLF header injection vulnerability in message-building helpers that fail to strip CR and LF characters. Attackers supplying crafted MIME type, charset, encoding, micalg, or protocol values can inject extra header lines such as a forged Bcc into outgoing messages.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
Medium
widely used PHP email-parsing Composer library, but message-builder path less common
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
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