Advisory

PYSEC-2026-3832

Also known as: CVE-2026-55620, GHSA-g7gc-gmgp-wgqg

Summary

eml_parser vulnerable to DoS via deeply nested parens in Received headers

Details

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.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2026-09-10 09:44 UTC
Modified
2026-09-10 12:15 UTC

Affected packages and fixes

eml-parser

PyPI · All systems

Affected

  • introduced 0, fixed 3.0.2 (ecosystem)

Fixed versions

3.0.2

Fix

  • Fixed version 3.0.2
    pip install --upgrade eml-parser==3.0.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences