mail-parser is vulnerable to polynomial ReDoS in email header parsing
CVE-2026-129295Published 16 Nov 2026, 17:32 UTC
Real-world risk
3.4/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
7.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. From 4.2.0 until 4.6.1, attacker-controlled email headers can cause polynomial regular-expression backtracking during ordinary parse_from_string(), parse_from_bytes(), or parse_from_file() calls. In src/mailparser/utils.py, get_addresses() invokes the _ADDR_FALLBACK_RE fallback when strict address parsing yields no usable address, and overlapping quantifiers rescan padded address headers quadratically or cubically. In src/mailparser/const.py, parse_received() applies _CLAUSE_SPLITTER to uncollapsed whitespace in a Received header, causing quadratic backtracking when a whitespace run is not followed by a clause keyword. A small, well-formed message can keep mail gateway, ticketing, quarantine, or archival parsing workers busy for extended periods. This issue is fixed in version 4.6.1.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| mail-parserNiche | >= 4.2.0, < 4.6.1 | 4.6.1 |
What to do
Update to a fixed version: 4.6.1.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Denial of serviceCrash or resource exhaustion only | From the CVSS vector | 0.40 |
| 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.5% chance of exploitation in 30 days (percentile 46), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together1.000
- Threat T1: Nothing known0.850
- 10 × impact 0.4 × prerequisites 1 × threat 0.853.400
- Rounded to one decimal between 0.1 and 103.4
Exploitation and evidence timeline
- 16 Nov 2026 Published
- 3 Dec 2026 Risk 3.4 (cvss fallback)
Weakness
CWE-1333
References
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vvvendor-advisory
- https://github.com/SpamScope/mail-parser/pull/166misc
- https://github.com/SpamScope/mail-parser/commit/037293158cb291caa96635a54449243d32cd4d96misc
- https://github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6bf2489464misc
- https://github.com/SpamScope/mail-parser/commit/85e53f820d78ae7c955dafbbcd0e20989a735c2cmisc
- https://github.com/SpamScope/mail-parser/releases/tag/4.6.1misc
- CVE-2026-129295 on CVE.org