CVE-2026-129295
CVE-2026-129295 · mail-parser is vulnerable to polynomial ReDoS in email header parsing
CVSS 7.5 · High · EPSS 0.7% · Fix available
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- mail-parserNo fix published
- mail-parser PyPIUpdate to 4.6.1
Check the installed version:
pip show mail-parserAssess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Stack: python
Affected products and versions
mail-parser
- Versions
- >= 4.2.0, < 4.6.1: Affected
No fix published
mail-parser PyPI
- Versions
- 4.2.0
- 4.2.1
- 4.3.0
- 4.4.0
- 4.5.0
- 4.6.0
- Affected ranges
- ECOSYSTEM: ≥ 4.2.0, < 4.6.1
Update to 4.6.1
Original sources
- 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://nvd.nist.gov/vuln/detail/CVE-2026-129295