Hostile attachment aborts attachment saving in mail-parser
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · Low · 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 4.6.0 before 4.6.3 does not isolate failures when write_attachments() saves each MIME attachment, so one crafted attachment aborts the save loop. An RFC 2231 filename with a NUL byte, an overlong basename, or an undecodable base64 payload raises an exception that stops the batch (CWE-248). A remote attacker can send an email that causes later attachments to go unwritten, which can hide a payload from a downstream scanner that reads only the extraction directory and causes loss of availability.
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.6.0 until 4.6.3, write_attachments() calls _safe_attachment_filename() and write_sample() without isolating failures for individual attacker-controlled MIME parts. An RFC 2231 filename containing a NUL, a basename exceeding NAME_MAX, or an undecodable base64 payload can raise ValueError, OSError, or binascii.Error and abort the entire save loop. Later attachments remain unwritten; when a caller catches only MailParserError, the failure is not surfaced through the expected library-exception path. If a downstream scanner or sandbox reads only the extraction directory, a payload after the crafted part can be missed even though it remains in the delivered message, and the aborted batch also causes availability loss. This issue is fixed in version 4.6.3.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| SpamScope | mail-parser | 4.6.0 to before 4.6.3 | 4.6.3 | Patch available | CNA |
| — | mail-parser (PyPI) | 4.6.0 to before 4.6.3 | 4.6.3 | Patch available | GHSA-8cgq-x343-p74c |
- mail-parser VendorSpamScope Affected 4.6.0 to before 4.6.3 Fixed in 4.6.3 Patch available CNA
- mail-parser (PyPI) Vendor— Affected 4.6.0 to before 4.6.3 Fixed in 4.6.3 Patch available GHSA-8cgq-x343-p74c
Remediation
Upgrade the mail-parser package on PyPI and the SpamScope mail-parser product to version 4.6.3, which fixes the issue.
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-8cgq-x343-p74c mail-parser (PyPI) Fixed in 4.6.3 Advisory →
Timeline
- 2026-11-16 Threatist record created from CVE-2026-129301
- 2026-11-16 Alias added: GHSA-8cgq-x343-p74c
- 2026-11-16 Fix available: PyPI/[email protected] · GHSA-8cgq-x343-p74c
- 2026-11-16 CVSS score added · GHSA-8cgq-x343-p74c
- 2026-11-16 Weakness changed · GHSA-8cgq-x343-p74c
- 2026-11-16 7 new references · GHSA-8cgq-x343-p74c
References
Other 6
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-8cgq-x343-p74c
- https://github.com/SpamScope/mail-parser/pull/171
- https://github.com/SpamScope/mail-parser/commit/11b894a0b8b3f11055a99caff118206138d1daba
- https://github.com/SpamScope/mail-parser/commit/e1d9fe6778045d6e2c44406bc8822e3464c1097f
- https://github.com/SpamScope/mail-parser/releases/tag/4.6.3
- https://github.com/SpamScope/mail-parser
More SpamScope vulnerabilities
- TI-2026-92235 Polynomial ReDoS in mail-parser email header parsing CVSS 3.1HIGH 7.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
- CVE-2026-129301 · CVE Program
- CVE-2026-129301 · NVD
- GHSA-8cgq-x343-p74c · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences