mail-parser: Uncaught exceptions and silent header loss in mail-parser on attacker-controlled input
CVE-2026-129299Published 16 Nov 2026, 17:43 UTC
Real-world risk
2.6/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.5
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
mail-parser is a tool that parses emails by enhancing the Python standard library and extracting message details into a comprehensive object. Prior to 4.6.2, multiple message-processing behaviors can raise exceptions or silently lose content. Headers colliding with methods such as Parse, Message, and Write_Attachments can place bound method objects into parsed output and raise TypeError when a caller requests JSON serialization such as mail_json. When byte input is parsed through parse_from_bytes(), an 8-bit header value returned as email.header.Header can likewise raise TypeError when an X_raw accessor passes the value to json.dumps; both exceptions are outside the MailParserError hierarchy. Separately, rewritten names such as Subject_json and X_Spam_Flag can be substituted or disappear from mail, headers, and JSON output while has_defects remains false, and a headerless message can be treated as falsy before parser state is initialized, causing body and attachment properties to return empty values without an error signal. These behaviors can abort message processing or hide malicious indicators from downstream scanners. This issue is fixed in version 4.6.2.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| mail-parserNiche | < 4.6.2 | 4.6.2 |
What to do
Update to a fixed version: 4.6.2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.4% chance of exploitation in 30 days (percentile 31), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together1.000
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 1 × threat 0.852.550
- Rounded to one decimal between 0.1 and 102.6
Exploitation and evidence timeline
- 16 Nov 2026 Published
- 3 Dec 2026 Risk 2.6 (cvss fallback)
Weakness
CWE-248, CWE-436
References
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-24mq-4vc6-2prfvendor-advisory
- https://github.com/SpamScope/mail-parser/pull/167misc
- https://github.com/SpamScope/mail-parser/commit/ce3cf3559db1ff806bda598b378de9f8c2a5be96misc
- https://github.com/SpamScope/mail-parser/releases/tag/4.6.2misc
- CVE-2026-129299 on CVE.org