CVE-2026-129299 mail-parser: Uncaught exceptions and silent header loss in mail-parser on attacker-controlled input
Attacker-controlled email headers can crash mail-parser or hide malicious content from downstream scanners; apps parsing untrusted mail should care.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Harmful if only installed
- No
- Needs a specific call
- Yes
- Fix
- Available
What is CVE-2026-129299?
CVE-2026-129299 is a medium-severity denial of service vulnerability in SpamScope mail-parser, published on 16 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-129299?
1 open source package ship an affected version, including mail-parser.
An affected version is only exploitable if your software calls parse_from_bytes, X_raw or json.dumps. Many projects that include it are not exposed.
| Package | Affected | Fixed in |
|---|---|---|
mail-parser PyPIpkg:pypi/mail-parser | All versions | 4.6.2 |
Status by vendor (1)
| Who | Release | Status | Packages |
|---|---|---|---|
| Upstream | fixed | mail-parser (4.6.2) |
How do I fix CVE-2026-129299?
Upgrade mail-parser to 4.6.2 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-129299 being exploited?
There is no known exploitation of CVE-2026-129299 in the wild and no public exploit code.
Sources
Also known as GHSA-24mq-4vc6-2prf.