Security Digest · Vulnerability record

CVE-2025-54782: @nestjs/devtools-integration: CSRF to Sandbox Escape Allows for RCE against JS Developers

Nest is a framework for building scalable Node.js server-side applications.

CVSS 9.4 Critical EPSS 52.0% · p99

Should you act?

High exploit likelihood

EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 52.0%, percentile 99: FIRST’s model estimates a 52.0% chance of exploitation activity in the next 30 days, higher than 99% of all scored CVEs (very high). EPSS is a probability, not a verdict.
  • Only applies if your dependency tree includes @nestjs/devtools-integration (npm) <= 0.2.0, fixed in 0.2.1. Check your lockfile, including transitive dependencies.

What it is

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.

From the GitHub advisory

Summary 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.

A full blog post about how this vulnerability was uncovered can be found on Socket's blog.

Details The @nestjs/devtools-integration 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.

Key issues: 1. Unsafe Sandbox: The sandbox implementation closely resembles the abandoned safe-eval library. The Node.js vm module is explicitly documented as not providing a security mechanism for executing untrusted code. Numerous known sandbox escape techniques allow arbitrary code execution. 2. Lack of Proper CORS/Origin Checking: The server sets Access-Control-Allow-Origin to a fixed domain (https://devtools.nestjs.com) but does not validate the request's Origin or Content-Type. Attackers can craft POST requests with text/plain content type using HTML forms or simple XHR requests, bypassing CORS preflight checks.

By chaining these issues, a malicious website can trigger the vulnerable endpoint and achieve arbitrary code execution on a developer's machine running the NestJS devtools integration.

Weakness type: CWE-77, CWE-78, CWE-352.

Product: @nestjs/devtools-integration (npm) · Assigned by: GitHub_M · Published: 2025-08-01

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npm@nestjs/devtools-integration<= 0.2.00.2.1
VendorProductAffected versions (per CVE record)
nestjsnest< 0.2.1

Severity scores

Scored byCVSSScoreVector
GitHub_M4.09.4 CriticalCVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
GitHub4.09.4 CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
  • Attack vector: adjacent network only
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 52.01% probability of exploitation activity in the next 30 days; percentile 99.

Timeline

  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-85cg-cmq5-qjm7 published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-85cg-cmq5-qjm7 github.com
  2. CVE.org record CVE-2025-54782 cve.org
  3. NVD entry CVE-2025-54782 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com
  4. nodejs.org nodejs.org
  5. socket.dev socket.dev
  6. jlleitschuh.org jlleitschuh.org

Critical npm advisories · Today’s Security Digest