---
id: "CVE-2026-129307"
page: "https://infrastack.ai/live/CVE-2026-129307"
kind: "vulnerability"
aliases: ["CVE-2026-129307"]
title: "eml_parser: crafted Received header makes Python email parsing hang"
severity: "medium"
cvss: 5.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["email-parsing", "eml_parser", "package", "python"]
not_affected_if: ["no-untrusted-email", "offline-batch"]
published_at: "2026-11-16T19:17:40+00:00"
first_seen_at: "2026-11-16T19:38:22+00:00"
updated_at: "2026-11-16T19:39:31+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129307", "first_seen_at": "2026-11-16T19:38:22+00:00"}]
exploit_sources: []
---

# eml_parser: crafted Received header makes Python email parsing hang

Link for people: https://infrastack.ai/live/CVE-2026-129307 (this .md is for agents)

eml_parser is a Python library that parses .eml email files. A crafted Received header causes a regular expression to backtrack exhaustively, pinning a parser worker and building a queue backlog.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- `pip show eml_parser` to read the installed version; affected if it is `3.0.3` or earlier
- Search your code for calls to `decode_email`, `decode_email_bytes` or `parse_email` run on untrusted incoming mail

## Fix

- eml_parser: move to `3.0.4`

## Timeline

- 2026-11-16T19:38:22+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-129307

## Documents

- [advisory] Vendor advisory: github.com https://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-m4g8-47f9-h588
- [fix] Patch: github.com https://github.com/GOVCERT-LU/eml_parser/commit/54ea6e9f54fecda3059283ccdb6a6fd99e7ce92f
- [fix] Release notes: github.com https://github.com/GOVCERT-LU/eml_parser/releases/tag/v3.0.4

## From the sources

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. In 3.0.3 and earlier, eml_parser.routing.parserouting() in eml_parser/routing.py builds a regular expression with multiple greedy capture groups and appends the npdate date literal extracted from a normalized copy of an attacker-controlled Received header, then searches that expression against the original unnormalized line. A formatting difference can make the trailing literal impossible to match, causing exhaustive backtracking across the greedy groups at each start position. The unsliced Received-header path is invoked by decode_email, decode_email_bytes, and parse_email, so one small unauthenticated message can pin a parser worker and create sustained queue backlog. This issue is fixed in version 3.0.4.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
