{"id":"GHSA-w67g-5rqw-f597","revision":"c2e89d3e647045f7be4f89742f1a0487","records":[{"revision":"c2e89d3e647045f7be4f89742f1a0487","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-w67g-5rqw-f597","aliases":["GO-2026-6278"],"title":"Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key","description":"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","state":0,"publishedAt":"2026-08-24T21:00:54+00:00","modifiedAt":"2026-09-10T03:50:54.1285532+00:00","affected":[{"ecosystem":"Go","name":"github.com/gorilla/websocket","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.5.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/canolgun-commits/websocket/security/advisories/GHSA-w67g-5rqw-f597","https://github.com/gorilla/websocket/commit/d67f41855da42d7bccd9ef050c49f7e54e783b95","https://github.com/canolgun-commits/websocket","https://github.com/gorilla/websocket/releases/tag/v1.5.3"],"sourceUrl":"https://github.com/advisories/GHSA-w67g-5rqw-f597","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-w67g-5rqw-f597","identifiers":["GHSA-w67g-5rqw-f597","GO-2026-6278"]},"retained":false,"historicalAffected":[]}],"coverage":[]}