Dev.to Security 🔐 Cybersecurity 👁 0 📖 2 min read

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:

  1. Identify all services, workers, and analysis pipelines utilizing the mail-parser Python package.
  2. Update requirements.txt, pyproject.toml, or Pipfile specifications to require mail-parser>=4.6.3.
  3. Run pip install --upgrade "mail-parser>=4.6.3" across affected virtual environments and container images.
  4. Redeploy email ingestion workers and verify that messages with out-of-range Received dates parse with date_utc set to None.

References

Read the full report for CVE-2026-129300 on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.