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

Summary

CVECVE-2026-129301
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-16 18:17:31 UTC
Updated2026-11-16 18:17:31 UTC
Descriptionmail-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.

Risk And Classification

Primary CVSS: v3.1 6.5 MEDIUM from [email protected]

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Problem Types: CWE-248 | CWE-436 | CWE-248 CWE-248: Uncaught Exception | CWE-436 CWE-436: Interpretation Conflict


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary6.5MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
3.1CNADECLARED6.5MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA SpamScope Mail-parser affected >= 4.6.0, < 4.6.3 Not specified

References

ReferenceSourceLinkTags
github.com/SpamScope/mail-parser/pull/171 [email protected] github.com
github.com/SpamScope/mail-parser/commit/e1d9fe6778045d6e2c44406bc8822e34... [email protected] github.com
github.com/SpamScope/mail-parser/commit/11b894a0b8b3f11055a99caff1182061... [email protected] github.com
github.com/SpamScope/mail-parser/security/advisories/GHSA-8cgq-x343-p74c [email protected] github.com
github.com/SpamScope/mail-parser/releases/tag/4.6.3 [email protected] github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report