CVE-2026-129299

mail-parser: Uncaught exceptions and silent header loss in mail-parser on attacker-controlled input

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. Prior to 4.6.2, multiple message-processing behaviors can raise exceptions or silently lose content. Headers colliding with methods such as Parse, Message, and Write_Attachments can place bound method objects into parsed output and raise TypeError when a caller requests JSON serialization such as mail_json. When byte input is parsed through parse_from_bytes(), an 8-bit header value returned as email.header.Header can likewise raise TypeError when an X_raw accessor passes the value to json.dumps; both exceptions are outside the MailParserError hierarchy. Separately, rewritten names such as Subject_json and X_Spam_Flag can be substituted or disappear from mail, headers, and JSON output while has_defects remains false, and a headerless message can be treated as falsy before parser state is initialized, causing body and attachment properties to return empty values without an error signal. These behaviors can abort message processing or hide malicious indicators from downstream scanners. This issue is fixed in version 4.6.2.

Analysis

AI-generated

Technical impact

The mail-parser library parses emails and produces detailed objects for downstream processing. Prior to version 4.6.2, parsing attacker‑controlled input can trigger uncaught exceptions or silently discard header data. When malformed headers collide with internal methods, objects can be inserted into the parsed output, causing TypeErrors during JSON serialization. Byte‑based input can also produce header objects that raise exceptions when exposed through JSON. In addition, rewritten header names might be omitted from the final output, and a headerless message may be treated as falsy, leading to empty body and attachment fields without an error signal. These situations can abort message handling or conceal malicious indicators from scanning tools. The vulnerability does not provide a direct code‑execution path but results in application crashes or failure to detect threat indicators, effectively disrupting mail processing pipelines or allowing undetected malicious content to pass unseen. The security impact is limited to the service that relies on mail-parser to parse inbound mail. An attacker who can supply malicious email content to the parser can cause the application to crash, leading to a denial‑of‑service that may affect mail delivery or analysis, or can hide malicious headers from downstream scanners.

Affected Systems

The affected vendor is SpamScope. The product is the mail-parser library. Versions prior to 4.6.2 are vulnerable; the fix is available in release 4.6.2 and later.

Risk and Exploitability

The CVSS score of 6.5 classifies the issue as medium severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog, so the current exploitation probability is unknown. The likely attack vector is the delivery of crafted email messages to the system that uses mail-parser. Because the exception occurs during message parsing and can result in application termination or loss of header data, an attacker could cause a denial‑of‑service condition or conceal malicious indicators from downstream security tools. No authentication bypass or privilege escalation is described, so the scope is limited to the application runtime environment where the library is executed.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SpamScope mail-parser to version 4.6.2 or later as released by the vendor.
  • Wrap mail-parser calls in robust error handling to catch uncaught TypeError exceptions and prevent application crashes.
  • Validate and sanitize incoming email content before parsing to prevent malformed headers; additionally, monitor logs for parsing errors to detect attacks.

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-24mq-4vc6-2prf mail-parser: Uncaught exceptions and silent header loss in mail-parser on attacker-controlled input
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

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. Prior to 4.6.2, multiple message-processing behaviors can raise exceptions or silently lose content. Headers colliding with methods such as Parse, Message, and Write_Attachments can place bound method objects into parsed output and raise TypeError when a caller requests JSON serialization such as mail_json. When byte input is parsed through parse_from_bytes(), an 8-bit header value returned as email.header.Header can likewise raise TypeError when an X_raw accessor passes the value to json.dumps; both exceptions are outside the MailParserError hierarchy. Separately, rewritten names such as Subject_json and X_Spam_Flag can be substituted or disappear from mail, headers, and JSON output while has_defects remains false, and a headerless message can be treated as falsy before parser state is initialized, causing body and attachment properties to return empty values without an error signal. These behaviors can abort message processing or hide malicious indicators from downstream scanners. This issue is fixed in version 4.6.2.
Title mail-parser: Uncaught exceptions and silent header loss in mail-parser on attacker-controlled input
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, 6:58 PM
Reserved
Nov 13, 2026, 10:30 PM
Status
Received
Published
Nov 16, 2026, 6:17 PM
Modified
Nov 16, 2026, 7:17 PM