
事前認証n8nエクスプロイトチェーン:任意ファイル読み取り(CVE-2026-21858)から式インジェクションによるRCE(CVE-2025-68613)まで、Dockerラボ、PoCスクリプト、解析を備えた内容です。
Ni8mare 脆弱性チェーンの実践環境(Vulnerable Lab)と詳細なエクスプロイト分析レポートです。n8n プラットフォーム上で、Arbitrary File Read(CVE-2026-21858)から Remote Code Execution(CVE-2025-68613)まで、認証なしで攻撃可能です。
完全な分析資料と、各ステップを図解した PoC スクリーンショットは、公式レポートをご覧ください:
(レポート内容: n8n のアーキテクチャ分析、Content-Type Confusion の原理、Expression Injection によるサンドボックスエスケープ、ファイル読み取りから RCE までのエクスプロイトチェーン、ソースコードのデバッグトレース、根本原因分析、および修正推奨事項)。
| 属性 | 詳細 |
|---|---|
| CVE ID | CVE-2026-21858 (File Read) + CVE-2025-68613 (RCE) |
| 名称 | Ni8mare |
| 脆弱性の種類 | Content-Type Confusion (Arbitrary File Read) + Expression Injection (Sandbox Escape → RCE) |
| 重大度 | Critical — CVSS 10.0 + 9.9 |
| 影響を受ける製品 | n8n < 1.121.0(ファイル読み取り)/ 0.211.0 – < 1.120.4 (RCE) |
| 認証要件 | 認証不要 (pre-auth full chain) |
Content-Type Confusion Forge Admin JWT Expression Injection
(CVE-2026-21858) (CVE-2025-68613)
POST application/json --> Đọc config + DB --> Tạo workflow với
filepath: /etc/passwd Tính jwt_secret malicious expression
Ký admin token this.process.mainModule
.require("child_process")
Arbitrary File Read --> Auth Bypass --> Remote Code Execution
(CVSS 10.0) (CVSS 9.9)
cd ni8mare-lab
docker compose up -d --build
docker compose logs -f
バナー "Ni8mare Lab -- READY!" にバージョン 1.65.0 が表示されたら、ラボは準備完了です。http://localhost:5678/ で n8n にアクセスしてください。
[email protected] / ExploitLab123!docker compose down -v
├── REPORT.md # Báo cáo phân tích kỹ thuật & PoC chi tiết
├── ni8mare-lab/ # Môi trường Docker lab
│ ├── docker-compose.yml # Cấu hình Docker n8n 1.65.0
│ ├── Dockerfile # Custom image với setup script
│ └── init/setup.sh # Script tạo admin + workflow vulnerable
├── ni8mare_exploit.py # Exploit script — target Docker Linux (lab)
├── ni8mare_exploit_2.py # Exploit script — target Windows (n8n build từ source, dùng để debug)
└── img/ # Hình ảnh minh chứng PoC
├── setup-*.png # Screenshots thiết lập lab
├── condition-*.png # Screenshots điều kiện khai thác
├── recon-*.png # Screenshots reconnaissance
├── exploit-*.png # Screenshots exploitation
└── debug-*.png # Screenshots debug source code