
사전 인증 n8n 익스플로잇 체인: 임의 파일 읽기(CVE-2026-21858)에서 표현식 삽입 RCE(CVE-2025-68613)로 이어지는 공격 체인. Docker 랩, PoC 스크립트, 분석 포함.
n8n 플랫폼에서 인증 없이 Arbitrary File Read(CVE-2026-21858)에서 Remote Code Execution(CVE-2025-68613)까지 이어지는 Ni8mare 취약점 체인에 대한 실습 환경(Vulnerable Lab) 및 상세 익스플로잇 분석 보고서입니다.
단계별로 설명된 PoC 이미지가 포함된 전체 분석 문서는 공식 보고서에서 확인하세요:
(보고서 내용: n8n 아키텍처 분석, Content-Type Confusion 원리, Expression Injection 샌드박스 탈출, 파일 읽기에서 RCE까지의 익스플로잇 체인, 소스 코드 디버그 추적, 근본 원인 분석 및 수정 권장 사항)
| 속성 | 세부 정보 |
|---|---|
| CVE ID | CVE-2026-21858 (파일 읽기) + 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