CVE Catalog

GHSA-w67g-5rqw-f597

Medium
Published: Translated: NVD NIST

Summary

gorilla/websocket used math/rand (a cryptographically weak pseudo-random number generator) to generate WebSocket frame mask keys. Masking keys MUST be unpredictable to prevent frame content injection attacks.

Risk Assessment

Predictable mask keys could allow an attacker to inject data into WebSocket traffic, leading to session hijacking or modification of transmitted information.

Recommendation

Update gorilla/websocket to a patched version that uses a cryptographically secure random number generator.

Related vulnerabilities

Original NVD description (English source)

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

Vulnerability data from NVD (NIST) · CISA KEV · EPSS