CVE-2026-129301

mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batch

Published Nov 16, 2026 CVSS 3.1 · 6.5 Medium EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

From versions 4.6.0 through 4.6.2 the mail-parser library fails to isolate errors when processing MIME parts. A single malicious attachment containing a NULL byte, an overly long name, or an undecodable base64 payload triggers an exception that aborts the entire write_attachments loop. Subsequent attachments are never saved, and the error is not surfaced through the expected MailParserError path. As a result, a downstream scanner that only inspects the extraction directory may miss malicious payloads, while the aborted batch also causes a loss of functionality.

Affected Systems

The affected product is SpamScope mail-parser versions 4.6.0, 4.6.1, and 4.6.2. Version 4.6.3 includes the fix and effectively removes the flaw.

Risk and Exploitability

The CVSS score of 6.5 places the flaw in the medium severity range. No EPSS data is available, and the vulnerability is not listed in CISA KEV. An attacker who can deliver a crafted email to a system that uses mail-parser can exploit the flaw to silently drop attachments and potentially evade detection. The attack requires the ability to control the email content, which may be feasible in many mail processing environments.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SpamScope mail-parser to version 4.6.3 or later.
  • Sanitize and validate attachment filenames and payloads before calling write_attachments, ensuring that failures do not abort the entire loop.
  • Consider implementing monitoring of the extraction directory to detect missing attachments and flag unexpected aborts.

Generated by OpenCVE AI on November 16, 2026 at 19:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-8cgq-x343-p74c mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batch
History
Type Values Removed Values Added
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.
Title mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batch
Weaknesses CWE-248
CWE-436
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L'}

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 16, 2026, 5:47 PM
Reserved
Nov 13, 2026, 10:30 PM
Status
Received
Published
Nov 16, 2026, 6:17 PM
Modified
Nov 16, 2026, 6:17 PM