Patchfirst
CVE-2025-54782 Public exploit Critical · 9.4 EPSS 47.2%

@nestjs/devtools-integration's CSRF to Sandbox Escape Allows for RCE against JS Developers

Fix:upgrade devtools-integration to 0.2.1 or later Details ↓

nestjs · nest

Summary

A flaw in the @nestjs/devtools-integration package of the NestJS framework (nest) lets its local development HTTP server, which exposes an /inspector/graph/interact endpoint that runs submitted code in a Node.js vm.runInNewContext sandbox, be abused. An attacker can execute arbitrary code on a developer's machine by getting the developer to visit a malicious website while the devtools integration is enabled, since the sandbox is improperly isolated and cross-origin protections are missing, requiring no authentication or configuration beyond that.

Official description · CVE.org

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.

Breakdown
66.4 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 17 days after disclosure. Public exploit code (PoC-in-GitHub) appeared 3 months after disclosure.

  1. Disclosedday 0
  2. First seen exploitedVulnCheck KEV evidence+17 days
  3. Public exploit codePoC-in-GitHub+3 mo

Affected versions and fixes

as published in the CVE record

nestjs nest

Affected: < 0.2.1

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: @nestjs/devtools-integration.

npm@nestjs/devtools-integrationGHSA-85cg-cmq5-qjm7

Upgrade to 0.2.1 or later

npmnpm install @nestjs/devtools-integration@0.2.1

The first fix for CVE-2025-54782. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
All versions before 0.2.10.2.1

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

5 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close