CVE-2026-55620: eml_parser vulnerable to DoS via deeply nested parens in Received headers
Summary emlparser strips parenthesised CFWS comments from Received: headers using a regex-based fix-point loop. The loop has quadratic time complexity in the number of nested parens. A single Received: header containing 5,000 nested parens causes ~1.3 seconds of CPU saturation per parsed message; runtime quadruples per doubling of nesting depth.
Published Aug 25, 2026
Affected packages
eml_parser
- Ecosystem
- PyPI
- Affected
- < 3.0.2
- Fixed in
- 3.0.2
- Check
pip show eml_parser
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
eml_parser strips parenthesised CFWS comments from Received: headers using a regex-based fix-point loop. The loop has quadratic time complexity in the number of nested parens. A single Received: header containing 5,000 nested parens causes ~1.3 seconds of CPU saturation per parsed message; runtime quadruples per doubling of nesting depth.
Impact
This represents a CPU exhaustion DoS in any pipeline that processes attacker-supplied EML files. An attacker can create relatively small EML files that will take multiple seconds to parse.
This is particularly problematic for synchronous email-processing pipelines (gateways, sandboxes, real-time triage) where worker latency directly translates to queue backpressure and possible service-level outages.
Patches
Since version 3.0.2, eml_parser uses a linear-time algorithm to remove the comments from Received: headers.
Credited to Sebasteuo.
References
- https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-g7gc-gmgp-wgqg
- https://github.com/GOVCERT-LU/eml_parser/pull/90
- https://github.com/GOVCERT-LU/eml_parser/commit/746a69f86443eb0b6a47f77db3cfe727c21f92b3
- https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.2
- https://github.com/advisories/GHSA-g7gc-gmgp-wgqg
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-55618
eml_parser has a URL extraction bypass via HTML entities in URLs
medium6.5Aug 25, 2026CVE-2026-55619
eml_parser has parser DoS via deeply nested parentheses in e-mail headers
medium5.3Aug 25, 2026CVE-2026-44844
eml_parser has recursion DoS via nested message/rfc822 attachments
medium6.3May 8, 2026
