GHSA-w67g-5rqw-f597
Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key
GHSA-w67g-5rqw-f597 is a medium vulnerability (CVSS 6.9) in github.com/gorilla/websocket, published August 24, 2026. No source lists public exploit code. Fixed in github.com/gorilla/websocket 1.5.3.
- Severity
- 6.9 MediumCVSS 4.0, GitHub Advisories
- Exploit chance
- UnscoredNo EPSS score yet
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
1.5.3github.com/gorilla/websocket
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.
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
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/gorilla/websocketGo | before 1.5.3 | 1.5.3 |
What each source reports
GitHub Advisories Score used 6.9
Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key
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
- Record
GHSA-w67g-5rqw-f597- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-338
- Updated
- 2026-11-02
OSV 6.9
Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key
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
- Record
GHSA-w67g-5rqw-f597- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-338
- Updated
- 2026-11-02
OSVGO-2026-6278No score
Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key in github.com/gorilla/websocket
Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key in github.com/gorilla/websocket
- Record
GO-2026-6278- Updated
- 2026-11-02
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.