Read the docs

Path traversal in mail-parser lets attackers overwrite files

Priority MEDIUM 44CWE-22Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

mail-parser from 3.8.0 before 4.6.0 is affected. The write_attachments() and write_sample() APIs use attacker-controlled attachment filenames without enough sanitization or path containment checks (CWE-22). A remote attacker can send a crafted email with directory traversal sequences or absolute paths so that an attachment is written outside the intended output directory, overwriting files the parsing process can access if the application extracts attachments. User interaction is required.

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.8.0 until 4.6.0, the write_attachments() and write_sample() APIs use attacker-controlled attachment filenames without sufficient sanitization and path containment validation. Directory traversal sequences and absolute filesystem paths can cause an attachment to be written outside the intended output directory. An attacker can overwrite files accessible to the parsing process when an application extracts attachments from a crafted message. This issue is fixed in version 4.6.0.

Why it matters now

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

SSVC decision points

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

Affected products

VendorProductAffected versionsFixed inStatusSource
SpamScopemail-parser3.8.0 to before 4.6.04.6.0Patch availableCNA
—mail-parser (PyPI)3.8.0 to before 4.6.04.6.0Patch availableGHSA-fr3h-cpq2-9496
  • mail-parser VendorSpamScope Affected 3.8.0 to before 4.6.0 Fixed in 4.6.0 Patch available CNA
  • mail-parser (PyPI) Vendor— Affected 3.8.0 to before 4.6.0 Fixed in 4.6.0 Patch available GHSA-fr3h-cpq2-9496

Remediation

Upgrade mail-parser to version 4.6.0 or later, which fixes the issue for the SpamScope mail-parser package and the PyPI mail-parser package.

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

  • Fix · CNA mail-parser (SpamScope) Fixed in 4.6.0
  • Fix · GHSA-fr3h-cpq2-9496 mail-parser (PyPI) Fixed in 4.6.0 Advisory →

Timeline

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

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-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