Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted email into parsing pipeline
-
ExploitHeader collides with method name or carries 8-bit bytes
-
ExecutionUncaught TypeError on JSON serialization (mail_json/X_raw)
-
ImpactWorker 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
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).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-126573
GHSA-24mq-4vc6-2prf
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB