Skip to main content

mail-parser CVE-2026-129299

| EUVDEUVD-2026-126573 MEDIUM
Uncaught Exception (CWE-248)
2026-11-16 GitHub_M GHSA-24mq-4vc6-2prf
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted email into parsing pipeline
  2. Exploit
    Header collides with method name or carries 8-bit bytes
  3. Execution
    Uncaught TypeError on JSON serialization (mail_json/X_raw)
  4. Impact
    Worker crash (DoS) or silent indicator suppression (scanner evasion)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Exception handling completeness
Exploitation Conditions

The target must run mail-parser <= 4.6.1 and parse attacker-supplied messages. For the crash (CWE-248): the application must invoke a JSON accessor - mail_json, mail_partial_json, headers_json, or any X_raw accessor - and the message must either contain a header named after a real class attribute (confirmed names: Parse, Message, Write_Attachments, From_File, From_File_Obj, From_File_Msg, From_String, From_Bytes, Get_Server_Ipaddress), which places a bound method into the parsed dict, or (via parse_from_bytes(), the normal off-the-wire entry point) carry a raw 8-bit header value that compat32 returns as email.header.Header. For the evasion/silent-loss effect (CWE-436): a header whose name contains an underscore or ends in a _json/_raw suffix (e.g. Subject_json, X_Spam_Flag), or a message with no headers at all. No authentication and no user interaction are required (PR:N/UI:N). Limiting factors: the crash only fires if the pipeline actually calls the JSON/_raw accessors, and the evasion only matters if downstream security logic trusts mail-parser's parsed output for indicator scanning; both exceptions fall outside the MailParserError hierarchy, so callers catching only mail-parser exceptions will not contain them.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L, base 6.5 Medium) describes a remotely reachable, unauthenticated, low-complexity flaw with no confidentiality impact and only partial integrity and availability impact - consistent with the two documented effects: an uncaught TypeError that kills a parsing worker (availability) and silent header substitution/loss that hides indicators from downstream scanners (integrity). The vuln.today decision label is 'this_month' rather than act_now/emergency, which matches the signal picture: no CISA KEV entry (not confirmed actively exploited) and no EPSS score supplied, so there is no evidence of widespread or targeted in-the-wild use. However, the GHSA advisory publishes minimal, deterministic reproduction snippets (a 12-byte email triggers the method-collision crash; benign non-ASCII mail via parse_from_bytes() triggers the Header crash), so triggering is trivial once an attacker can deliver a message into a pipeline that calls mail_json/headers_json/X_raw. Net: this is a genuine but bounded priority - real, easily reproducible DoS and a concrete scanner-evasion primitive against mail-processing pipelines, but limited blast radius (no code execution, no data disclosure, single-worker crash). No conflicting signals in the vector itself; the main missing datum is EPSS, and KEV absence means exploitation is reproducible-in-lab but not confirmed operational.

Exploit ScenarioDerived

An attacker emails a crafted message into a service that uses mail-parser (e.g. an anti-spam, DLP, or forensic pipeline). A header named after a bound method such as 'Parse' or an 8-bit header value delivered via parse_from_bytes() causes an uncaught TypeError the moment the service requests JSON (mail_json / X_raw), killing the worker; alternatively a header like 'Subject_json' or 'X_Spam_Flag' makes a malicious C2 URL silently vanish from parsed output while has_defects stays false, so downstream scanners see nothing. The GHSA advisory includes working minimal reproduction snippets, so exploitation requires only sending mail - AV:N/AC:L/PR:N/UI:N means no authentication or user interaction.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 16, 2026

