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

Published Nov 16, 2026
·
Updated

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 parsefromstring(), parsefrombytes(), or parsefromfile() calls. In src/mailparser/utils.py, getaddresses() invokes the ADDRFALLBACKRE fallback when strict address parsing yields no usable address, and overlapping quantifiers rescan padded address headers quadratically or cubically. In src/mailparser/const.py, parsereceived() applies CLAUSESPLITTER 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.

Affected Software

1 affected component
pypi/mail-parser>=4.2.0<4.6.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade mail-parser to a version that resolves this vulnerability.

    Fixed in 4.6.1

Event History

Nov 16, 2026
CVE Published
via MITRE·05:32 PM
Data Sourced
via MITRE·05:32 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are most exposed to this issue?

Deployments that parse untrusted email with mail-parser are exposed, including mail gateways, ticketing systems, quarantine services, and archival workers. A small, well-formed message can keep parsing workers busy for an extended period.

2

What does an attacker need to exploit it?

An attacker only needs to supply an email with crafted headers that are processed by ordinary parse_from_string(), parse_from_bytes(), or parse_from_file() calls. No privileges or user interaction are required.

3

Are normal parsing paths affected, or only unusual options?

Normal parsing paths are affected. The problematic regular expressions are reached during fallback address parsing for headers without a usable strictly parsed address and during Received-header parsing with uncollapsed whitespace that is not followed by a clause keyword.

4

How can I determine whether my installation is affected?

mail-parser versions from 4.2.0 until 4.6.1 are affected according to the provided information. Version 4.6.1 contains the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203