CVE-2026-129307: eml_parser: Algorithmic-complexity DoS (O(n^4) regex backtracking) in Received-header parsing
emlparser serves as a python module for parsing eml files and returning various information found in the e-mail as well as computed information. In 3.0.3 and earlier, emlparser.routing.parserouting() in emlparser/routing.py builds a regular expression with multiple greedy capture groups and appends the npdate date literal extracted from a normalized copy of an attacker-controlled Received header, then searches that expression against the original unnormalized line. A formatting difference can make the trailing literal impossible to match, causing exhaustive backtracking across the greedy groups at each start position. The unsliced Received-header path is invoked by decodeemail, decodeemailbytes, and parseemail, so one small unauthenticated message can pin a parser worker and create sustained queue backlog. This issue is fixed in version 3.0.4.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.0.4
Event History
Frequently Asked Questions
Who is exposed to this denial-of-service issue?
Applications that use eml_parser 3.0.3 or earlier to parse attacker-controlled email messages through decode_email, decode_email_bytes, or parse_email are exposed. A single small message with a crafted Received header can pin a parser worker and build a sustained processing backlog.
Does exploitation require authentication or user interaction?
No. The issue is reachable through an attacker-controlled Received header in an email message, and the supplied vector indicates network access with no privileges or user interaction required.
What should teams do if they cannot immediately upgrade?
The provided data identifies version 3.0.4 as the fix. Until upgrading, reduce exposure by preventing untrusted messages from reaching code paths that invoke decode_email, decode_email_bytes, or parse_email, or isolate parsing workers so a pinned worker cannot block the broader service.
How can I determine whether my deployment is affected?
Check the installed eml_parser version and whether your application processes untrusted EML content using decode_email, decode_email_bytes, or parse_email. Versions 3.0.3 and earlier are affected; version 3.0.4 contains the fix.