CVE-2026-129301
CVE-2026-129301 · mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batch
CVSS 6.5 · Medium · EPSS 0.5% · Fix available
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- mail-parserNo fix published
- mail-parser PyPIUpdate to 4.6.3
Check the installed version:
pip show mail-parserAssess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Stack: python
Affected products and versions
mail-parser
- Versions
- >= 4.6.0, < 4.6.3: Affected
No fix published
mail-parser PyPI
- Versions
- 4.6.0
- 4.6.1
- 4.6.2
- Affected ranges
- ECOSYSTEM: ≥ 4.6.0, < 4.6.3
Update to 4.6.3
Original sources
- 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://nvd.nist.gov/vuln/detail/CVE-2026-129301