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


0.0
medium

Snyk CVSS

    Attack Complexity Low

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 ID SNYK-GOLANG-GITHUBCOMMASTERMINDSGOUTILS-1296313
  • published 23 May 2021
  • disclosed 21 May 2021
  • credit Unknown

Introduced: 21 May 2021

CVE NOT AVAILABLE CWE-330 Open this link 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