CVE-2026-129300: mail-parser: Uncaught `OverflowError` / `OSError` on an out-of-range `Received` date
Published 2026-11-16 · Updated 2026-11-16 · Also known as GHSA-xhrq-2mqv-q8wx
Summary
The mail-parser library fails to catch `OverflowError` and `OSError` exceptions when processing malformed or out-of-range `Received` header dates, leading to an uncaught exception that aborts message parsing. Engineering teams processing untrusted emails using versions 3.7.0 through 4.6.2 should upgrade immediately.
Who is affected
Applications utilizing PyPI package mail-parser versions 3.7.0 up to 4.6.2 are vulnerable to denial of service via message parsing failure. Because the `Received` header is fully attacker-controlled, a single malformed email containing an out-of-range year or large timezone offset will cause all entry points (`parse_from_string`, `parse_from_bytes`, `parse_from_file`, `parse_from_file_obj`, and the CLI) to raise an unhandled exception, causing message processing pipelines to drop the message or batch.
Exploitability
The vulnerability has a CVSS base score of 5.3 (Medium) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, indicating network exploitability with low complexity and no privileges required, resulting in availability impact. The EPSS score is 0.004 (percentile 0.345) and CISA KEV status is no, meaning active exploitation in the wild is not documented.
Remediation
- Upgrade PyPI package mail-parser to version 4.6.3 or later.
- If unable to upgrade, wrap every `parse_from_*` call in a bare `except Exception` block instead of catching only `MailParserError`, and treat the message as unparsed.
How to check your project
- Check project dependency files (e.g., requirements.txt, setup.py, pyproject.toml) for mail-parser versions between 3.7.0 and 4.6.2.
- Audit application exception handling around mail-parser calls to see if exceptions outside the MailParserError hierarchy (like OverflowError and OSError) are unhandled.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| PyPI | mail-parser |
>= 3.7.0, < 4.6.3 | 4.6.3 | python -m pip install 'mail-parser>=4.6.3' |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | Low |
FAQ
What causes the uncaught exception during parsing?
An out-of-range year or large timezone offset in the trailing date of a `Received` header causes `calendar.timegm()` or `datetime.fromtimestamp()` to raise `OverflowError` or `OSError`, which were not previously caught by mail-parser.
Is this vulnerability a duplicate of GHSA-24mq-4vc6-2prf?
No, this is a separate issue that survives the fix for GHSA-24mq-4vc6-2prf and reproduces on version 4.6.2.
Which versions of mail-parser are affected?
PyPI mail-parser introduced the vulnerability in version 3.7.0, and it affects all versions up to 4.6.2, while version 4.6.3 and later contain the fix.
Original advisory description
References
- WEB https://github.com/SpamScope/mail-parser/security/advisories/GHSA-xhrq-2mqv-q8wx
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-129300
- WEB https://github.com/SpamScope/mail-parser/pull/171
- WEB https://github.com/SpamScope/mail-parser/commit/d69f6f9b6ad0bf74d731b373bbdeabb462c32b26
- WEB https://github.com/SpamScope/mail-parser/commit/e1d9fe6778045d6e2c44406bc8822e3464c1097f
- PACKAGE https://github.com/SpamScope/mail-parser
- WEB https://github.com/SpamScope/mail-parser/releases/tag/4.6.3
Source records: GHSA-xhrq-2mqv-q8wx (OSV.dev) · EPSS by FIRST, 2026-11-26.