{"id":"XE-13232","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"358","source_url":"https://github.com/xeprotocol/xe/issues/358","reporter_id":1180,"title":"[Low-Medium] Unauthenticated vm_status / GET /vms/{lease} — network-wide live-VM enumeration","area":"node-api","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-0015","tracked":true,"internal_ref":"#1083","internal_url":"https://github.com/xeprotocol/core/issues/1083","status":"closed","closed_reason":"duplicate","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:02.069371+00:00","updated_at":"2026-11-20T00:06:02.092061+00:00","source_created_at":"2026-11-11T07:43:23+00:00","told_at":"2026-11-20T00:04:24+00:00","status_changed_at":"2026-11-20T00:04:20.980477+00:00","url":"https://bounty.xe.network/XE-13232","body":"# [Low-Medium] Unauthenticated vm_status / GET /vms/{lease} — network-wide live-VM enumeration\n\n**Severity (suggested):** Low-Medium\n\n## Root cause\n`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.\n\n## Impact\nAnyone can enumerate every live VM's status/resources across the network; each request on a non-provider forces a remote RPC (amplification).\n\n## Steps to reproduce\n`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.\n\n## Fix\nAuthorize the caller against the lease (consumer or provider) in the `vm_status` handler.\n","patch_refs":[],"thread":[{"id":3118,"source":"github","source_ref":"6790278395","author":"urelkdubdqwr","team":false,"body":"XE payout address for this finding: `10b3dcf69edda38c4b579ade45e0bb110c04ce7215837d8f0b784916d5a50405`","created_at":"2026-11-11T07:48:52+00:00"},{"id":10063,"source":"web","source_ref":"reporter:1180:057db78e76222793","author":"urelkdubdqwr","team":false,"body":"Live re-confirmation at testnet-0006 (public repo HEAD 8cc209d) — surface still unauthenticated.\n\n- Unauthenticated probe from an external host (no token, no cookie, no referer):\n  GET https://test.network/api/vms -> HTTP 200, body `[]` (empty only because no lease VM is\n  currently running; the auth gap is live regardless).\n- Head code at 8cc209d:\n  api/handler.go:203   {\"GET\", \"/vms\", \"All running VMs\", h.handleGetVMs}   // registered with NO admin/auth wrapper\n  api/vm.go:98-100     handleGetVMs -> writeJSON(w, 200, h.node.GetVMs())  // no ownership check\n  node/vm.go:40-55     \"vm_status\" returns vm.Info, which embeds Credentials{Username,Password} (vm/vm.go:20-25)\n- Impact: the moment any lease VM is running, its root credentials are served to any unauthenticated\n  client, and /vms + /vms/{lease} are a network-wide live-VM enumeration oracle.\n- Suggested fix: wrap the /vms and /vms/{lease} routes behind requireAdmin (or an owner check) and stop\n  returning Credentials in vm_status to non-owners.\n\nThis is the same root cause as XE-0131 (closed) / XE-5534 (dispute closed) — both marked closed while the\ndefect is present at HEAD.","created_at":"2026-11-17T11:35:23.125462+00:00"},{"id":10999,"source":"web","source_ref":"reporter:1180:5e5e4505404b971a","author":"urelkdubdqwr","team":false,"body":"## Escalation — live proof, HEAD `8cc209d` (testnet-0006)\n\nBukti live (2026-11-17 16:5x UTC, no auth header, no session):\n```\nGET https://test.network/api/vms          -> HTTP 200   body: []\nGET https://test.network/api/blocks/recent-> HTTP 200\n```\nBody kosong hanya karena TIDAK ADA lease VM yang jalan saat probe — handler-nya tetap terpanggil untuk\npengunjung anonim. Bukti kode di HEAD `8cc209d`:\n- `api/handler.go:203` `{\"GET\", \"/vms\", \"All running VMs\", h.handleGetVMs}` — **tanpa** `h.requireAdmin`\n- bandingkan `api/handler.go:199` `{\"POST\", \"/lease/request\", ..., h.requireAdmin(h.handleLeaseRequest)}` — mereka TAHU cara bikin admin-only, route ini lupa.\n- `api/vm.go:98-99` + `node/vm.go:40` (`vm_status`) — respons VM memuat status/credential lease.\n\nImplikasi: begitu ada satu lease VM hidup, siapa pun tanpa auth bisa membaca metadata/credential VM itu.\nRekomendasi fix: bungkus `handleGetVMs`/`handleGetVM` dengan `h.requireAdmin` (atau redact field credential untuk pemanggil anonim).","created_at":"2026-11-17T16:55:31.623478+00:00"},{"id":12510,"source":"github","source_ref":"7025790008","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0015, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-13232 and says what differs; it is read like any other.","created_at":"2026-11-20T00:04:24+00:00"}]}