一、 漏洞 CVE-2025-54782 基础信息
漏洞信息
                                        # NestJS Devtools CSRF绕过RCE漏洞

## 概述

Nest 是一个用于构建可扩展 Node.js 服务端应用的框架。在版本 0.2.0 及以下中,@nestjs/devtools-integration 包存在一个严重的远程代码执行(RCE)漏洞。

## 影响版本

- 受影响版本:0.2.0 及以下
- 修复版本:0.2.1

## 漏洞细节

该包在启用时会暴露一个本地开发 HTTP 服务器,并提供一个 API 接口。其中 `/inspector/graph/interact` 端点接收包含 `code` 字段的 JSON 数据,并使用 Node.js 的 `vm.runInNewContext` 在沙箱中执行该代码。但由于沙箱配置不当且缺乏跨源保护机制,攻击者可通过诱导开发者访问恶意网站,实现任意代码执行。

## 漏洞影响

- 开发者本地机器上的代码可在不受限条件下被执行
- 无需用户交互,仅通过访问恶意网站即可触发
- 可能导致敏感数据泄露、系统被控制等严重后果
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
@nestjs/devtools-integration's CSRF to Sandbox Escape Allows for RCE against JS Developers
来源:美国国家漏洞数据库 NVD
漏洞描述信息
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.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
在命令中使用的特殊元素转义处理不恰当(命令注入)
来源:美国国家漏洞数据库 NVD
二、漏洞 CVE-2025-54782 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2025-54782 的情报信息
  • 标题: VM (executing JavaScript) | Node.js v24.5.0 Documentation -- 🔗来源链接

    标签: x_refsource_MISC

  • 标题: Critical Vulnerability in NestJS Devtools: Localhost RCE via... -- 🔗来源链接

    标签: x_refsource_MISC

  • 标题: GitHub - JLLeitschuh/nestjs-devtools-integration-rce-poc: A demonstration of the RCE vulnerability in the @nestjs/devtools-integration -- 🔗来源链接

    标签: x_refsource_MISC

  • 标题: @nestjs/devtools-integration: CSRF to Sandbox Escape Allows for RCE against JS Developers · Advisory · nestjs/nest · GitHub -- 🔗来源链接

    标签: x_refsource_CONFIRM

  • 标题: GitHub - JLLeitschuh/nestjs-typescript-starter-w-devtools-integration -- 🔗来源链接

    标签: x_refsource_MISC

  • https://nvd.nist.gov/vuln/detail/CVE-2025-54782
四、漏洞 CVE-2025-54782 的评论

暂无评论


发表评论