<!-- XE-16847 · [Medium] Go client SDK has no HTTP timeout on any method — a stalling node hangs the caller forever · testnet -->
*Markdown view of <https://bounty.xe.network/XE-16847>. The page is the record; this is the same page for reading.*

XE-16847 · Bounty

# \[Medium\] Go client SDK has no HTTP timeout on any method — a stalling node hangs the caller forever

Closed · duplicate
—claimed Medium
[xe#673](https://github.com/xeprotocol/xe/issues/673)
filed 2026-11-17 06:39 UTC
by kecedanzz77-bit

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Medium

Area
:   SDK / docs / web

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-22 23:26 UTC

Told
:   2026-11-22 23:26 UTC

### Patches

None linked.

### History

- [770244](https://bounty.xe.network/log/770244) 2026-11-22 23:26 UTC reply.mirror\_failed
- [769835](https://bounty.xe.network/log/769835) 2026-11-22 23:26 UTC proposal.adopted
- [769834](https://bounty.xe.network/log/769834) 2026-11-22 23:26 UTC reply.sent
- [769833](https://bounty.xe.network/log/769833) 2026-11-22 23:26 UTC proposal.adopted
- [769832](https://bounty.xe.network/log/769832) 2026-11-22 23:26 UTC ticket.status new → closed
- [768777](https://bounty.xe.network/log/768777) 2026-11-22 23:25 UTC proposal.adopted
- [768776](https://bounty.xe.network/log/768776) 2026-11-22 23:25 UTC ticket.facts area
- [768775](https://bounty.xe.network/log/768775) 2026-11-22 23:25 UTC proposal.adopted
- [768774](https://bounty.xe.network/log/768774) 2026-11-22 23:25 UTC ticket.facts
- [768773](https://bounty.xe.network/log/768773) 2026-11-22 23:25 UTC proposal.adopted
- [768772](https://bounty.xe.network/log/768772) 2026-11-22 23:25 UTC ticket.facts
- [766669](https://bounty.xe.network/log/766669) 2026-11-22 23:17 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-16847) · [JSON](https://bounty.xe.network/v1/tickets/XE-16847) · [markdown](https://bounty.xe.network/XE-16847.md)

### Report

## Summary

Every 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.

## Root cause

`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).

## Verification

Executed PoC: fake server that accepts and never responds → `GetBalances` still blocked after 5s (never returns).

## Impact

A 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`.

## Note on related reports

Searched `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.

## Suggested fix

Give the SDK a shared `http.Client` with a sensible timeout (e.g. 30s) and use it for all requests.

### Thread

**Joseph Denne**team2026-11-22 23:26 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, 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-16847 and says what differs; it is read like any other.
