Security Resilience

CVE-2026-40879

DoS in Nestjs Nest ≤ 11.1.19

Published
21 April 2026
Modified
26 October 2026
Patch / advisory
CVSS Score v3.1 7.5
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0048 33th percentile
Risk Priority 58 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-40879 is a high-severity Uncontrolled Recursion (CWE-674) vulnerability in Nestjs Nest. Its CVSS base score is 7.5 (High).

Operationally, ranked at the 33th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and SC-5 (Denial-of-service Protection) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-40879 is a stack overflow vulnerability in the Nest framework, used for building scalable Node.js server-side applications. In versions prior to 11.1.19, the handleData() function recurses once per small, valid JSON message when an attacker sends many such messages in a single TCP frame. Although the buffer shrinks with each recursive call, the maxBufferSize limit is never reached, causing a call stack overflow and triggering a RangeError. A payload of approximately 47 KB is sufficient to exploit this issue, which is classified as CWE-674 (Uncontrolled Recursion).

A remote, unauthenticated attacker can exploit this vulnerability over the network (AV:N) with low attack complexity (AC:L), no privileges (PR:N), and no user interaction (UI:N). Successful exploitation leads to a denial of service through server crash, with a CVSS v3.1 base score of 7.5 (high availability impact, no confidentiality or integrity impact, unchanged scope).

The issue was addressed in Nest version 11.1.19. Security practitioners should upgrade to this version or later to mitigate the vulnerability. Additional details are available in the GitHub Security Advisory at https://github.com/nestjs/nest/security/advisories/GHSA-hpwf-8g29-85qm.

EU & UK References

Vulnerability Data

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;…

more

call stack overflows instead. A ~47 KB payload is sufficient to trigger RangeError. This vulnerability is fixed in 11.1.19.

CWE(s)

Related Threats

CVEs Like This One

CVE-2025-69211Same product: Nestjs Nest
CVE-2023-26108Same product: Nestjs Nest
CVE-2024-29409Same product: Nestjs Nest
CVE-2026-2293Same product: Nestjs Nest
CVE-2026-35515Same product: Nestjs Nest
CVE-2026-33011Same product: Nestjs Nest
CVE-2025-54782Same vendor: Nestjs
CVE-2026-61551Shared CWE-674
CVE-2026-63737Shared CWE-674
CVE-2025-67899Shared CWE-674

Affected Assets

nestjs
nest
≤ 11.1.19

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Input validation can reject or constrain data that would otherwise drive unbounded recursive calls.

DoS protection mechanisms limit the resource-exhaustion impact of uncontrolled recursion without eliminating the flaw.

System monitoring can observe anomalous resource consumption that signals runaway recursion after it begins.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development can detect excessive recursion via static analysis or fuzzing.

prevents

Secure coding standards directly prohibit or constrain recursive constructs that could exhaust stack or memory.

finds

Capacity management includes monitoring and limits that mitigate resource exhaustion from runaway recursion.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-674, a class-level weakness, and none of its children carries one either.

References