7.5high
Nest: DoS via Recursive handleData in JsonSocket (TCP Transport)
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.34% (higher than 29% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hpwf-8g29-85qm
Description
Nest is a framework for building scalable Node.js server-side applications. Prior to 11.1.19, when an attacker sends many small, valid JSON messages in one TCP frame, handleData() recurses once per message; the buffer shrinks each call. maxBufferSize is never reached; call stack overflows instead. A ~47 KB payload is sufficient to trigger RangeError. This vulnerability is fixed in 11.1.19.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nestjs nest | < 11.1.19, before 11.1.19 | CVE List, NVD |
| @nestjs/microservices (npm) | before 11.1.19 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
Nest is a framework for building scalable Node.js server-side applications. Prior to 11.1.19, when an attacker sends many small, valid JSON messages in one TCP frame, handleData() recurses once per message; the buffer shrinks each call. maxBufferSize is never reached; call stack overflows instead. A ~47 KB payload is sufficient to trigger RangeError. This vulnerability is fixed in 11.1.19.
GitHub Advisory Database
Impact
Attacker sends many small, valid JSON messages in one TCP frame → handleData() recurses once per message; buffer shrinks each call → maxBufferSize is never reached; call stack overflows instead → A ~47 KB payload is sufficient to trigger RangeError
Patches
Fixed in @nestjs/microservices@11.1.19
References
Discovered by https://github.com/hwpark6804-gif
NVD (es)
Nest es un framework para construir aplicaciones escalables de Node.js del lado del servidor. Antes de la versión 11.1.19, cuando un atacante envía muchos mensajes JSON pequeños y válidos en una única trama TCP, handleData() recurre una vez por mensaje; el búfer se reduce en cada llamada. maxBufferSize nunca se alcanza; en su lugar, la pila de llamadas se desborda. Una carga útil de ~47 KB es suficiente para activar un RangeError. Esta vulnerabilidad se corrige en la versión 11.1.19.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40879 changed 2026-04-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hpwf-8g29-85qm changed 2026-05-05 | CC-BY-4.0 |
| NVD | CVE-2026-40879 changed 2026-10-26 | Public domain |