{"id":"XE-11928","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":2308,"title":"SSH gateway binds 0.0.0.0 with no localhost-only option","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-13T11:18:03.516721+00:00","updated_at":"2026-11-20T00:50:09.505286+00:00","source_created_at":null,"told_at":"2026-11-20T00:50:09.522541+00:00","status_changed_at":"2026-11-20T00:50:09.511668+00:00","url":"https://bounty.xe.network/XE-11928","body":"## SSH gateway binds 0.0.0.0 with no localhost-only option (the only non-restrictable listener)\n\n### What\n`cmd/xe/main.go:1421-1422`:\n```go\nsshPort := flags.Int(\"ssh-port\", 0, \"SSH gateway port (0 = disabled)\")\n...\nsshAddr := fmt.Sprintf(\"0.0.0.0:%d\", *sshPort)\ngw, err := node.NewSSHGateway(sshAddr, *data, n)\n```\n`NewSSHGateway` (`node/ssh_gateway.go:41`) does a bare `net.Listen(\"tcp\", \"0.0.0.0:PORT\")`. There is\n**no bind-address flag** — the SSH gateway always listens on every interface. The API/UI/ops\nservers all take an `apiBind`/`uiBind` host (with an explicit `0.0.0.0`/`::` check at `:1510`),\nbut the SSH gateway is the one listener with no host option, so an operator who wants the gateway\nto be LAN-only or loopback-only **cannot** — enabling `--ssh-port` exposes it on all interfaces,\nincluding the WAN face of a residential / VPS provider node.\n\n### Impact\nA provider node with `--ssh-port` set exposes its SSH/lease-tunnel gateway on every interface with\nno way to restrict it to loopback/LAN. Combined with the per-IP connection caps (`maxConnsPerIP`),\nit's still a broader exposure than the operator may intend, and there's no config to tighten it.\n\n### Fix\nAdd a `--ssh-bind` (or reuse the `apiBind` host) for the SSH gateway, defaulting to `127.0.0.1`,\nand only bind `0.0.0.0` when explicitly requested.","patch_refs":[],"thread":[{"id":13612,"source":"desk","source_ref":"reply:11634","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-11928 and says what differs; it is read like any other.","created_at":"2026-11-20T00:50:09.505286+00:00"}]}