CVE-2026-129295
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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Mitigation details
CVE-2026-129295 NameCVE-2026-129295 Descriptionmail-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…
CVE-2026-129295
| Name | CVE-2026-129295 |
| 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| mail-parser (PTS) | forky | 4.10.0-1 | fixed |
| sid | 4.11.0-1 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| mail-parser | source | (unstable) | (not affected) |
Notes
- mail-parser <not-affected> (Fixed before initial upload to Debian)
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/5aab122f0d763991604d2c2bcc807c6bf2489464 (4.6.1)
Apply commands
- mail-parser <not-affected> (Fixed before initial upload to Debian)https://github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vvhttps://github.com/SpamScope/mail-parser/pull/166https://github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6bf2489464 (4.6.1)
OS impact
Debian Fixed 2 releases
| Version | Package | Status | Fixed in |
|---|---|---|---|
| sid | mail-parser |
Not affected | — |
| forky | mail-parser |
Not affected | — |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| PyPI | mail-parser | >= 4.2.0, < 4.6.1 | 4.6.1 |
| PyPI | mail-parser | >=4.2.0,<4.6.1 | 4.6.1 |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| spamscope | mail-parser | >= 4.2.0, < 4.6.1 | |
References
- 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/pull/166
- https://github.com/SpamScope/mail-parser/releases/tag/4.6.1
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vv
- https://nvd.nist.gov/vuln/detail/CVE-2026-129295
- https://github.com/advisories/GHSA-r7w7-vpq8-c5vv
- https://github.com/SpamScope/mail-parser
- https://security-tracker.debian.org/tracker/CVE-2026-129295
CWEs
CWE-1333
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.