mail-parser is vulnerable to polynomial ReDoS in email header parsing
Summary
| CVE | CVE-2026-129295 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-16 18:17:30 UTC |
| Updated | 2026-11-16 18:17:30 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 7.5 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Problem Types: CWE-1333 | CWE-1333 CWE-1333: Inefficient Regular Expression Complexity
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| 3.1 | CNA | DECLARED | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | SpamScope | Mail-parser | affected >= 4.2.0, < 4.6.1 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6b... | [email protected] | github.com | |
| github.com/SpamScope/mail-parser/releases/tag/4.6.1 | [email protected] | github.com | |
| github.com/SpamScope/mail-parser/pull/166 | [email protected] | github.com | |
| github.com/SpamScope/mail-parser/commit/85e53f820d78ae7c955dafbbcd0e2098... | [email protected] | github.com | |
| github.com/SpamScope/mail-parser/commit/037293158cb291caa96635a54449243d... | [email protected] | github.com | |
| github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vv | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.