CVE-2016-15005 · Go
Cryptographically weak random number generation in github.com/dinever/golf
CSRF tokens are generated using math/rand, which is not a cryptographically secure random number generator, allowing an attacker to predict values and bypass CSRF protections with relatively few requests.
Published 2022-12-27, last changed 2026-06-17. Weakness: CWE-352.
How to fix
Upgrade to a fixed version: github.com/dinever/golf 0.3.0 (Go). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in dinever/golf by 3776f338be, pull request #24, 11abebbbb2. Functions changed by the fix: randomBytes, Redirect, Redirect301, Query, Send, Render, sessionID, Session. Regression tests: context_test.go. Confidence: verified (a record names this commit as the fix, and it changed these functions).
Timeline
| 2021-04-14 | Package advisory GO-2020-0045 |
| 2022-12-27 | Published |
| 2022-12-28 | Package advisory GHSA-q9qr-jwpw-3qvv |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 0.41% |
| 2026-12-05 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-q9qr-jwpw-3qvv | github.com/dinever/golf (Go) | 0.3.0 |
| GO-2020-0045 | github.com/dinever/golf (Go) | 0.3.0 |
Also known as: GHSA-q9qr-jwpw-3qvv, GO-2020-0045
Credited: @elithrar (other)
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2016-15005, or call /api/v1/vulnerabilities/CVE-2016-15005. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.