CVE-2025-54782
Nestjs Devtools-integration vulnerability
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.
Affected products
Devtools-integration. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Nestjs Devtools-integration runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/nestjs/nest/security/advisories/GHSA-85cg-cmq5-qjm7 · Exploit
- socket.dev/blog/nestjs-rce-vuln · Exploit
- github.com/JLLeitschuh/nestjs-devtools-integration-rce-poc · Exploit
- github.com/JLLeitschuh/nestjs-typescript-starter-w-devtools-integration
- nodejs.org/api/vm.html
- jlleitschuh.org/nestjs-devtools-integration-rce-poc
- nvd.nist.gov/vuln/detail/CVE-2025-54782
- github.com/advisories/GHSA-85cg-cmq5-qjm7
- nvd.nist.gov/vuln/detail/CVE-2025-54782
- cve.org/CVERecord?id=CVE-2025-54782
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.