{"id":"CVE-2026-40879","aliases":["CVE-2026-40879","GHSA-hpwf-8g29-85qm"],"related":[],"kind":"vulnerability","state":"published","title":"Nest: DoS via Recursive handleData in JsonSocket (TCP Transport)","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nAttacker sends many small, valid JSON messages in one TCP frame\n → handleData() recurses once per message; buffer shrinks each call\n → maxBufferSize is never reached; call stack overflows instead\n → A ~47 KB payload is sufficient to trigger RangeError\n\n### Patches\n\nFixed in `@nestjs/microservices@11.1.19`\n\n### References\n\nDiscovered by https://github.com/hwpark6804-gif","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-04-14T00:15:09.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-674","CWE-770"],"affected":[{"ranges":[{"version":"< 11.1.19","status":"affected"}],"vendor":"nestjs","product":"nest","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"11.1.19"}],"ecosystem":"npm","package":"@nestjs/microservices","purl":"pkg:npm/%40nestjs/microservices","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"11.1.19"}],"vendor":"nestjs","product":"nest","cpe":"cpe:2.3:a:nestjs:nest:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nestjs/nest/security/advisories/GHSA-hpwf-8g29-85qm","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40879","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nestjs/nest","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-04-21T19:37:57.073Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40879","url":"https://www.cve.org/CVERecord?id=CVE-2026-40879","licence":"CVE Terms of Use","modified":"2026-04-21T19:38:04.805Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hpwf-8g29-85qm","url":"https://github.com/advisories/GHSA-hpwf-8g29-85qm","licence":"CC-BY-4.0","modified":"2026-05-05T16:07:32.834Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40879","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40879","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:19.138Z","epss":{"score":0.00342,"percentile":0.29682,"date":"2026-12-01T12:00:22.000Z"}}