llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · nodemailer

GHSA-V53P-9FQP-M79J

Nodemailer: Quadratic backtracking in the addressparser free-text fallback allows remote denial of service

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -18 d de la divulgación
Exposición50 dDesde la divulgación, 29 sept 2026, 6:43 p. m.
Detección48 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 10.0.6
Monitoreo
Detectada
11 sept 26
29 sept 26
30 sept 26
17 nov 26
19 nov 26
11 sept 26
29 sept 26
16 oct 26
2 nov 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 10.0.6 nodemailer · -18 d desde divulgación
Divulgación Publicada GHSA-V53P-9FQP-M79J divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

When `addressparser` finds no address by its strict reading, it falls back to pulling one out of the free text with `/\s*\b[^@\s]+@[^\s]+\b\s*/`. That pattern backtracks quadratically: `[^@\s]+` is retried from every offset and rescans the run to the next `@` each time. A single header value holding a long whitespace-free run with no usable `@` blocks the Node.js event loop for tens of seconds.

It is cheaper to exploit than GHSA-prgh-xp8r-p3m5: 273KB is enough for ~43s, where the comment-joined shape needed ~1.5MB for ~10s.

Details

The fallback in `src/addressparser/index.ts` ran the pattern as a search. `[^@\s]+` crosses neither whitespace nor `@`, so from each start offset it scans forward to the next `@` or to the end of the run and then fails, and the engine simply advances one character and repeats. Three shapes make every offset fail:

  • the run holds no `@` at all
  • the only `@` has nothing after it
  • the only `@` has nothing before it

A fourth reaches it with a valid address present but placed past a long run, so the long run is walked before the match is found.

PoC
const addressparser = require('nodemailer/lib/addressparser');
const s = Date.now();
addressparser(' >' + '>[x][x]'.repeat(40000)); // 273KB
console.log(Date.now() - s, 'ms'); // ~43000 ms, blocking

Measured on 10.0.5:

| Value | Parse time |
| --- | --- |
| `'[x]'.repeat(40000)` (117KB) | 9.0 s |
| `'[x]'.repeat(40000) + '@'` (117KB) | 8.9 s |
| `'@' + '[x]'.repeat(40000)` (117KB) | 8.8 s |
| `' >' + '>[x][x]'.repeat(40000)` (273KB) | 42.9 s |

Impact

Algorithmic-complexity denial of service. Node is single threaded, so the block stalls the whole process. Reachable without authentication anywhere inbound header values are handed to this parser, mailparser being the notable case, and reachable from application input wherever a user-supplied string is used as a message address, since `mime-node` parses `to`, `from` and `cc` when composing.

Patch

The search is replaced by a single linear pass that finds the one offset the pattern can match at, which is then applied there with a sticky regex. Match results are unchanged, verified against the previous implementation over 3.4 million random strings comparing both the match offset and the matched text, plus 800k full-parse comparisons.

Found while validating the report in GHSA-prgh-xp8r-p3m5, not reported externally.

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

Versiones

Rangos afectados

Afectada Corregida Última
nodemailer< 10.0.6
10.0.6
10.6.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmnodemailer
Corregida 10.0.6 -18 d 10.6.0 no afectada
Versiones corregidas10.0.6
Explotación

Arsenal público

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

Referencias
Otrahttps://github.com/nodemailer/nodemailer/security/advisories/GHSA-v53p-9fqp-m79j
Otrahttps://github.com/nodemailer/nodemailer/commit/437d7fc47403df176bc39271641541b7a9bce102
Otrahttps://github.com/nodemailer/nodemailer
Otrahttps://github.com/nodemailer/nodemailer/releases/tag/v10.0.6

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