CVE-2026-129299
### Impact 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`). ```python import mailparser mailparser.parse_from_string("Parse: x\r\n\r\n").mail_json # 4.6.1 -> TypeError: Object of type method is not JSON serializable # 4.6.2 -> {"parse": "x", "has_defects": false} ``` *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 straight to `json.dumps`. This fires on entirely benign non-ASCII mail via `parse_from_bytes()`, the normal entry point for mail off the wire. ```python import mailparser mailparser.parse_from_bytes(b"Subject: caf\xe9\r\n\r\nbody\r\n").subject_raw # 4.6.1 -> TypeError: Object of type Header is not JSON serializable # 4.6.2 -> '["caf�"]' ``` **Silent loss of message content** (CWE-436). A sender can make a header's value vanish from every output surface, or be replaced by a different header's value, with `has_defects` remaining `false`. This is an evasion primitive: the tool's output diverges from the bytes actually in the message, and a pipeline scanning parsed output for indicators sees nothing and no failure signal. Head
Properties
- Summary
- mail-parser: Uncaught exceptions and silent header loss in mail-parser on attacker-controlled input
- Severity
- medium
- Nvd fetched at
- 2026-11-16T22:44:16.771339+00:00
- Cvss score
- 6.5
- Cvss severity
- MEDIUM
- Retrieved at
- 2026-11-16T22:45:19+00:00
- Ghsa published
- 2026-11-16T22:12:51Z
- Source url
- https://github.com/advisories/GHSA-24mq-4vc6-2prf
- Ghsa updated
- 2026-11-16T22:12:52Z
- Ghsa id
- GHSA-24mq-4vc6-2prf
- Last source
- GitHub Advisory Database
- Score
- 6.5
- Cvss version
- 3.1
- Cve id
- CVE-2026-129299
- Cvss vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
- First seen by Signal
- 2026-11-16T18:35:21+00:00
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
- Published at
- 2026-11-16T18:17:30.787
- Last modified
- 2026-11-16T19:17:40.623
Related Entities (4)
HAS_WEAKNESS (2)
AFFECTS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph