CVE-2026-129301
Received Received - Intake

mail-parser Unsafe Attachment Handling Flaw

Vulnerability report for CVE-2026-129301, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-16

Last updated on: 2026-11-16

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-16
Last Modified
2026-11-16
Generated
2026-11-16
AI Q&A
2026-11-16
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
mail-parser mail-parser to 4.6.3 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-248 An exception is thrown from a function, but it is not caught.
CWE-436 Product A handles inputs or steps differently than Product B, which causes A to perform incorrect actions based on its perception of B's state.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

The vulnerability in mail-parser versions 4.6.0 to 4.6.3 allows an attacker to craft malicious email attachments that can cause the parser to fail when processing subsequent attachments. This happens because the parser does not isolate failures for individual MIME parts, leading to partial extraction of email contents and potential loss of data.

Detection Guidance

Detecting this vulnerability requires checking the version of mail-parser in use. Run pip show mail-parser to see the installed version. If it is between 4.6.0 and 4.6.3, the system is vulnerable. Additionally, monitor for failed attachment writes or unexpected errors during email parsing.

Impact Analysis

This vulnerability can lead to incomplete email parsing, causing downstream systems to miss important attachments or data. It may also result in availability loss if the parser aborts processing entirely. Attackers could exploit this to hide malicious payloads in emails.

Mitigation Strategies

Upgrade mail-parser to version 4.6.3 or later immediately. Use pip install --upgrade mail-parser to apply the fix. If upgrading is not possible, avoid using mail-parser for untrusted email parsing until patched.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-129301. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...