SpamScope mail-parser through 4.6.1 resolves sender-chosen header names through Python attribute lookup, so a message carrying a header named after a real class member (Parse, Message, Write_Attachments, From_File, From_File_Obj, From_File_Msg, From_String, From_Bytes, Get_Server_Ipaddress) places a bound method into the parsed dict and any JSON accessor such as mail_json or X_raw then raises an uncaught TypeError, terminating the parsing worker; a 12-byte message suffices, and the same crash fires on benign 8-bit headers parsed via parse_from_bytes() because compat32 returns an email.header.Header object. In the same code path, header names containing underscores or ending in _json/_raw are folded or reinterpreted before lookup, so values like Subject_json or X_Spam_Flag are substituted or dropped from mail, headers and JSON output while has_defects stays false, and a headerless message is treated as falsy so body and attachments return empty strings with no error. Remote, unauthenticated and low-complexity (CVSS 3.1 6.5 Medium, AV:N/AC:L/PR:N/UI:N), the issue matters mainly for mail-scanning pipelines that trust parsed output for indicator detection; reproduction snippets are published in the upstream advisory, which constitutes a public PoC reference that is not verified as working exploit code, and no confirmed active exploitation is available. Fixed in 4.6.2.

RemediationAI

Vendor-released patch: upgrade to mail-parser 4.6.2 (pip install --upgrade mail-parser), per the release at https://github.com/SpamScope/mail-parser/releases/tag/4.6.2 and the fix in https://github.com/SpamScope/mail-parser/pull/167 (commit ce3cf3559db1ff806bda598b378de9f8c2a5be96); the vendor states the advisory's fix is complete at that version, with updated behavior that header names are preserved as sent, 8-bit values are coerced to str, parser state is initialized before the message check, and X_raw returns [] for an absent header instead of null - pipelines asserting on null must be adjusted. No workaround exists for the silent header loss or substitution, so upgrading is the only complete remedy there. For teams that cannot upgrade immediately, the vendor's only stated mitigation targets the uncaught exceptions: wrap mail_json, mail_partial_json, headers_json and every X_raw access in a bare except Exception rather than catching only MailParserError subclasses, which contains the worker-killing TypeError but leaves the evasion primitive fully in place and forces you to decide how to alert on a parse that failed.

Affected VersionsENISA

mail-parser < 4.6.2

Affected Packages

pypi mail-parser fix: 4.6.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

mail-parser wraps Python's email package and exposes every header as an attribute through MailParser.__getattr__, and its _make_mail and headers builders iterate message.keys() calling getattr(self, name) with a name the sender controls. Because Python resolves real class attributes before __getattr__, that reflected dispatch lets a sender pick which attribute is read: a colliding name yields a bound method object in the output that json.dumps cannot serialize, raising a TypeError outside the MailParserError hierarchy (CWE-248, uncaught exception). A second trigger of the same class comes from the compat32 policy, which returns an email.header.Header rather than a str for 8-bit header bytes and is passed straight through the _raw accessor to json.dumps. The integrity half of the advisory is an interpretation conflict (CWE-436): header names were normalized before lookup, folding underscores to dashes and interpreting _json/_raw suffixes, so genuine headers such as Subject_json or X_Spam_Flag were reported with another header's value or resolved to nothing while has_defects remained false, letting parsed output diverge from the bytes actually in the message. A related edge case is email.message.Message.__len__ returning the header count, which makes a headerless message falsy; parse() returned before initializing state, unset attributes were answered by __getattr__ as absent headers, and properties documented to return dict and list (mail, attachments) returned empty strings. The advisory also tags CWE-407 and CWE-754, and the upstream commit introduces a lowercased header index (_build_header_index) plus literal lookup via _header_value() to remove the O(distinct names x total bytes) rescan as well as the collision surface.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
vuln.today AI 6.5 MEDIUM

Crafted email is remote, unauthenticated and low-complexity (AV:N/AC:L/PR:N/UI:N); an uncaught exception crashes a single worker (A:L) and header substitution tampers scan output (I:L); no data is disclosed (C:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Nov 16, 2026 - 19:02 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Low
niche Python email-forensics/anti-spam parsing library, specialized deployments
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy