Insecure Randomness Affecting github.com/masterminds/goutils package, versions <1.1.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Not Defined

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 Insecure Randomness vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMMASTERMINDSGOUTILS-1296313
  • published23 May 2021
  • disclosed21 May 2021
  • creditUnknown

Introduced: 21 May 2021

CVE NOT AVAILABLE CWE-330  (opens in a new tab)

How to fix?

Upgrade github.com/masterminds/goutils to version 1.1.1 or higher.

Overview

github.com/masterminds/goutils is a provides users with utility functions to manipulate strings in various ways.

Affected versions of this package are vulnerable to Insecure Randomness via the RandomAlphaNumeric(int) and CryptoRandomAlphaNumeric(int) functions. Small values of int in the functions above will return a smaller subset of results than they should. For example, RandomAlphaNumeric(1) would always return a digit in the 0-9 range, while RandomAlphaNumeric(4) return around ~7 million of the ~13M possible permutations.

References

CVSS Scores

version 3.1