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.
Severity (CVSS)
| Base score | 7.5 |
|---|---|
| Severity | High |
| Version | CVSS 3.1 |
| Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Provided by | CNA |
Weaknesses
- CWE-1333 — CWE-1333: Inefficient Regular Expression Complexity
Affected products
| Vendor | Product | Versions |
|---|---|---|
| SpamScope | mail-parser | >= 4.2.0, < 4.6.1 [affected] |
References
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-r7w7-vpq8-c5vv (x_refsource_CONFIRM)
- https://github.com/SpamScope/mail-parser/pull/166 (x_refsource_MISC)
- https://github.com/SpamScope/mail-parser/commit/037293158cb291caa96635a54449243d32cd4d96 (x_refsource_MISC)
- https://github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6bf2489464 (x_refsource_MISC)
- https://github.com/SpamScope/mail-parser/commit/85e53f820d78ae7c955dafbbcd0e20989a735c2c (x_refsource_MISC)
- https://github.com/SpamScope/mail-parser/releases/tag/4.6.1 (x_refsource_MISC)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 17 Nov 2026 08:04 UTC.