CVE-2026-129301 mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batch
Crafted email attachments can abort mail-parser's attachment save, leaving malicious content undetected for downstream scanners.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Harmful if only installed
- No
- Needs a specific call
- Yes
- Fix
- Available
What is CVE-2026-129301?
CVE-2026-129301 is a medium-severity denial of service vulnerability in SpamScope mail-parser, published on 16 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.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.
Which versions are affected by CVE-2026-129301?
1 open source package ship an affected version, including mail-parser.
An affected version is only exploitable if your software calls write_attachments(), _safe_attachment_filename() or write_sample(). Many projects that include it are not exposed.
| Package | Affected | Fixed in |
|---|---|---|
mail-parser PyPIpkg:pypi/mail-parser | From 4.6.0 | 4.6.3 |
Status by vendor (1)
| Who | Release | Status | Packages |
|---|---|---|---|
| Upstream | fixed | mail-parser (4.6.3) |
How do I fix CVE-2026-129301?
Upgrade mail-parser to 4.6.3 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-129301 being exploited?
There is no known exploitation of CVE-2026-129301 in the wild and no public exploit code.
Sources
Also known as GHSA-8cgq-x343-p74c.