Cryptographic Issues Affecting github.com/dinever/golf package, versions <0.3.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (13th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cryptographic Issues vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMDINEVERGOLF-598768
  • published17 Aug 2020
  • disclosed25 Apr 2016
  • creditelithrar

Introduced: 25 Apr 2016

CVE-2016-15005  (opens in a new tab)
CWE-310  (opens in a new tab)

How to fix?

Upgrade github.com/dinever/golf to version 0.3.0 or higher.

Overview

Affected versions of this package are vulnerable to Cryptographic Issues. randomBytes in xsrf.go uses math.rand to generate CSRF tokens. This is unsafe/insecure, and because it is seeded with time.UnixNano, generates predictable results that would allow an attacker to bypass CSRF protection.

CVSS Base Scores

version 3.1