InferiorAK/CVE-2025-55182-React2Shell-Async-Scanner
GitHub: InferiorAK/CVE-2025-55182-React2Shell-Async-Scanner
针对 CVE-2025-55182 与 CVE-2025-66478 的异步 RCE 扫描器,利用 React Server Actions 原型链污染实现零误报的 Canary 回显验证。
Stars: 0 | Forks: 0
# ⚡ React2Shell
### CVE-2025-55182 / CVE-2025-66478 - 异步 RCE 扫描器
[](https://python.org)
[](https://nvd.nist.gov/vuln/detail/CVE-2025-55182)
[](https://nvd.nist.gov/vuln/detail/CVE-2025-66478)
[](LICENSE)
[](https://github.com/InferiorAK)
**原型链污染 → 通过 React Server Actions 实现远程代码执行**
*异步、版本优先、基于输出且无需盲目猜测的 Canary 验证机制*
## 目录
- [漏洞概述](#vulnerability-overview)
- [受影响版本](#affected-versions)
- [检测原理](#how-detection-works)
- [安装说明](#installation)
- [使用方法](#usage)
- [参数参考](#options-reference)
- [输出与判定结果](#output--verdicts)
- [浏览器模式](#browser-mode)
- [版本检测流程](#version-detection-pipeline)
## 漏洞概述
React Server Actions 将 action 数据作为 **multipart form data** 直接传递到服务端执行上下文中。由于受影响版本的 `react-server-dom-webpack` 对原型链污染的清理不足,攻击者可以:
1. 注入精心构造的 multipart payload 以污染 `Object.prototype`
2. 覆盖内部响应对象上的 `_response._prefix`
3. 通过以下方式强制服务器执行任意 shell 命令:
process.mainModule.require('child_process').execSync(cmd)
这使得任何使用 React Server Actions 且 React 版本受影响的公开 Next.js 应用面临 **未经身份验证的远程代码执行** 风险。
**CVE-2025-55182** - 广义:影响 React 19 软件包(`react-server-dom-webpack`、`react-server-dom-parcel`、`react-server-dom-turbopack`)
**CVE-2025-66478** - 严格:通过 `/` Server Action 端点进行的 Next.js 特定利用路径
## 受影响版本
| 组件 | 受影响版本 | 已修复版本 |
|-----------|-----------|---------|
| **React** `react-server-dom-*` | `19.0.0`, `19.1.0`, `19.1.1`, `19.2.0` | `19.0.1`, `19.1.2`, `19.2.1+` |
| **Next.js 16.x** | `16.0.0` – `16.0.6` | `16.0.7+` |
| **Next.js 15.x** | `15.0.0-15.0.4`, `15.1.0-15.1.8`, `15.2.0-15.2.5`, `15.3.0-15.3.5`, `15.4.0-15.4.7`, `15.5.0-15.5.6` | `15.0.5+`, `15.1.9+`, `15.2.6+`, `15.3.6+`, `15.4.8+`, `15.5.7+` |
| **Next.js 14.x** | `14.3.0-canary.77+` 仅限 canary 构建 | 所有稳定版 14.x - **不受影响** |
| **Next.js 13.x** | - | **不受影响** |
## 检测原理
本扫描器采用 **基于输出的 Canary 验证** —— 这是确认真实代码执行最可靠的方法,可实现零误报:
```
1. POST / with Next-Action header + multipart prototype-pollution payload
2. Payload executes: echo