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

GHSA-9PM7-8F77-4MQ9

Quadratic parse time of long header field values in eml_parser before 4.1.0

Parche disponible
Descargar PNG JSON
CVSS 4.0
6.3
Media
CVSS:4.0/AV:N/AC:L/AT:P/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 a -37 d de la divulgación
Exposición1 dDesde la divulgación, 18 nov 2026, 4:03 a. m.
Detección14 hDesde 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.1.0
Monitoreo
Detectada +1
12 oct 26
18 nov 26
20 nov 26
12 oct 26
22 oct 26
31 oct 26
10 nov 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 4.1.0 eml-parser · -37 d desde divulgación
Divulgación Publicada GHSA-9PM7-8F77-4MQ9 divulgada · CVSS 6.3 (GitHub)
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 before 4.1.0 runs every header field value through the structured header parsers of the Python standard library, whose running time is quadratic in the length of the value. One long header field (any name, e.g. `Received`, `Subject` or an `X-` field) makes the parse of a message take seconds to minutes.

### Details
Measured on eml_parser 3.0.6, the last 3.x release, with one header field of nested comments with white space (`( ( ... ) )`): 125 KiB took 1.1 s, 250 KiB 3.3 s and 500 KiB 11.8 s of CPU time (growth exponent 1.6 to 1.8). Other header names behave alike (250 KiB: 2.1 to 3.5 s). A message of many such fields adds up: 25 MiB of 8 KiB `Received` fields took 195 s. The cost is in the stdlib parser, not in the removal of comments, which has been linear since 3.0.2 (CVE-2026-55620).

Since 4.1.0, values longer than 8 KiB (`constants.MAX_PARSED_HEADER_SIZE`) are not run through the stdlib parsers; since 4.3.0 the structured parsing per message is also limited to 10 000 fields and 2 MiB of values. With 4.7.1, the same tests took at most 9 s for 25 MiB of `Received` fields, growing linearly with the size.

### Impact
CPU exhaustion of the process parsing a crafted message, for as long as that message is parsed. The impact depends on the size of header fields the pipeline accepts: many mail servers limit the size of the header, which bounds the cost, while files parsed from other sources may carry fields of any size.

### Patches
Fixed in 4.1.0. The 3.x line receives no further releases; upgrade to 4.1.0 or later (current: 4.7.1).

### Workarounds
Limit the size of header fields before parsing (e.g. in the mail server), or parse messages with a time limit.

### Credits
Reported by @lanjianchun.

### References
- GHSA-g7gc-gmgp-wgqg / CVE-2026-55620 (linear removal of comments in `Received` fields since 3.0.2)
- Changelog of eml_parser 4.1.0 ("Fix headers with huge values taking minutes to parse")

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:P
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< 4.1.0
4.1.0
4.7.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypieml-parser
Corregida 4.1.0 -37 d 4.7.0 no afectada
Versiones corregidas4.1.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-9pm7-8f77-4mq9

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