Executive brief
Klever-Go's WebSocket subscription endpoint allows unauthenticated remote attackers to exhaust a node's memory and goroutines, crashing the entire node including its P2P and consensus functions. An attacker can send a single oversized message or open many connections to force resource exhaustion; the endpoint is exposed by default and accepts cross-origin requests, making it reachable even from browser-based attacks. No authentication, account, stake, or funds are required.
Technical details
The unauthenticated GET /subscribe WebSocket endpoint (network/api/websocket/routes.go) contains three compounding remote code execution gaps: (1) CheckOrigin always returns true, permitting cross-origin WebSocket upgrades; (2) no conn.SetReadLimit() is enforced, allowing a single WebSocket frame to trigger unbounded heap allocation in gorilla's JSON parsing; (3) no per-connection, per-IP, or global cap on live WebSocket connections, and req.Addresses is uncapped, causing both goroutine exhaustion and hub-map memory growth. The REST API runs in-process with the node, so crashing the API kills P2P and consensus participation. Attack vectors include network-reachable APIs and cross-origin browser drive-by attacks against localhost-bound nodes. Three independent PoCs confirm all gaps in production code at commit 23b74e1.
Affected products
- Klever Klever-Go up to commit 23b74e1
Timeline
- 2026-09-23: disclosed: GitHub advisory GHSA-4fwh-wrm6-97xm published