CVE-2026-129300: CVE-2026-129300: Uncaught Exception Denial of Service in SpamScope mail-parser
CVE-2026-129300: Uncaught Exception Denial of Service in SpamScope mail-parser Vulnerability ID: CVE-2026-129300 CVSS Score: 5.3 Published: 2026-11-16 CVE-2026-129300 (GHSA-xhrq-2mqv-q8wx) is an unhandled exception
CVE-2026-129300: Uncaught Exception Denial of Service in SpamScope mail-parser
Vulnerability ID: CVE-2026-129300
CVSS Score: 5.3
Published: 2026-11-16
CVE-2026-129300 (GHSA-xhrq-2mqv-q8wx) is an unhandled exception vulnerability in SpamScope mail-parser, a Python library used to parse raw emails. When processing an email with a malformed Received header containing an out-of-range year or timezone offset, standard library datetime conversion routines raise OverflowError or OSError. Because the internal error handler only caught TypeError and ValueError, these exceptions escape the parser hierarchy, terminating email ingestion pipelines and causing a denial of service.
TL;DR
SpamScope mail-parser versions 3.7.0 through 4.6.2 fail to catch OverflowError and OSError exceptions when parsing extreme dates or timezone offsets in Received email headers. Remote attackers can send crafted emails to crash automated parsing workers or evade security inspection pipelines. Upgrading to version 4.6.3 resolves the issue.
⚠️ Exploit Status: POC
Technical Details
- CVE ID: CVE-2026-129300 (GHSA-xhrq-2mqv-q8wx)
- Weakness Class: CWE-248: Uncaught Exception
- CVSS v3.1 Score: 5.3 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L)
- Affected Component: receiveds_format() in src/mailparser/utils.py
- Affected Versions: SpamScope mail-parser >= 3.7.0, < 4.6.3
- Patched Version: 4.6.3
- Impact: Denial of Service via unhandled OverflowError or OSError
- CISA KEV Status: Not Listed
Affected Systems
- SpamScope mail-parser (Python package)
-
mail-parser: >= 3.7.0, < 4.6.3 (Fixed in:
4.6.3)
Code Analysis
Commit: d69f6f9
fix: keep parsing when a Received date is out of range
--- a/src/mailparser/utils.py
+++ b/src/mailparser/utils.py
@@ -862,7 +862,12 @@ def receiveds_format(receiveds):
i["date"] = re.sub(r"^\s*(?:\([^)]*\)\s*)+", "", i["date"])
try:
j["date_utc"], _ = convert_mail_date(i["date"])
- except (TypeError, ValueError):
+ except (TypeError, ValueError, OverflowError, OSError):
+ # Out-of-range dates fail in three different ways: a huge
+ # year overflows int64 inside calendar.timegm()
+ # (OverflowError), and a huge timezone offset pushes the
+ # timestamp into the band where datetime.fromtimestamp()
+ # reports EOVERFLOW (OSError).
j["date_utc"] = None
# Add delay
Commit: e1d9fe6
Merge pull request #171 for out-of-range Received date handling
Mitigation Strategies
- Upgrade SpamScope mail-parser to version 4.6.3 or later to handle out-of-range dates gracefully within receiveds_format().
- Implement defensive exception handling around mail-parser entry points to catch OverflowError and OSError in addition to MailParserError.
- Configure message ingestion queues with dead-letter queues (DLQ) and retry limits to prevent poison-pill message loops from exhausting worker pools.
Remediation Steps:
- Identify all services, workers, and analysis pipelines utilizing the mail-parser Python package.
- Update requirements.txt, pyproject.toml, or Pipfile specifications to require mail-parser>=4.6.3.
- Run pip install --upgrade "mail-parser>=4.6.3" across affected virtual environments and container images.
- Redeploy email ingestion workers and verify that messages with out-of-range Received dates parse with date_utc set to None.
References
- GitHub Security Advisory GHSA-xhrq-2mqv-q8wx
- Official CVE Record: CVE-2026-129300
- National Vulnerability Database (NVD): CVE-2026-129300
- Fix Commit d69f6f9b6ad0bf74d731b373bbdeabb462c32b26
- Fix Commit e1d9fe6778045d6e2c44406bc8822e3464c1097f
- SpamScope mail-parser Pull Request #171
- SpamScope mail-parser Release Tag 4.6.3
- CVEListV5 JSON Record for CVE-2026-129300
Read the full report for CVE-2026-129300 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.