NetSight
medium6.9No CVE yet

GHSA-w67g-5rqw-f597

Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key

Impact

gorilla/websocket used `math/rand` (cryptographically weak pseudo-random number generator) to generate WebSocket frame mask keys prior to commit d67f4185. WebSocket masking keys MUST be unpredictable to prevent frame content injection attacks. math/rand produces deterministic output when seeded with a known value, enabling an attacker to predict or recover mask keys and inject content into WebSocket connections. **Type:** Use of Cryptographically Weak Pseudo-Random Number Generator **Fix:** Replaced math/rand with crypto/rand (commit d67f4185, released in v1.5.3) **Credit:** bounty-hunter v6.0 silent-fix detection

An attacker can exploit this over the network, without logging in, without any action by a user. If it succeeds: low risk of data being read, low risk of data or systems being changed.

Affected packages

EcosystemPackageAffectedFixed in
gogithub.com/gorilla/websocket< 1.5.31.5.3

Weakness classification

References