mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batch
CVE-2026-129301
Impact writeattachments() called safeattachmentfilename() and writesample() inside its loop with no guard, so a single crafted attachment raised out of the whole save. Every attachment after the malicious one was silently never written, with no error surfaced to a caller that catches only MailParserError. That is an evasion primitive as much as an availability bug: a sender puts one poisoned part first and the real payload second, and the payload never reaches the extraction directory that a downstream scanner or sandbox reads — while it still reaches the recipient's mail client intact. The tool's output diverges from the bytes actually in the message, which is the same failure mode as the filename-sanitizing bypass in [GHSA-fr3h-cpq2-9496](https://github.com/SpamScope/mail-parser/security/advisories/GHSA-fr3h-cpq2-9496). Three shapes were reachable, all from attacker-controlled MIME metadata: NUL smuggled through RFC 2231 — filename=us-ascii''evil%00.bin decodes to a NUL in the filename during parsing and raised ValueError out of the name check; overlong basename — a filename longer than NAMEMAX (e.g. 300 characters) raised OSError: File name too long from open(), after creating…
Assessment
- CVSS
- 6.5 (v3.1)
- Severity
- Medium
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 16 November 2026
- Last updated
- 16 November 2026
- Affected
- mail-parser
- Weakness
- CWE-248, CWE-436
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
At the source
References
- https://github.com/SpamScope/mail-parser/security/advisories/GHSA-8cgq-x343-p74c
- https://nvd.nist.gov/vuln/detail/CVE-2026-129301
- 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/advisories/GHSA-8cgq-x343-p74c
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-129301