Bounty
XE-13229 · Bounty

[Medium] ValidateTunnelLease ignores the connecting peer — any network peer can open a raw TCP tunnel into any active lease's VM

Closed · duplicate —claimed Medium xe#355 filed 2026-11-11 07:43 UTC by urelkdubdqwr

Report

[Medium] ValidateTunnelLease ignores the connecting peer — any network peer can open a raw TCP tunnel into any active lease's VM

Severity (suggested): Medium (up to 2,500 XE) — pre-auth network reachability of a tenant VM + unbounded per-peer stream DoS

Root cause

node/node.go:2176 ValidateTunnelLease(leaseHash string, peerID peer.ID) error takes peerID but never reads it. It only checks the lease exists, State == LeaseAccepted, and lease.Provider == n.KeyPair.Address(). There is no PeerForAccount(lease.Consumer) check. The consumer binding exists on the consumer side (OpenTunnelForLease resolves PeerForAccount(lease.Provider), node/node.go:2211) but the mirror check on the provider side was never implemented — the parameter was added to the TunnelValidator interface (net/tunnel.go:25) and left unused.

Impact

The provider→VM SSH backend is reachable by any libp2p peer that knows a lease hash (lease hashes are public via GET /leases). This bypasses the consumer-only network scoping, enables TCP/port scanning of the VM behind the provider's host, and gives a cheap per-peer multi-stream DoS (HandleTunnel spawns unbounded copies per request).

Steps to reproduce

  1. GET https://test.network/leases → pick any Accepted lease whose provider runs a VM backend.
  2. From an arbitrary libp2p peer, open a /xe/tunnel/2.0.0 stream to the provider and send the 32-byte lease hash.
  3. Observe status 0x00 and a live bidirectional pipe to the VM's SSH port — the consumer's identity is never validated.

Fix direction

In ValidateTunnelLease, require peerID == n.PeerForAccount(lease.Consumer) (mirror the consumer-side binding).

Thread

urelkdubdqwr2026-11-11 07:48 UTCgithub

XE payout address for this finding: 10b3dcf69edda38c4b579ade45e0bb110c04ce7215837d8f0b784916d5a50405

Joseph Denneteam2026-11-20 00:04 UTCgithub

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