PT-2026-82002 · Pypi · Eml-Parser

Published

2026-08-25

·

Updated

2026-08-25

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Summary

eml parser uses the email.utils.getaddresses() function from the CPython standard library to parse e-mail headers that contain e-mail addresses (such as To, Cc, Bcc, From, Reply-To, Sender, ...). When the input header contains a deeply nested CFWS (comment / folding white space) construct, the recursive descent parser in the standard library exhausts the call stack. The resulting RecursionError is not caught by eml parser, so the exception propagates and aborts parsing of the whole message.

Impact

SOC pipelines use eml parser to process untrusted e-mails. An attacker can easily create an eml file that will trigger the RecursionError during parsing.
The impact is mitigated by the fact that there are various other situations in which eml parser will raise an exception when attempting to parse a malformed or pathological eml file. In particular, very deeply nested multipart e-mails also result in a RecursionError being raised by the library voluntarily. Therefore, systems relying on eml parser already need to detect and handle errors emanating from the library in an appropriate way.

Workarounds

The issue can be avoided by wrapping the call to eml parser.decode email or eml parser.decode email bytes in a try/except construct.

Patches

Since version 3.0.2, eml parser will catch the error in the standard library parser and fall back to a simpler parser based on a regular expression.

Fix

Allocation of Resources Without Limits

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

GHSA-M66C-FW79-6359

Affected Products

Eml-Parser