Skip to main content

Nest.js CVE-2026-40879

HIGH
Uncontrolled Recursion (CWE-674)
2026-04-21 GitHub_M GHSA-hpwf-8g29-85qm
7.5
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

5
Re-analysis Queued
Apr 22, 2026 - 21:37 vuln.today
cvss_changed
Analysis Generated
Apr 21, 2026 - 20:50 vuln.today
Patch released
Apr 21, 2026 - 20:30 nvd
Patch available
Analysis Generated
Apr 21, 2026 - 20:00 vuln.today
CVE Published
Apr 21, 2026 - 19:14 nvd
HIGH 7.5

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 npm packages depend on @nestjs/microservices (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 11.1.19.

DescriptionGitHub Advisory

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.

AnalysisAI

Remote attackers can crash Nest.js applications (versions prior to 11.1.19) by sending approximately 47 KB of fragmented JSON messages within a single TCP frame, triggering a call stack overflow. The handleData() function's recursive processing of small valid JSON messages causes stack exhaustion before maxBufferSize limits are enforced, resulting in RangeError and denial of service. No authentication required (CVSS AV:N/PR:N). Vendor patch released in version 11.1.19. EPSS data not available; no confirmed active exploitation (not in CISA KEV).

Technical ContextAI

Nest.js is a progressive Node.js framework for building server-side applications, using TypeScript and following Angular-like architectural patterns. This vulnerability (CWE-674: Uncontrolled Recursion) resides in the TCP message parsing layer where handleData() processes incoming data streams. When multiple small, well-formed JSON messages arrive concatenated in a single TCP frame, the parser enters recursive processing-shrinking the buffer incrementally with each parsed message rather than iterating. The recursion depth correlates with message count, not total payload size, allowing attackers to bypass the maxBufferSize protection mechanism entirely. The call stack exhausts before buffer size limits trigger, causing JavaScript runtime RangeError exceptions that crash the Node.js process.

RemediationAI

Upgrade Nest.js to version 11.1.19 or later, which implements iterative message processing to prevent call stack overflow. Update package.json dependency to "@nestjs/core": "^11.1.19" and run npm install or yarn install, followed by application restart. Review the GitHub security advisory at https://github.com/nestjs/nest/security/advisories/GHSA-hpwf-8g29-85qm for complete upgrade instructions. If immediate patching is not feasible, implement compensating controls: (1) Deploy application-layer rate limiting to restrict TCP connections per source IP (limit 10 connections/minute), which reduces attack surface but may impact legitimate high-volume clients; (2) Configure upstream reverse proxy (nginx/HAProxy) with client_body_buffer_size limits and connection timeouts to reject oversized or slow requests-note this may false-positive on mobile clients with variable connectivity; (3) Enable process monitoring with automatic restart policies (PM2, Kubernetes liveness probes) to recover from crashes within seconds, though this only mitigates availability impact without preventing exploitation.

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2013-4660 MEDIUM POC
6.8 Jun 28

The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic

CVE-2016-2107 MEDIUM POC
5.9 May 05

The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a

Share

CVE-2026-40879 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy