CVE-2026-129295
High 7.5No known exploitationFix availablemail-parser is vulnerable to polynomial ReDoS in email header parsing
Vendor advisory: GHSA-r7w7-vpq8-c5vv
Record last updated
CVSS score
High on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 43% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
Description
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.
Weakness: CWE-1333
Patching and mitigation
- Patch status
- Fix available (source: GitHub Advisory Database)
- Fix documented (source date)
- Mitigation
- None documented
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| SpamScope | mail-parser | >= 4.2.0, < 4.6.1 | Not documented | CVE Program |
| pip | mail-parser | from 4.2.0 before 4.6.1 | 4.6.1 | GitHub Advisory Database |
Timeline
Disclosure
CVE record published by GitHub_M
Source: CVE Program (opens in a new tab)
Patch
Fix documented by GitHub Advisory Database
Vendor guidance and references
- https://github.com/SpamScope/mail-parser/commit/037293158cb291caa96635a54449243d32cd4d96 (opens in a new tab)x_refsource_misc
- https://github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6bf2489464 (opens in a new tab)x_refsource_misc
- https://github.com/SpamScope/mail-parser/commit/85e53f820d78ae7c955dafbbcd0e20989a735c2c (opens in a new tab)x_refsource_misc
- https://github.com/SpamScope/mail-parser/pull/166 (opens in a new tab)x_refsource_misc
- https://github.com/SpamScope/mail-parser/releases/tag/4.6.1 (opens in a new tab)x_refsource_misc
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vv (opens in a new tab)x_refsource_confirm
- GitHub Advisory GHSA-r7w7-vpq8-c5vv (opens in a new tab)github-advisory