CWE-1124
ProhibitedExcessively Deep Nesting
Abstraction: Base · Status: Incomplete
The code contains a callable or other code grouping in which the nesting / branching is too deep.
6 vulnerabilities reference this CWE, most recent first.
CVE-2026-55620 (GCVE-0-2026-55620)
Vulnerability from cvelistv5 – Published: 2026-08-25 18:26 – Updated: 2026-08-26 15:34| URL | Tags |
|---|---|
| https://github.com/GOVCERT-LU/eml_parser/security… | x_refsource_CONFIRM |
| https://github.com/GOVCERT-LU/eml_parser/pull/90 | x_refsource_MISC |
| https://github.com/GOVCERT-LU/eml_parser/commit/7… | x_refsource_MISC |
| https://github.com/GOVCERT-LU/eml_parser/releases… | x_refsource_MISC |
| Vendor | Product | Version | |
|---|---|---|---|
| GOVCERT-LU | eml_parser |
Affected:
< 3.0.2
|
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-55620",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-08-26T15:34:07.895741Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-08-26T15:34:18.389Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "eml_parser",
"vendor": "GOVCERT-LU",
"versions": [
{
"status": "affected",
"version": "\u003c 3.0.2"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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.routing.noparenthesis in eml_parser/routing.py removes parenthesized CFWS comments from Received: headers with a regex-based fix-point loop whose running time is quadratic in the nesting depth. A single Received: header with 5,000 nested parentheses causes approximately 1.3 seconds of CPU saturation per parsed message, and doubling the nesting depth approximately quadruples the running time. An attacker can submit relatively small EML files that consume multiple seconds of processing time, causing worker latency, queue backpressure, and possible service-level outages in synchronous gateways, sandboxes, and real-time triage pipelines. This issue is fixed in version 3.0.2."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-770",
"description": "CWE-770: Allocation of Resources Without Limits or Throttling",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-1124",
"description": "CWE-1124: Excessively Deep Nesting",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-25T18:26:54.978Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-g7gc-gmgp-wgqg",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-g7gc-gmgp-wgqg"
},
{
"name": "https://github.com/GOVCERT-LU/eml_parser/pull/90",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/pull/90"
},
{
"name": "https://github.com/GOVCERT-LU/eml_parser/commit/746a69f86443eb0b6a47f77db3cfe727c21f92b3",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/commit/746a69f86443eb0b6a47f77db3cfe727c21f92b3"
},
{
"name": "https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.2",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.2"
}
],
"source": {
"advisory": "GHSA-g7gc-gmgp-wgqg",
"discovery": "UNKNOWN"
},
"title": "eml_parser: DoS via deeply nested parens in Received headers"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2026-55620",
"datePublished": "2026-08-25T18:26:54.978Z",
"dateReserved": "2026-06-16T23:31:22.446Z",
"dateUpdated": "2026-08-26T15:34:18.389Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-55619 (GCVE-0-2026-55619)
Vulnerability from cvelistv5 – Published: 2026-08-25 18:24 – Updated: 2026-08-25 19:20| URL | Tags |
|---|---|
| https://github.com/GOVCERT-LU/eml_parser/security… | x_refsource_CONFIRM |
| https://github.com/GOVCERT-LU/eml_parser/pull/90 | x_refsource_MISC |
| https://github.com/GOVCERT-LU/eml_parser/commit/7… | x_refsource_MISC |
| https://github.com/GOVCERT-LU/eml_parser/releases… | x_refsource_MISC |
| Vendor | Product | Version | |
|---|---|---|---|
| GOVCERT-LU | eml_parser |
Affected:
< 3.0.2
|
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-55619",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-08-25T19:18:55.505319Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-08-25T19:20:15.362Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "eml_parser",
"vendor": "GOVCERT-LU",
"versions": [
{
"status": "affected",
"version": "\u003c 3.0.2"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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\u0027s 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."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "LOW",
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-770",
"description": "CWE-770: Allocation of Resources Without Limits or Throttling",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-1124",
"description": "CWE-1124: Excessively Deep Nesting",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-25T18:24:29.921Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-m66c-fw79-6359",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-m66c-fw79-6359"
},
{
"name": "https://github.com/GOVCERT-LU/eml_parser/pull/90",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/pull/90"
},
{
"name": "https://github.com/GOVCERT-LU/eml_parser/commit/746a69f86443eb0b6a47f77db3cfe727c21f92b3",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/commit/746a69f86443eb0b6a47f77db3cfe727c21f92b3"
},
{
"name": "https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.2",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.2"
}
],
"source": {
"advisory": "GHSA-m66c-fw79-6359",
"discovery": "UNKNOWN"
},
"title": "eml_parser: Parser DoS via deeply nested parentheses in e-mail headers"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2026-55619",
"datePublished": "2026-08-25T18:24:29.921Z",
"dateReserved": "2026-06-16T23:31:22.446Z",
"dateUpdated": "2026-08-25T19:20:15.362Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-48042 (GCVE-0-2026-48042)
Vulnerability from cvelistv5 – Published: 2026-06-26 17:29 – Updated: 2026-06-29 13:27- CWE-1124 - Excessively Deep Nesting
| URL | Tags |
|---|---|
| https://github.com/envoyproxy/envoy/security/advi… | x_refsource_CONFIRM |
| https://github.com/envoyproxy/envoy/blob/099a9d71… | x_refsource_MISC |
| Vendor | Product | Version | |
|---|---|---|---|
| envoyproxy | envoy |
Affected:
>= 1.38.0, < 1.38.1
Affected: >= 1.37.0, < 1.37.3 Affected: >= 1.36.0, < 1.36.7 Affected: < 1.35.11 |
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2026-48042",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-06-29T13:27:35.763864Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-06-29T13:27:38.828Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"references": [
{
"tags": [
"exploit"
],
"url": "https://github.com/envoyproxy/envoy/security/advisories/GHSA-f24p-rxw2-g6pv"
}
],
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "envoy",
"vendor": "envoyproxy",
"versions": [
{
"status": "affected",
"version": "\u003e= 1.38.0, \u003c 1.38.1"
},
{
"status": "affected",
"version": "\u003e= 1.37.0, \u003c 1.37.3"
},
{
"status": "affected",
"version": "\u003e= 1.36.0, \u003c 1.36.7"
},
{
"status": "affected",
"version": "\u003c 1.35.11"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Envoy is an open source edge and service proxy designed for cloud-native applications. Prior to 1.35.11, 1.36.7, 1.37.3, and 1.38.1, destructor of JSON Object results in stack overflow when deeply O(100K) nested objects are present. This vulnerability is fixed in 1.35.11, 1.36.7, 1.37.3, and 1.38.1."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-1124",
"description": "CWE-1124: Excessively Deep Nesting",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-06-26T17:29:14.964Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/envoyproxy/envoy/security/advisories/GHSA-f24p-rxw2-g6pv",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/envoyproxy/envoy/security/advisories/GHSA-f24p-rxw2-g6pv"
},
{
"name": "https://github.com/envoyproxy/envoy/blob/099a9d71ebfd8aa9f823e1738b34138cb634a07b/source/common/json/json_loader.h#L21",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/envoyproxy/envoy/blob/099a9d71ebfd8aa9f823e1738b34138cb634a07b/source/common/json/json_loader.h#L21"
}
],
"source": {
"advisory": "GHSA-f24p-rxw2-g6pv",
"discovery": "UNKNOWN"
},
"title": "Envoy: Stack overflow in destructor of highly nested JSON"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2026-48042",
"datePublished": "2026-06-26T17:29:14.964Z",
"dateReserved": "2026-05-20T18:15:53.578Z",
"dateUpdated": "2026-06-29T13:27:38.828Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GHSA-6FJ4-RCR3-R7RR
Vulnerability from github – Published: 2026-10-16 19:55 – Updated: 2026-10-16 19:55lopdf::Document::load_mem (and the other load* entry points) parses nested PDF arrays and dictionaries with unbounded recursion. A small crafted PDF whose Catalog contains a deeply nested array (/X [[[ … ]]], on the order of 10,000 levels) exhausts the call stack and aborts the process with SIGABRT.
Because this is a stack-overflow abort rather than a panic!, it cannot be caught with catch_unwind: any service that parses untrusted PDF input with lopdf can be crashed by a ~21 KB file, resulting in a denial of service.
Confirmed on lopdf 0.41.0 and earlier; fixed in 0.42.0. Default configuration, no features changed.
Proof of concept
fn main() {
let bytes = std::fs::read("poc.pdf").unwrap(); // ~10,380-deep nested array in the Catalog
let _ = lopdf::Document::load_mem(&bytes); // stack overflow -> SIGABRT
}
An equivalent PoC is a minimal PDF whose Catalog /X value is "[" * 10380 + "]" * 10380.
Suggested fix
Enforce a maximum object-nesting depth in the parser and return an Err instead of recursing without bound.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "lopdf"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.42.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-1124"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-16T19:55:39Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "`lopdf::Document::load_mem` (and the other `load*` entry points) parses nested PDF arrays and dictionaries with unbounded recursion. A small crafted PDF whose Catalog contains a deeply nested array (`/X [[[ \u2026 ]]]`, on the order of 10,000 levels) exhausts the call stack and aborts the process with `SIGABRT`.\n\nBecause this is a stack-overflow abort rather than a `panic!`, it cannot be caught with `catch_unwind`: any service that parses untrusted PDF input with lopdf can be crashed by a ~21 KB file, resulting in a denial of service.\n\nConfirmed on lopdf 0.41.0 and earlier; fixed in 0.42.0. Default configuration, no features changed.\n\n## Proof of concept\n\n```rust\nfn main() {\n let bytes = std::fs::read(\"poc.pdf\").unwrap(); // ~10,380-deep nested array in the Catalog\n let _ = lopdf::Document::load_mem(\u0026bytes); // stack overflow -\u003e SIGABRT\n}\n```\n\nAn equivalent PoC is a minimal PDF whose Catalog `/X` value is `\"[\" * 10380 + \"]\" * 10380`.\n\n## Suggested fix\n\nEnforce a maximum object-nesting depth in the parser and return an `Err` instead of recursing without bound.",
"id": "GHSA-6fj4-rcr3-r7rr",
"modified": "2026-10-16T19:55:39Z",
"published": "2026-10-16T19:55:39Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/J-F-Liu/lopdf/issues/502"
},
{
"type": "WEB",
"url": "https://github.com/J-F-Liu/lopdf/pull/503"
},
{
"type": "WEB",
"url": "https://github.com/J-F-Liu/lopdf/commit/c755394ad7dd651ccfe77c618f90ab779da1dfd9"
},
{
"type": "PACKAGE",
"url": "https://github.com/J-F-Liu/lopdf"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2026-0187.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "lopdf has a stack overflow via deeply nested PDF objects"
}
GHSA-G7GC-GMGP-WGQG
Vulnerability from github – Published: 2026-08-25 18:27 – Updated: 2026-08-25 18:27Summary
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.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "eml_parser"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-55620"
],
"database_specific": {
"cwe_ids": [
"CWE-1124",
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-25T18:27:18Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\n`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.\n\n### Impact\n\nThis 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.\n\nThis 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.\n\n### Patches\n\nSince version 3.0.2, `eml_parser` uses a linear-time algorithm to remove the comments from `Received:` headers.",
"id": "GHSA-g7gc-gmgp-wgqg",
"modified": "2026-08-25T18:27:18Z",
"published": "2026-08-25T18:27:18Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-g7gc-gmgp-wgqg"
},
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/pull/90"
},
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/commit/746a69f86443eb0b6a47f77db3cfe727c21f92b3"
},
{
"type": "PACKAGE",
"url": "https://github.com/GOVCERT-LU/eml_parser"
},
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "eml_parser vulnerable to DoS via deeply nested parens in Received headers"
}
GHSA-M66C-FW79-6359
Vulnerability from github – Published: 2026-08-25 18:25 – Updated: 2026-08-25 18:25Summary
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.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "eml_parser"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-55619"
],
"database_specific": {
"cwe_ids": [
"CWE-1124",
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-25T18:25:47Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Summary\n\n`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.\n\n### Impact\n\nSOC pipelines use `eml_parser` to process untrusted e-mails. An attacker can easily create an eml file that will trigger the `RecursionError` during parsing.\n\nThe 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.\n\n### Workarounds\n\nThe issue can be avoided by wrapping the call to `eml_parser.decode_email` or `eml_parser.decode_email_bytes` in a `try/except` construct.\n\n### Patches\n\nSince 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.",
"id": "GHSA-m66c-fw79-6359",
"modified": "2026-08-25T18:25:47Z",
"published": "2026-08-25T18:25:47Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-m66c-fw79-6359"
},
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/pull/90"
},
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/commit/746a69f86443eb0b6a47f77db3cfe727c21f92b3"
},
{
"type": "PACKAGE",
"url": "https://github.com/GOVCERT-LU/eml_parser"
},
{
"type": "WEB",
"url": "https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "eml_parser has parser DoS via deeply nested parentheses in e-mail headers"
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.