Polynomial ReDoS in mail-parser email header parsing
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-1333.
Summary
mail-parser from 4.2.0 before 4.6.1 is affected. Attacker-controlled email headers cause polynomial regular-expression backtracking (CWE-1333) during ordinary parsing, because overlapping quantifiers in the address fallback regex and the Received clause splitter rescan whitespace and padded headers. A remote attacker needs only to send a small, well-formed message, which can keep mail gateway, quarantine or archival parsing workers busy for extended periods.
Written with Claude Haiku 5.5 from the sources below · 2026-11-16
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| SpamScope | mail-parser | 4.2.0 to before 4.6.1 | 4.6.1 | Patch available | CNA |
| — | mail-parser (PyPI) | 4.2.0 to before 4.6.1 | 4.6.1 | Patch available | GHSA-r7w7-vpq8-c5vv |
- mail-parser VendorSpamScope Affected 4.2.0 to before 4.6.1 Fixed in 4.6.1 Patch available CNA
- mail-parser (PyPI) Vendor— Affected 4.2.0 to before 4.6.1 Fixed in 4.6.1 Patch available GHSA-r7w7-vpq8-c5vv
Remediation
Upgrade mail-parser to version 4.6.1, which fixes the issue for both the SpamScope and PyPI entries.
Written with Claude Haiku 5.5 from the sources below · 2026-11-16
- Fix · CNA mail-parser (SpamScope) Fixed in 4.6.1
- Fix · GHSA-r7w7-vpq8-c5vv mail-parser (PyPI) Fixed in 4.6.1 Advisory →
Timeline
- 2026-11-16 Threatist record created from CVE-2026-129295
- 2026-11-16 Alias added: GHSA-r7w7-vpq8-c5vv
- 2026-11-16 Fix available: PyPI/[email protected] · GHSA-r7w7-vpq8-c5vv
- 2026-11-16 CVSS score added · GHSA-r7w7-vpq8-c5vv
- 2026-11-16 Weakness changed · GHSA-r7w7-vpq8-c5vv
- 2026-11-16 8 new references · GHSA-r7w7-vpq8-c5vv
References
Other 7
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vv
- https://github.com/SpamScope/mail-parser/pull/166
- https://github.com/SpamScope/mail-parser/commit/037293158cb291caa96635a54449243d32cd4d96
- https://github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6bf2489464
- https://github.com/SpamScope/mail-parser/commit/85e53f820d78ae7c955dafbbcd0e20989a735c2c
- https://github.com/SpamScope/mail-parser/releases/tag/4.6.1
- https://github.com/SpamScope/mail-parser
More SpamScope vulnerabilities
- TI-2026-92240 Hostile attachment aborts attachment saving in mail-parser CVSS 3.1MEDIUM 6.5
- TI-2026-92236 Path traversal in mail-parser lets attackers overwrite files CVSS 3.1MEDIUM 6.5
- TI-2026-92239 Uncaught exceptions in mail-parser crash parsing on a crafted Received date CVSS 3.1MEDIUM 5.3
- TI-2026-92237 Sender IP spoofing in mail-parser get_server_ipaddress() CVSS 3.1HIGH 7.5
- TI-2026-92238 Uncaught exceptions and silent header loss in mail-parser CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-129295 · CVE Program
- CVE-2026-129295 · NVD
- GHSA-r7w7-vpq8-c5vv · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences