{"id":"GO-2020-0045","summary":"Cryptographically weak random number generation in github.com/dinever/golf","details":"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.","aliases":["CVE-2016-15005","GHSA-q9qr-jwpw-3qvv"],"modified":"2024-05-20T16:03:47Z","published":"2021-04-14T20:04:52Z","database_specific":{"url":"https://pkg.go.dev/vuln/GO-2020-0045","review_status":"REVIEWED"},"references":[{"type":"FIX","url":"https://github.com/dinever/golf/pull/24"},{"type":"FIX","url":"https://github.com/dinever/golf/commit/3776f338be48b5bc5e8cf9faff7851fc52a3f1fe"},{"type":"REPORT","url":"https://github.com/dinever/golf/issues/20"}],"affected":[{"package":{"name":"github.com/dinever/golf","ecosystem":"Go","purl":"pkg:golang/github.com/dinever/golf"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.3.0"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/dinever/golf","symbols":["Context.Render","Context.RenderFromString","randomBytes"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2020-0045.json"}}],"schema_version":"1.7.3","credits":[{"name":"@elithrar"}]}