{"id":"XE-16847","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"673","source_url":"https://github.com/xeprotocol/xe/issues/673","reporter_id":2920,"title":"[Medium] Go client SDK has no HTTP timeout on any method — a stalling node hangs the caller forever","area":"sdk-docs-web","claimed_tier":"medium","assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-17T06:39:33.753809+00:00","updated_at":"2026-11-22T23:26:11.855016+00:00","source_created_at":"2026-11-17T06:39:18+00:00","told_at":"2026-11-22T23:26:11.878037+00:00","status_changed_at":"2026-11-22T23:26:11.861873+00:00","url":"https://bounty.xe.network/XE-16847","body":"## Summary\n\nEvery Go client SDK method uses bare `http.Get` (→ `http.DefaultClient`, `Timeout: 0`) or `http.DefaultClient.Do` directly. There is no `http.Client{Timeout: ...}` anywhere in `client/` or `cmd/` — the only timeouts in the codebase are server-side. A malicious/compromised node, or a node behind a broken proxy, hangs any CLI command and any automation using the SDK indefinitely.\n\n## Root cause\n\n`client/client.go` (`GetChain`, `GetBalances`, `GetPending`, `SubmitBlock`, `GetProviders`, `GetLease`, `GetReputation`, `GetCertificate`, `GetLeases`, `GetVM`, `getJSON`) and `client/chat.go:88` (`do()`), plus `cmdLeaseRenew` (`cmd/xe/main.go:1134`). The CLI uses the SDK directly via `apiClient()` (`cmd/xe/main.go:241-243`, no wrapper).\n\n## Verification\n\nExecuted PoC: fake server that accepts and never responds → `GetBalances` still blocked after 5s (never returns).\n\n## Impact\n\nA healthy node won't stall (the server has Read/Write timeouts), but a light client must not trust the server to be responsive — that is the point of a client timeout. Affected CLI commands include `balance`, `receive`, `send`, `vm`, `lease renew`.\n\n## Note on related reports\n\nSearched `http client timeout hangs`: #659 (ours — `downloadImage`, different), #397 (chat send trusts server-advertised PoW difficulty — different mechanism, CPU pin via PoW, not HTTP), #359 (PoW infinite loop — different). No report on Go HTTP client timeouts.\n\n## Suggested fix\n\nGive the SDK a shared `http.Client` with a sensible timeout (e.g. 30s) and use it for all requests.","patch_refs":[],"thread":[{"id":18800,"source":"desk","source_ref":"reply:16477","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-16847 and says what differs; it is read like any other.","created_at":"2026-11-22T23:26:11.855016+00:00"}]}