{"answers":{"affected":"2 open source packages ship an affected version, including @nestjs/devtools-integration. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54782 exists.","fix":"Upgrade @nestjs/devtools-integration to 0.2.1 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2025-54782 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54782 exists.\n\nAffected packages and fixed versions:\n- @nestjs/devtools-integration (npm): affected all versions; fixed in 0.2.1\n- @nestjs/devtools-integration (npm): affected all versions; fixed in 0.2.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-54782/ (Markdown: https://insights.sbomify.com/CVE-2025-54782/index.md)","id":"CVE-2025-54782","markdown":"https://insights.sbomify.com/CVE-2025-54782/index.md","name":"CVE-2025-54782","record":{"aliases":["GHSA-85cg-cmq5-qjm7"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"NestJS devtools package","requires_auth":"none","summary":"A malicious website can trigger remote code execution on a developer's machine via an unsafe sandbox in the NestJS devtools integration package.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"devtools-integration","vendor":"nestjs"}],"cvss":{"score":9.4,"severity":"critical","source":"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","version":"4.0"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"},{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2025-10-22","github_poc":2,"max_poc_stars":0,"metasploit":0,"nuclei":1,"refs":[{"date":"2025-10-22T09:48:04Z","kind":"github_poc","ref":"https://github.com/vxaretra/CVE-2025-54782","stars":0,"title":"PoC for CVE-2025-54782"},{"date":"2025-11-06T06:46:56Z","kind":"github_poc","ref":"https://github.com/DDestinys/CVE-2025-54782","stars":0,"title":"CVE-2025-54782"},{"date":null,"kind":"nuclei","ref":"http/cves/2025/CVE-2025-54782.yaml","stars":null,"title":"NestJS DevTools Integration - Remote Code Execution"}],"tier":"weaponised"},"has_fix":true,"headline":"@nestjs/devtools-integration's CSRF to Sandbox Escape Allows for RCE against JS Developers","id":"CVE-2025-54782","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":2,"n_references":5,"next":{"headline":"SuiteCRM: Reflected Cross Site Scripting (XSS) through HTTP Referrer header","id":"CVE-2025-54783"},"packages":[{"ecosystem":"npm","fixed":["0.2.1"],"introduced":["0"],"last_affected":[],"package":"@nestjs/devtools-integration","purl":null,"source":"GHSA-85cg-cmq5-qjm7"},{"ecosystem":"npm","fixed":["0.2.1"],"introduced":["0"],"last_affected":[],"package":"@nestjs/devtools-integration","purl":"pkg:npm/%40nestjs/devtools-integration","source":"GHSA-85cg-cmq5-qjm7"}],"prev":{"headline":"Himmelblau leaks an Intune service access token in its logs","id":"CVE-2025-54781"},"products":["nest"],"published":"2025-08-01","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-08-04","vendors":["nestjs"]},"summary":"A malicious website can trigger remote code execution on a developer's machine via an unsafe sandbox in the NestJS devtools integration package.","url":"https://insights.sbomify.com/CVE-2025-54782/"}