PyPI
CVE-2026-129307
eml_parser: Algorithmic-complexity DoS (O(n^4) regex backtracking) in Received-header parsing
- Severity
- Medium 5.3
- Published
- 19 Nov 2026
- Last changed
- 19 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.0.4
- Exploit chance
- 0.5% in the next 30 daysHigher than 40% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Regular expression denial of service (ReDoS) (CWE-1333)Inefficient algorithmic complexity (CWE-407)
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Slow it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L- Also known as
- GHSA-m4g8-47f9-h588
- Sources
- OSV.dev and GitHub
Description
eml_parser.routing.parserouting() dynamically builds a regex from up to four greedy . groups (from (?P.)by (?P.)with (?P.)for (?P.*)) terminated by an escaped literal of the date extracted from a normalized copy of the Received header. Because the date literal comes from the normalized text but is searched in the original line, a crafted header can make the trailing literal unmatchable; the search then fails at every start position only after exhaustively backtracking the four nested greedy groups — O(n^4) in header length. A single ~5.9 KB email pins one CPU core for ~12 seconds; doubling the input multiplies the cost ~25x, so a ~13 KB header takes minutes and a ~25 KB header effectively hangs the parse worker.
Root cause: eml_parser/routing.py:140-148 (v3.0.3):
npdate is extracted from npline, a normalized copy of the header (spacing added around (, ), ; at routing.py:79-81; parenthesized text removed at line 82; whitespace collapsed at line 83), so it is not guaranteed to be a…
Affected software
| Software | Affected versions |
|---|---|
eml-parserPyPI · osv:PyPI:eml-parser |
|
About eml-parser
- Weekly downloads (PyPI)
- 70,125PyPI Stats, 24 Nov 2026
This is the only vulnerability in eml-parser in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-129307
- GitHub Advisory Database https://github.com/advisories/GHSA-m4g8-47f9-h588