CVE-2026-129295
Received Received - Intake

mail-parser Regex Backtracking DoS via Email Headers

Vulnerability report for CVE-2026-129295, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-16

Last updated on: 2026-11-16

Assigner: GitHub, Inc.

Description

mail-parser is a tool that parses emails by enhancing the Python standard library and extracting message details into a comprehensive object. From 4.2.0 until 4.6.1, attacker-controlled email headers can cause polynomial regular-expression backtracking during ordinary parse_from_string(), parse_from_bytes(), or parse_from_file() calls. In src/mailparser/utils.py, get_addresses() invokes the _ADDR_FALLBACK_RE fallback when strict address parsing yields no usable address, and overlapping quantifiers rescan padded address headers quadratically or cubically. In src/mailparser/const.py, parse_received() applies _CLAUSE_SPLITTER to uncollapsed whitespace in a Received header, causing quadratic backtracking when a whitespace run is not followed by a clause keyword. A small, well-formed message can keep mail gateway, ticketing, quarantine, or archival parsing workers busy for extended periods. This issue is fixed in version 4.6.1.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-16
Last Modified
2026-11-16
Generated
2026-11-16
AI Q&A
2026-11-16
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
mail-parser mail-parser From 4.2.0 (inc) to 4.6.1 (inc)
mail-parser mail-parser 4.6.1

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1333 The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

mail-parser versions 4.2.0 to 4.6.1 are vulnerable to ReDoS (Regular Expression Denial of Service) due to polynomial backtracking in email header parsing. Attacker-controlled headers trigger excessive CPU usage during parsing operations like parse_from_string(), parse_from_bytes(), or parse_from_file(). The issue stems from overlapping quantifiers in regex patterns in utils.py and const.py, causing quadratic or cubic rescans of padded headers.

Detection Guidance

To detect this vulnerability, monitor for unusually high CPU usage or processing delays when parsing emails using mail-parser versions 4.2.0 to 4.6.0. Check if your mail gateway, ticketing, quarantine, or archival systems use affected versions. Commands like top, htop, or system monitoring tools can identify abnormal resource consumption during email processing.

Impact Analysis

This vulnerability can cause mail gateways, ticketing systems, quarantine services, or archival tools using affected mail-parser versions to become unresponsive or crash. A small malicious email can consume excessive CPU resources, leading to service degradation or denial of service for legitimate users.

Mitigation Strategies

Upgrade mail-parser to version 4.6.1 or later immediately. If upgrading is not possible, restrict parsing of untrusted emails or implement rate limiting on email processing workers. Review and sanitize email headers before parsing to prevent malicious input.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-129295. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...