
Catena di exploit n8n pre-autenticazione: lettura arbitraria di file (CVE-2026-21858) fino a RCE tramite injection di espressioni (CVE-2025-68613), con lab Docker, script PoC, analisi.
Ambiente di esercitazione (Vulnerable Lab) e report dettagliato di analisi e sfruttamento della catena di vulnerabilità Ni8mare sulla piattaforma n8n — da Arbitrary File Read (CVE-2026-21858) a Remote Code Execution (CVE-2025-68613), senza autenticazione.
Consulta il documento di analisi completo con immagini PoC che illustrano ogni passaggio nel report ufficiale:
(Il report include: analisi dell'architettura di n8n, principio del Content-Type Confusion, sandbox escape tramite Expression Injection, catena di sfruttamento da file read a RCE, debug trace del codice sorgente, root cause analysis e raccomandazioni di rimedio).
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
Quando vedi il banner "Ni8mare Lab -- READY!" con la versione 1.65.0, il lab è pronto. Accedi a n8n su http://localhost:5678/.
[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
| Proprietà | Dettagli |
|---|
| CVE ID | CVE-2026-21858 (File Read) + CVE-2025-68613 (RCE) |
| Nome | Ni8mare |
| Tipo di vulnerabilità | Content-Type Confusion (Arbitrary File Read) + Expression Injection (Sandbox Escape → RCE) |
| Gravità | Critical — CVSS 10.0 + 9.9 |
| Prodotto interessato | n8n < 1.121.0 (file read) / 0.211.0 – < 1.120.4 (RCE) |
| Autenticazione richiesta | Non richiesta (pre-auth full chain) |