{"id":"XE-13880","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":2401,"title":"node: SSH gateway has no per-connection channel limit — one authenticated connection can open unbounded direct-tcpip channels, bypassing the 100-connection cap and exhausting tunnel resources","area":"node-api","claimed_tier":"minor","assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-15T05:58:32.484824+00:00","updated_at":"2026-11-20T19:45:36.633192+00:00","source_created_at":null,"told_at":"2026-11-20T19:45:36.670699+00:00","status_changed_at":"2026-11-20T19:45:36.646392+00:00","url":"https://bounty.xe.network/XE-13880","body":"Verification: surfaced by an independent second-opinion model review of the public source and then verified line-by-line by direct code trace against xeprotocol/xe @ 89a542ea51d38375299aee54c6c99102e9bfa666 (static verification; no dynamic PoC). Key code excerpts are attached as evidence.\n\n### Summary\n\n`maxSSHConnections` bounds concurrent TCP connections to the gateway\nat 100, but nothing bounds SSH channels within one connection. A\nclient holding any accepted lease and its SSH access key opens a\nsingle connection and then opens `direct-tcpip` channels without\nlimit, keeping them open. Each accepted channel consumes a handler\ngoroutine, a backend tunnel to the provider peer (libp2p stream via\n`OpenTunnel`), and two copy goroutines. The attacker multiplies\nresource consumption by orders of magnitude beyond what the\nconnection cap was designed to allow, exhausting gateway goroutines,\nmemory, or provider tunnel capacity and degrading the gateway for\nother users.\n\n### Reachability — stated plainly\n\n- Prerequisite: one accepted lease with an SSH access key (the normal\n  customer credential). The attack runs entirely inside one\n  authenticated connection, so per-connection accounting never sees it.\n- `x/crypto/ssh` servers are expected to bound channels themselves;\n  this gateway accepts channels in an unguarded `for ... range chans`\n  loop.\n\n### Suggested fix\n\nAdd a per-connection channel semaphore (and ideally a per-lease tunnel\ncap) in `handleConnection`: reject new `direct-tcpip` channels once a\nconnection holds a bounded number of concurrent channels.\n\n### Dedupe\n\nNot among our 16 filed tickets (XE-12911..XE-13213). Phase 2\nexplicitly named the SSH-gateway side of leasing unexplored\n(AUDIT-PHASE2.md). Distinct from XE3-DRAFT-SSH1 (pre-auth slot\nexhaustion by unauthenticated clients); this item is post-auth and\nper-channel.","patch_refs":[],"thread":[{"id":14998,"source":"desk","source_ref":"reply:12889","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as an earlier report that is not public, 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-13880 and says what differs; it is read like any other.","created_at":"2026-11-20T19:45:36.633192+00:00"}]}