{"id":"GHSA-w67g-5rqw-f597","summary":"Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key","details":"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.\n\n**Type:** Use of Cryptographically Weak Pseudo-Random Number Generator\n**Fix:** Replaced math/rand with crypto/rand (commit d67f4185, released in v1.5.3)\n**Credit:** bounty-hunter v6.0 silent-fix detection","aliases":["GO-2026-6278"],"modified":"2026-09-10T03:50:54.128553228Z","published":"2026-08-24T21:00:54Z","database_specific":{"cwe_ids":["CWE-338"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-08-24T21:00:54Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/canolgun-commits/websocket/security/advisories/GHSA-w67g-5rqw-f597"},{"type":"WEB","url":"https://github.com/gorilla/websocket/commit/d67f41855da42d7bccd9ef050c49f7e54e783b95"},{"type":"PACKAGE","url":"https://github.com/canolgun-commits/websocket"},{"type":"WEB","url":"https://github.com/gorilla/websocket/releases/tag/v1.5.3"}],"affected":[{"package":{"name":"github.com/gorilla/websocket","ecosystem":"Go","purl":"pkg:golang/github.com/gorilla/websocket"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.5.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-w67g-5rqw-f597/GHSA-w67g-5rqw-f597.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"}]}