CVE-2026-129295
mail-parser is a tool that parses emails by enhancing the Python …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/SpamScope/mail-parser/commit/037293158cb291caa96635a54449243d32cd4d96
- github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6bf2489464
- github.com/SpamScope/mail-parser/commit/85e53f820d78ae7c955dafbbcd0e20989a735c2c
- github.com/SpamScope/mail-parser/pull/166
- github.com/SpamScope/mail-parser/releases/tag/4.6.1
- github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vv
- nvd.nist.gov/vuln/detail/CVE-2026-129295
- github.com/advisories/GHSA-r7w7-vpq8-c5vv
- nvd.nist.gov/vuln/detail/CVE-2026-129295
- cve.org/CVERecord?id=CVE-2026-129295
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.