Read the docs
TI-2026-67252 Aliases GHSA-w67g-5rqw-f597

Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key

Priority LOW 38CWE-338Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

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

Why it matters now

Fix Fixed github.com/gorilla/websocket (Go): 1.5.3

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—github.com/gorilla/websocket (Go)before 1.5.31.5.3Patch availableGHSA-w67g-5rqw-f597
  • github.com/gorilla/websocket (Go) Vendor— Affected before 1.5.3 Fixed in 1.5.3 Patch available GHSA-w67g-5rqw-f597

Remediation

  • Fix · GHSA-w67g-5rqw-f597 github.com/gorilla/websocket (Go) Fixed in 1.5.3 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-w67g-5rqw-f597

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences