p PatchFirst

CVE-2026-129295

CVE-2026-129295 · mail-parser is vulnerable to polynomial ReDoS in email header parsing

CVSS 7.5 · High · EPSS 0.7% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

pip show mail-parser

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Stack: python

Affected products and versions

  • mail-parser

    Versions
    • >= 4.2.0, < 4.6.1: Affected

    No fix published

  • mail-parser PyPI

    Versions
    • 4.2.0
    • 4.2.1
    • 4.3.0
    • 4.4.0
    • 4.5.0
    • 4.6.0
    Affected ranges
    • ECOSYSTEM: ≥ 4.2.0, < 4.6.1

    Update to 4.6.1

Original sources

Check your server →