GHSA-w67g-5rqw-f597

Suggest an improvement
Source
https://github.com/advisories/GHSA-w67g-5rqw-f597
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-w67g-5rqw-f597/GHSA-w67g-5rqw-f597.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-w67g-5rqw-f597
Aliases
Downstream
CGA (259)
MINI (88)
Published
2026-08-24T21:00:54Z
Modified
2026-09-10T03:50:54Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key
Details

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

Database specific
{
    "cwe_ids":  [
        "CWE-338"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-24T21:00:54Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

Go / github.com/gorilla/websocket

Package

Name
github.com/gorilla/websocket
View open source insights on deps.dev
Purl
pkg:golang/github.com/gorilla/websocket

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.5.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-w67g-5rqw-f597/GHSA-w67g-5rqw-f597.json"