CVE Feed
6.5 Medium

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

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
Before you submit *

Query this programmatically

Agents can read this through the MCP endpoint, or over HTTP:

curl https://cve.zerocrew.in/api/cve/CVE-2026-129301