PyPI
CVE-2026-129299
mail-parser: Uncaught exceptions and silent header loss in mail-parser on attacker-controlled input
- Severity
- Medium 6.5
- Published
- 16 Nov 2026
- Last changed
- 16 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 4.6.2
- Exploit chance
- 0.4% in the next 30 daysHigher than 29% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Change some data · Slow it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L- Also known as
- GHSA-24mq-4vc6-2prf
- Sources
- OSV.dev and GitHub
Description
Two effects, sharing the root cause of Advisory 1 — header names chosen by the sender were resolved through Python attribute lookup and rewritten before lookup.
Uncaught exceptions. A crafted message raises an exception that is outside the MailParser* hierarchy, so a caller catching only mail-parser exceptions does not catch it and the worker dies.
Header named after a method (CWE-248, reported by @iam-niranjan). Python resolves real class attributes before getattr, so a header named after a method put a bound method object into the parsed mail dict. A 12-byte email is sufficient. Nine colliding names were confirmed: Parse, Message, Write_Attachments, From_File, From_File_Obj, From_File_Msg, From_String, From_Bytes, Get_Server_Ipaddress. Also reproducible from the CLI (mail-parser -f evil.eml -j).
Header carrying 8-bit bytes (CWE-248). For a header containing raw 8-bit bytes, Python's compat32 policy returns an email.header.Header rather than a str, which the _raw accessor passed…
Workarounds
None for the data loss. For the uncaught exceptions, callers who cannot upgrade should wrap mail_json, mail_partial_json, headers_json and any X_raw access in a bare except Exception rather than catching only MailParserError subclasses.
Affected software
| Software | Affected versions |
|---|---|
mail-parserPyPI · osv:PyPI:mail-parser |
|
About mail-parser
- Weekly downloads (PyPI)
- 1,447,533PyPI Stats, 24 Nov 2026
Vulnerabilities in mail-parser
- In our list
- 6
- Published in the last 12 months
- 6
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-129301mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batchMedium 6.5 16 Nov 2026
- CVE-2026-129300mail-parser: Uncaught `OverflowError` / `OSError` on an out-of-range `Received` dateMedium 5.3 16 Nov 2026
- CVE-2026-129297mail-parser: Sender IP address spoofing in get_server_ipaddress()High 7.5 16 Nov 2026
- CVE-2026-129295mail-parser is vulnerable to polynomial ReDoS in email header parsingHigh 7.5 16 Nov 2026
- CVE-2026-129296mail-parser: Path Traversal vulnerability in attachment extractionMedium 6.5 16 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-129299
- GitHub Advisory Database https://github.com/advisories/GHSA-24mq-4vc6-2prf