一款高保真命令行漏洞扫描器,用于检测使用 React Server Components (RSC) 的 Next.js 应用中的 CVE-2025-55182 和 CVE-2025-66478(远程代码执行)。
这些严重漏洞影响使用 React Server Components 的 Next.js 应用,攻击者可通过精心构造的 multipart POST 请求实现未授权远程代码执行。
受影响版本:
技术详情请见:Assetnote Research
扫描器发送一个精心构造的 multipart POST 请求,其中包含一个 RCE 概念验证载荷,该载荷会执行一个确定性的数学运算(41*271 = 11111)。存在漏洞的主机将结果以 /login?a=11111 的形式返回到 X-Action-Redirect 响应头中。
| 模式 | 描述 | 适用场景 |
|---|---|---|
| RCE PoC(默认) | 在目标上执行无害的数学运算 | 快速确认漏洞 |
| 安全检测 | 通过错误响应进行侧信道检测 | 当不希望执行代码时 |
# Clone the repository
git clone https://github.com/YOUR_USERNAME/react2shell-scanner.git
cd react2shell-scanner
# Install dependencies
pip install -r requirements.txt
# Scan a single target
python scanner.py -u https://example.com
# Scan multiple targets from file
python scanner.py -l hosts.txt
# Multi-threaded scan with JSON output
python scanner.py -l hosts.txt -t 20 -o results.json
# Scan with custom headers
python scanner.py -u https://example.com -H "Authorization: Bearer token" -H "Cookie: session=abc"
# Safe detection mode (no code execution)
python scanner.py -u https://example.com --safe-check
# Scan Windows targets
python scanner.py -u https://example.com --windows
# WAF bypass mode
python scanner.py -u https://example.com --waf-bypass
# Vercel-specific WAF bypass
python scanner.py -u https://example.com --vercel-waf-bypass
# Combine options
python scanner.py -l hosts.txt -t 50 --waf-bypass --windows -o results.json
╔═══════════════════════════════════════════════════════════════╗
║ react2shell-scanner ║
║ CVE-2025-55182 & CVE-2025-66478 Detection Tool ║
╚═══════════════════════════════════════════════════════════════╝
┌─────────────────────────────────────────────────────────────┐
│ SCAN CONFIGURATION │
├─────────────────────────────────────────────────────────────┤
│ Targets: 5 │
│ Threads: 10 │
│ Detection Mode: RCE PoC │
│ Payload Type: Unix (Shell) │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ TARGET: https://example.com │
├─────────────────────────────────────────────────────────────┤
│ Status: 🟢 SAFE │
│ HTTP Status: 200 │
│ Response Time: 245.32ms │
│ Server: Vercel │
└─────────────────────────────────────────────────────────────┘
═════════════════════════════════════════════════════════════════
SCAN SUMMARY
═════════════════════════════════════════════════════════════════
Total Targets: 5
Vulnerable: 0
Safe: 5
Total Scan Time: 2.34s
═════════════════════════════════════════════════════════════════
使用 -o results.json 时,结果将以 JSON 格式保存:
[
{
"url": "https://vulnerable-site.com",
"vulnerable": true,
"message": "RCE confirmed: X-Action-Redirect = /login?a=11111",
"status_code": 200,
"response_time": 342.15,
"server": "Next.js",
"payload_type": "rce-poc (Unix)",
"x_action_redirect": "/login?a=11111"
}
]
此工具仅用于授权安全测试。请仅针对您拥有明确测试权限的系统使用此扫描器。未经授权访问计算机系统是违法的。
作者不对因使用此工具而造成的任何滥用或损害负责。
MIT 许可证 - 详见 LICENSE 文件。
欢迎贡献!请随时提交 Pull Request。
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)| 选项 | 描述 |
|---|
-u, --url | 要检查的单个 URL |
-l, --list | 包含主机列表的文件(每行一个) |
-t, --threads | 并发线程数(默认:10) |
--timeout | 请求超时时间(秒)(默认:10) |
-o, --output | 结果输出文件(JSON 格式) |
--all-results | 保存所有结果,而不仅仅是存在漏洞的主机 |
-v, --verbose | 在输出中包含响应体 |
-q, --quiet | 仅输出存在漏洞的主机 |
--no-color | 禁用终端彩色输出 |
-k, --insecure | 禁用 SSL 证书验证 |
-H, --header | 自定义请求头(可多次使用) |
--safe-check | 使用安全的侧信道检测代替 RCE PoC |
--windows | 使用 Windows PowerShell 载荷代替 Unix shell |
--waf-bypass | 添加垃圾数据以绕过 WAF 内容检查 |
--waf-bypass-size | 垃圾数据大小(KB)(默认:128) |
--vercel-waf-bypass | 使用 Vercel WAF 绕过载荷变体 |