CVE-2016-15005: Golf may allow attacker to bypass CSRF protections due to weak PRNG
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.11819%
CWE
Published
12/28/2022
Updated
8/29/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/dinever/golf | go | < 0.3.0 | 0.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the randomBytes function in xsrf.go using math/rand (with time.UTC().UnixNano() seeding) instead of a cryptographically secure PRNG. The commit 3776f33 explicitly replaces this implementation with crypto/rand, confirming this was the vulnerable component. The function's use of predictable random number generation directly enables CSRF token prediction as described in CWE-332 and CWE-352.