Read the docs

Uncaught exceptions in mail-parser crash parsing on a crafted Received date

Priority LOW 39CWE-248Published · 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 · Low
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-248.

Summary

mail-parser from 3.7.0 before 4.6.3 fails to handle an out-of-range trailing date in a Received header. The receiveds_format() function in src/mailparser/utils.py catches only TypeError and ValueError, so an OverflowError or OSError raised by an attacker-controlled header escapes the MailParserError hierarchy. A single crafted email can therefore abort the whole message parse, and it may drop a queued batch, through every parse_from_* entry point. An unauthenticated remote attacker can trigger this by sending a crafted email, which is rated medium severity with availability impact.

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 3.7.0 until 4.6.3, receiveds_format() in src/mailparser/utils.py catches only TypeError and ValueError while converting the trailing date of an attacker-controlled Received header. An out-of-range year can cause calendar.timegm() to raise OverflowError, and a sufficiently large timezone offset can cause datetime.fromtimestamp() to raise OSError. These exceptions are outside the MailParserError hierarchy, so one crafted header can abort the entire message parse through every parse_from_* entry point and may drop a queued batch. This issue is fixed in version 4.6.3.

Why it matters now

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

SSVC decision points

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

Affected products

VendorProductAffected versionsFixed inStatusSource
SpamScopemail-parser3.7.0 to before 4.6.34.6.3Patch availableCNA
—mail-parser (PyPI)3.7.0 to before 4.6.34.6.3Patch availableGHSA-xhrq-2mqv-q8wx
  • mail-parser VendorSpamScope Affected 3.7.0 to before 4.6.3 Fixed in 4.6.3 Patch available CNA
  • mail-parser (PyPI) Vendor— Affected 3.7.0 to before 4.6.3 Fixed in 4.6.3 Patch available GHSA-xhrq-2mqv-q8wx

Remediation

Upgrade the PyPI package mail-parser to version 4.6.3, which fixes the issue. The sources list no advisory identifier for this fix beyond the affected and fixed version data.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

  • Fix · CNA mail-parser (SpamScope) Fixed in 4.6.3
  • Fix · GHSA-xhrq-2mqv-q8wx mail-parser (PyPI) Fixed in 4.6.3 Advisory →

Timeline

  1. 2026-11-16 Threatist record created from CVE-2026-129300
  2. 2026-11-16 Alias added: GHSA-xhrq-2mqv-q8wx
  3. 2026-11-16 Fix available: PyPI/[email protected] · GHSA-xhrq-2mqv-q8wx
  4. 2026-11-16 CVSS score added · GHSA-xhrq-2mqv-q8wx
  5. 2026-11-16 Weakness changed · GHSA-xhrq-2mqv-q8wx
  6. 2026-11-16 7 new references · GHSA-xhrq-2mqv-q8wx

References

  • TI-2026-92235 Polynomial ReDoS in mail-parser email header parsing CVSS 3.1HIGH 7.5
  • 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-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