VAITP Dataset

← Back to the dataset

CVE-2026-55619

RecursionError in eml_parser HeaderParser allows DoS via crafted nested comments.

  • CVSS 5.3
  • CWE-770
  • Resource Management
  • Remote

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.

CVSS base score
5.3
Published
2026-08-25
OWASP
A04 Insecure Design
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
eml_parser
Fixed by upgrading
Yes

Solution

Upgrade eml_parser to version 3.0.2 or later.

Vulnerable code sample

import email.utils
from typing import List, Tuple

class HeaderParser:
    def __init__(self, raw_headers: str):
        self.raw = raw_headers

    def header_fetch_parse(self, header_name: str) -> List[Tuple[str, str]]:
        """
        Extract address tuples from a given header using email.utils.getaddresses.
        """
        # VULNERABLE: deep nested CFWS comments cause RecursionError
        header_value = self._extract_header(header_name)
        return email.utils.getaddresses([header_value])

    def _extract_header(self, name: str) -> str:
        # Simplified extraction for illustration
        for line in self.raw.splitlines():
            if line.lower().startswith(name.lower() + ":"):
                return line.split(":", 1)[1].strip()
        return ""

Patched code sample

import email.utils
from typing import List, Tuple

class HeaderParser:
    def __init__(self, raw_headers: str):
        self.raw = raw_headers

    def header_fetch_parse(self, header_name: str) -> List[Tuple[str, str]]:
        """
        Extract address tuples from a given header using a safe fallback.
        """
        # FIX: catch RecursionError and return empty list instead of crashing
        header_value = self._extract_header(header_name)
        try:
            return email.utils.getaddresses([header_value])
        except RecursionError:
            return []

    def _extract_header(self, name: str) -> str:
        # Simplified extraction for illustration
        for line in self.raw.splitlines():
            if line.lower().startswith(name.lower() + ":"):
                return line.split(":", 1)[1].strip()
        return ""

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • Address security advisories (#90) (GOVCERT-LU/eml_parser)
    eml_parser/parser.py · CustomPolicy.header_fetch_parse, eml_parser/parser.py · EmlParser.clean_found_uri, eml_parser/parser.py · EmlParser.parse_email, eml_parser/parser.py · EmlParser.__init__, eml_parser/regexes.py, eml_parser/routing.py · noparenthesis

Cite this entry

@misc{vaitp:cve202655619,
  title        = {{RecursionError in eml_parser HeaderParser allows DoS via crafted nested comments.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-55619},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-55619/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.