Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Medium severity, with a CVSS score of 6.9, published 24 August 2026.
- Which products and versions are affected?
- github.com/gorilla/websocket (Go) < 1.5.3; Gorilla WebSocket < 1.5.3.
- Is there a fix for This vulnerability?
- A patch was published on 2026-06-14: Fix released in v1.5.3 (commit d67f4185) Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run github.com/gorilla/websocket (Go) or Gorilla WebSocket at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
This vulnerability is a use of cryptographically weak PRNG (CWE-338). The root cause is that gorilla/websocket used Go's math/rand package to generate WebSocket frame masking keys prior to version 1.5.3. WebSocket masking keys must be unpredictable to prevent content injection attacks; however, math/rand produces deterministic output when seeded with a known value. An attacker with knowledge of the PRNG seed can predict or recover mask keys and inject content into WebSocket connections. The attack requires network access to a WebSocket connection but no authentication or user interaction. The fix, released in v1.5.3, replaces math/rand with crypto/rand (commit d67f4185), which provides cryptographically secure randomness.
Affected products
- Gorilla WebSocket < 1.5.3
Timeline
- 2026-06-12: disclosed: Advisory published to GitHub Security Advisory Database
- 2026-08-24: advisory: Published to GitHub Advisory Database
- 2026-06-14: patched: Fix released in v1.5.3 (commit d67f4185)
References
- https://github.com/canolgun-commits/websocket/security/advisories/GHSA-w67g-5rqw-f597
- https://github.com/gorilla/websocket/commit/d67f41855da42d7bccd9ef050c49f7e54e783b95
- https://github.com/gorilla/websocket/releases/tag/v1.5.3
- https://api.github.com/repos/canolgun/websocket/security-advisories/GHSA-w67g-5rqw-f597