<!-- XE-9838 · Unauthenticated Information Disclosure: GET /vms and GET /vms/{lease} expose private consumer credentials and VM metadata to unauthenticated callers · testnet -->
*Markdown view of <https://bounty.xe.network/XE-9838>. The page is the record; this is the same page for reading.*

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

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   Node / API

Duplicate of
:   [XE-0015](https://bounty.xe.network/XE-0015) fixing

Tracked
:   internally

Updated
:   2026-11-20 00:33 UTC

Told
:   2026-11-20 00:33 UTC

### Patches

None linked.

### History

- [552418](https://bounty.xe.network/log/552418) 2026-11-20 00:33 UTC proposal.adopted
- [552417](https://bounty.xe.network/log/552417) 2026-11-20 00:33 UTC reply.sent
- [552416](https://bounty.xe.network/log/552416) 2026-11-20 00:33 UTC ticket.status new → closed
- [551799](https://bounty.xe.network/log/551799) 2026-11-20 00:33 UTC proposal.adopted
- [551798](https://bounty.xe.network/log/551798) 2026-11-20 00:33 UTC ticket.facts area
- [551797](https://bounty.xe.network/log/551797) 2026-11-20 00:33 UTC proposal.adopted
- [551796](https://bounty.xe.network/log/551796) 2026-11-20 00:33 UTC ticket.facts
- [551795](https://bounty.xe.network/log/551795) 2026-11-20 00:33 UTC proposal.adopted
- [551794](https://bounty.xe.network/log/551794) 2026-11-20 00:33 UTC ticket.facts
- [551793](https://bounty.xe.network/log/551793) 2026-11-20 00:33 UTC proposal.adopted
- [551792](https://bounty.xe.network/log/551792) 2026-11-20 00:33 UTC ticket.facts
- [550758](https://bounty.xe.network/log/550758) 2026-11-20 00:30 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-9838) · [JSON](https://bounty.xe.network/v1/tickets/XE-9838) · [markdown](https://bounty.xe.network/XE-9838.md)

### 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 Denne**team2026-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.
