PT-2026-148362
CVE-2026-129301
·
Published
2026-11-16
·
Updated
2026-11-16
Description by
CVSS 3.1
6.5
MediumMetricsAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Name of the Vulnerable Software and Affected Versions
mail-parser versions 4.6.0 through 4.6.2
Description
The
write attachments() function calls safe attachment filename() and write sample() without isolating failures for individual attacker-controlled MIME parts. This allows a crafted attachment to trigger a ValueError, OSError, or binascii.Error, which aborts the entire save loop. Consequently, any subsequent attachments in the message are not written to the extraction directory. This behavior can be used as an evasion technique to hide malicious payloads from downstream scanners or sandboxes that only analyze the extracted files, while the payload remains intact for the recipient's mail client. The issue can be triggered via a NUL character smuggled through RFC 2231, an overlong basename exceeding NAME MAX, or an undecodable base64 payload.Recommendations
Update mail-parser to version 4.6.3.
As a temporary workaround, avoid calling
write attachments() on untrusted mail; instead, iterate through parser.attachments and write each attachment within its own try/except Exception block, skipping those where safe filename is None. Found an issue in the description? Have something to add? Feel free to write us 👾