title: Cryptographically weak random number generation in github.com/dinever/golf
description: 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.
problem types: CWE 338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
affected:
{
vendor: github.com/dinever/golf
product: github.com/dinever/golf
collectionURL: https://pkg.go.dev
packageName: github.com/dinever/golf
versions:
version: 0, lessThan: 0.3.0, status: affected, versionType: semver
programRoutines:
name: randomBytes
name: Context.Render
name: Context.RenderFromString
defaultStatus: unaffected
}