[Low-Medium] Unauthenticated vm_status / GET /vms/{lease} — network-wide live-VM enumeration
Report
[Low-Medium] Unauthenticated vm_status / GET /vms/{lease} — network-wide live-VM enumeration
Severity (suggested): Low-Medium
Root cause
node/vm.go:40 vm_status handler only checks n.VMManager != nil; it never validates from against the lease's Consumer/Provider (contrast vm_credentials at node/vm.go:23-30, which verifies providerPeer == from). Public GET /vms/{lease} (api/vm.go:102) then proxies to the provider via this unauthenticated handler.
Impact
Anyone can enumerate every live VM's status/resources across the network; each request on a non-provider forces a remote RPC (amplification).
Steps to reproduce
GET https://test.network/vms/<any-lease-hash> → 200 with the live VM's status/resources/created_at; or a direct vm_status request from any peer.
Fix
Authorize the caller against the lease (consumer or provider) in the vm_status handler.
Thread
XE payout address for this finding: 10b3dcf69edda38c4b579ade45e0bb110c04ce7215837d8f0b784916d5a50405
Live re-confirmation at testnet-0006 (public repo HEAD 8cc209d) — surface still unauthenticated.
- Unauthenticated probe from an external host (no token, no cookie, no referer):
GET https://test.network/api/vms -> HTTP 200, body
[](empty only because no lease VM is currently running; the auth gap is live regardless). - Head code at 8cc209d: api/handler.go:203 {"GET", "/vms", "All running VMs", h.handleGetVMs} // registered with NO admin/auth wrapper api/vm.go:98-100 handleGetVMs -> writeJSON(w, 200, h.node.GetVMs()) // no ownership check node/vm.go:40-55 "vm_status" returns vm.Info, which embeds Credentials{Username,Password} (vm/vm.go:20-25)
- Impact: the moment any lease VM is running, its root credentials are served to any unauthenticated client, and /vms + /vms/{lease} are a network-wide live-VM enumeration oracle.
- Suggested fix: wrap the /vms and /vms/{lease} routes behind requireAdmin (or an owner check) and stop returning Credentials in vm_status to non-owners.
This is the same root cause as XE-0131 (closed) / XE-5534 (dispute closed) — both marked closed while the defect is present at HEAD.
Escalation — live proof, HEAD 8cc209d (testnet-0006)
Bukti live (2026-11-17 16:5x UTC, no auth header, no session):
GET https://test.network/api/vms -> HTTP 200 body: []
GET https://test.network/api/blocks/recent-> HTTP 200
Body kosong hanya karena TIDAK ADA lease VM yang jalan saat probe — handler-nya tetap terpanggil untuk
pengunjung anonim. Bukti kode di HEAD 8cc209d:
api/handler.go:203{"GET", "/vms", "All running VMs", h.handleGetVMs}— tanpah.requireAdmin- bandingkan
api/handler.go:199{"POST", "/lease/request", ..., h.requireAdmin(h.handleLeaseRequest)}— mereka TAHU cara bikin admin-only, route ini lupa. api/vm.go:98-99+node/vm.go:40(vm_status) — respons VM memuat status/credential lease.
Implikasi: begitu ada satu lease VM hidup, siapa pun tanpa auth bisa membaca metadata/credential VM itu.
Rekomendasi fix: bungkus handleGetVMs/handleGetVM dengan h.requireAdmin (atau redact field credential untuk pemanggil anonim).
Thanks. This is the same finding as https://bounty.xe.network/XE-0015, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-13232 and says what differs; it is read like any other.