Bounty
XE-9838 · Bounty

Unauthenticated Information Disclosure: GET /vms and GET /vms/{lease} expose private consumer credentials and VM metadata to unauthenticated callers

Closed · duplicate — web filed 2026-11-12 07:38 UTC by xe:e4cd6974

Report

Vulnerability Summary

In api/handler.go:200-201, the HTTP API exposes routes to inspect running virtual machine instances:

		{"GET", "/vms", "All running VMs", h.handleGetVMs},
		{"GET", "/vms/{lease}", "VM info for a lease", h.handleGetVM},

Notice that while administrative routes (like /lease/request or /lease/{hash}/renew) require h.requireAdmin(...), and chat message inspection requires ownership proof (requireChatOwnership), /vms and /vms/{lease} are completely unauthenticated and unprotected!

In api/vm.go:98-115:

func (h *Handler) handleGetVMs(w http.ResponseWriter, r *http.Request) {
	writeJSON(w, http.StatusOK, h.node.GetVMs())
}

func (h *Handler) handleGetVM(w http.ResponseWriter, r *http.Request) {
	leaseHash := r.PathValue("lease")
	if leaseHash == "" {
		writeError(w, http.StatusBadRequest, "missing lease hash")
		return
	}
	info := h.node.GetVM(leaseHash)
	if info == nil {
		writeError(w, http.StatusNotFound, "vm not found")
		return
	}
	writeJSON(w, http.StatusOK, info)
}

In vm/qemu_manager.go:264-269 and node/vm.go:120-165, vm.Info contains sensitive execution metadata:

type Info struct {
	LeaseHash    string       `json:"lease_hash"`
	Status       string       `json:"status"`
	Resources    *Resources   `json:"resources,omitempty"`
	Credentials  *Credentials `json:"credentials,omitempty"`
	CreatedAt    int64        `json:"created_at"`
	SSHPort      int          `json:"ssh_port,omitempty"`
	TunnelTarget string       `json:"tunnel_target,omitempty"`
}

When consumer nodes track active leases in n.consumerVMs (node/vm.go), the vm.Info struct stores the instance's access credentials, SSH ports, lease hashes, and tunnel target endpoints.


Vulnerable Code Locations

  • api/handler.go:200-201: /vms and /vms/{lease} are registered without h.requireAdmin or consumer signature verification.
  • api/vm.go:98-115: handleGetVMs and handleGetVM serialize vm.Info directly to any unauthenticated HTTP requester.

Attack & Failure Scenario

  1. Any unauthenticated network client (or external attacker scanning port 8080/API across the network) sends: GET http://<node-ip>:8080/vms
  2. The node dumps the entire list of currently active virtual machines, including:
    • LeaseHash (allowing targeted front-running of lease transactions).
    • Credentials (generated SSH passwords or keys if stored).
    • SSHPort and TunnelTarget (revealing internal network topology and host port bindings).
  3. The attacker can then connect to /tunnel/{leaseHash}/tcp or attack guest ports directly, compromising guest VM privacy and provider infrastructure.

Impact

  1. Confidentiality Breach / Credential Exposure: Unauthenticated third parties can harvest active VM lease identifiers, resource allocations, and access configurations across both provider and consumer nodes.
  2. Reconnaissance for VM Hijacking: Attackers gain actionable targeting data to direct tunnel hijacking or brute-force attacks against active VM instances.

Remediation

Require admin authorization (or ownership signature proof from the lease consumer/provider) on /vms and /vms/{lease} in api/handler.go:

		{"GET", "/vms", "All running VMs (operator only: requires admin bearer token)", h.requireAdmin(h.handleGetVMs)},
		{"GET", "/vms/{lease}", "VM info for a lease (operator only: requires admin bearer token)", h.requireAdmin(h.handleGetVM)},

Thread

Joseph Denneteam2026-11-20 00:33 UTCdesk

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-9838 and says what differs; it is read like any other.