CVE-2025-54782 @nestjs/devtools-integration's CSRF to Sandbox Escape Allows for RCE against JS Developers
A malicious website can trigger remote code execution on a developer's machine via an unsafe sandbox in the NestJS devtools integration package.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-54782?
CVE-2025-54782 is a critical code injection vulnerability in nestjs nest, published on 1 Aug 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
Nest is a framework for building scalable Node.js server-side applications. In versions 0.2.0 and below, a critical Remote Code Execution (RCE) vulnerability was discovered in the @nestjs/devtools-integration package. When enabled, the package exposes a local development HTTP server with an API endpoint that uses an unsafe JavaScript sandbox (safe-eval-like implementation). Due to improper sandboxing and missing cross-origin protections, any malicious website visited by a developer can execute arbitrary code on their local machine. The package adds HTTP endpoints to a locally running NestJS development server. One of these endpoints, /inspector/graph/interact, accepts JSON input containing a code field and executes the provided code in a Node.js vm.runInNewContext sandbox. This is fixed in version 0.2.1.
Which versions are affected by CVE-2025-54782?
2 open source packages ship an affected version, including @nestjs/devtools-integration. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@nestjs/devtools-integration npm | All versions | 0.2.1 |
@nestjs/devtools-integration npm | All versions | 0.2.1 |
Products include Nestjs Devtools-Integration.
How do I fix CVE-2025-54782?
Upgrade @nestjs/devtools-integration to 0.2.1 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-54782 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54782 exists.
Public exploit code: 1 Nuclei template and 2 proofs of concept on GitHub.
Sources
Also known as GHSA-85cg-cmq5-qjm7.