Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-m66c-fw79-6359

Опубликовано: 25 авг. 2026
Источник: github
Github: Прошло ревью
CVSS3: 5.3

Описание

eml_parser has parser DoS via deeply nested parentheses in e-mail headers

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.

Пакеты

Наименование

eml_parser

pip
Затронутые версииВерсия исправления

< 3.0.2

3.0.2

EPSS

Процентиль: 23%
0.00302
Низкий

5.3 Medium

CVSS3

Дефекты

CWE-1124
CWE-770

Связанные уязвимости

CVSS3: 5.3
nvd
22 дня назад

eml_parser serves as a python module for parsing eml files and returning various information found in the e-mail as well as computed information. Prior to 3.0.2, eml_parser.parser.HeaderParser.header_fetch_parse in eml_parser/parser.py uses email.utils.getaddresses() to parse address-bearing e-mail headers. A deeply nested CFWS comment construct exhausts the standard-library recursive descent parser's call stack and raises RecursionError, which is not caught and therefore aborts parsing of the entire message. An attacker can disrupt SOC pipelines that process untrusted EML files, although callers already need to handle exceptions from malformed or pathological messages. This issue is fixed in version 3.0.2.

msrc
20 дней назад

eml_parser: Parser DoS via deeply nested parentheses in e-mail headers

EPSS

Процентиль: 23%
0.00302
Низкий

5.3 Medium

CVSS3

Дефекты

CWE-1124
CWE-770