Read the docs

Polynomial ReDoS in mail-parser email header parsing

Priority MEDIUM 48CWE-1333Published · Updated

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

Fix Fixed mail-parser (SpamScope): 4.6.1mail-parser (PyPI): 4.6.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
SpamScopemail-parser4.2.0 to before 4.6.14.6.1Patch availableCNA
—mail-parser (PyPI)4.2.0 to before 4.6.14.6.1Patch availableGHSA-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

  1. 2026-11-16 Threatist record created from CVE-2026-129295
  2. 2026-11-16 Alias added: GHSA-r7w7-vpq8-c5vv
  3. 2026-11-16 Fix available: PyPI/[email protected] · GHSA-r7w7-vpq8-c5vv
  4. 2026-11-16 CVSS score added · GHSA-r7w7-vpq8-c5vv
  5. 2026-11-16 Weakness changed · GHSA-r7w7-vpq8-c5vv
  6. 2026-11-16 8 new references · GHSA-r7w7-vpq8-c5vv

References

  • 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