llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · eml-parser

GHSA-VW55-54CG-FC63

Denial of service through quadratic processing of header fields with distinct names

Parche disponible
Descargar PNG JSON
CVSS 4.0
6.9
Media
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición34 dDesde la divulgación, 16 oct 2026, 10:49 a. m.
Detección33 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 4.3.0
Monitoreo
Detectada +1
16 oct 26
18 nov 26
20 nov 26
16 oct 26
25 oct 26
2 nov 26
11 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-VW55-54CG-FC63 divulgada · CVSS 6.9 (GitHub)
Remediación Parche 4.3.0 eml-parser · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

eml_parser takes time that grows quadratically with the number of distinct header field names in a message. A small, standards-compliant message can therefore keep the parser busy for tens of seconds. A 1 MiB message with 21,000 small header fields takes about 20–45 seconds to parse with eml_parser 4.2.1, depending on hardware, while a 1 MiB message with a single large header field parses in about 10 ms. Applications that parse untrusted e-mail with eml_parser, such as phishing triage, incident response and malware analysis pipelines, can have their workers tied up by crafted messages.

Details

To collect all header fields of a message, `EmlParser.parse_email()` called `email.message.Message.get_all()` once for each distinct header field name. Each call scans the complete list of header fields, so processing takes time proportional to the number of distinct names multiplied by the total number of fields. Many fields sharing one name do not trigger the problem; many distinct names do.

The crafted message is compliant with RFC 5322: every line stays below the 998-character limit and no obsolete syntax is needed. The issue is separate from the limit on long header values introduced in 4.1.0 (`constants.MAX_PARSED_HEADER_SIZE`), because every individual field is small.

Proof of concept
import time
import eml_parser

n = 21_000
headers = ''.join(f'X-F{i}: {"F" * 40}\r\n' for i in range(n))
raw = f'From: a@example.test\r\nTo: b@example.test\r\nSubject: test\r\n{headers}\r\nbody\r\n'.encode()

start = time.perf_counter()
eml_parser.EmlParser().decode_email_bytes(raw)
print(f'{len(raw) / 1048576:.1f} MiB, {n} header fields: {time.perf_counter() - start:.1f} s')

With 4.2.1 this takes over 20 seconds. Each doubling of the number of fields roughly quadruples the time.

Impact

This is a denial of service that affects availability only. Every application that passes attacker-controlled messages to eml_parser is affected. Each crafted message occupies a worker for tens of seconds, and longer under CPU quotas, so repeated submissions can exhaust a pool of analysis workers. Confidentiality and integrity are not affected.

Patches

Fixed in version X.Y.Z:

  • Linear collection: header fields are grouped by name in a single pass, so collection time grows linearly with the number of fields. The 1 MiB message above now parses in about one second, with unchanged output.
  • Parsing limit: as defence in depth, at most `constants.MAX_PARSED_HEADER_FIELDS` (10,000) header fields and `constants.MAX_PARSED_HEADER_BYTES` (2 MiB) of header values per message, including all MIME parts, go through full header parsing.
  • Values beyond the limit are kept as raw text in the output, so no data is lost.
  • The sender, recipient, subject, date, message ID and `Content-*` fields are always parsed.
  • The message reports a `HeaderParsingLimitDefect` in `header.defect`.
Workarounds

If you cannot upgrade:
- Run eml_parser with a time limit per message, for example in a separate process that is stopped after a timeout.
- Reject or quarantine messages with an unusually large number of header fields before parsing them. Legitimate messages have from a few dozen to a few hundred.

Credits

Reported by YUN GU (DrNbnonono).

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:N
AltoBajoNinguno
Integridad (sistema)VI:N
AltoBajoNinguno
Disponib. (sistema)VA:L
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
eml-parser≥ 1.4 ≤ 4.2.1
1.4
4.2.1
4.7.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypieml-parser
Corregida 4.3.0 0 d 4.7.0 no afectada
Versiones corregidas4.3.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/GOVCERT-LU/eml_parser/security/advisories/GHSA-vw55-54cg-fc63

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.