Bounty
XE-13246 · Bounty

[High] libp2p tunnel path bypasses consumer authentication — any peer can open a raw stream to any accepted lease's VM

Closed · duplicate —claimed High xe#375 filed 2026-11-11 12:02 UTC by agung marley

Report

Summary

ValidateTunnelLease (node/node.go:2176-2189) never uses its peerID parameter: it checks only lease existence, LeaseAccepted state, and that the node is the provider. The HTTP tunnel path requires X-Signature over the lease hash verified against lease.AccessPubKey (api/tunnel.go:36-48); the libp2p /xe/tunnel/2.0.0 stream path requires nothing. Lease hashes are public (GET /leases, gossip), so any libp2p peer can open a raw TCP pipe to any leased VM's sshd (fingerprinting, SSH attack surface, auth-attempt oracle; shell access still gated by sshd authorized_keys — hence High, not Critical).

Reproduction (full PoC: poc-f5.md)

Local 2-node devnet, private genesis, stock binary. Provider + consumer lease 70954c57… accepted (consumer d8349ec8…, provider df137ba7…, cost 0.002584 XUSD). A bare libp2p probe (random identity, netcheck handshake OK) wrote only the 32-byte lease hash:

  • Real hash → 0x01 "mock manager does not support SSH" — passed ValidateTunnelLease, failed only at the mock VM backend.
  • Unknown hash → 0x01 "lease not found" — failed at validation.
  • Provider log confirms the two distinct branches.
  • HTTP POST /tunnel/{hash}/tcp without X-Signature → 401 {"error": "missing X-Signature header"} (404 for unknown lease).

A second in-process run (real node.Node ×2, real SetupTunnelHandler / ValidateTunnelLease / OpenTunnel, VM backend stubbed with a canned SSH banner because the stock mock manager refuses SSH dials and there is no KVM here) showed the attacker node (≠ consumer) receiving status 0x00 and reading the banner SSH-2.0-OpenSSH_9.6p1 F5-PoC, with its SSH client hello arriving at the VM endpoint through the tunnel. No shell was obtained or attempted.

Fix direction

Verify the same lease-hash signature against AccessPubKey on the libp2p path, or bind the stream to the consumer's peer identity recorded at accept time.

My XE address for any reward: 5422b32c07cf2b2ca53b00c2073be5a895dae3fdf13645c05ebdd1c08864cf8f

— @agngmarley

poc-f5.md

Thread

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