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
EPSS
0.21% (60th 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 Insecure Randomness vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMMASTERMINDSGOUTILS-3121153
  • published16 Nov 2022
  • disclosed1 Jul 2022
  • creditUnknown

Introduced: 1 Jul 2022

CVE-2021-4238  (opens in a new tab)
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 when randomly-generated alphanumeric strings contain significantly less entropy than expected, the RandomAlphaNumeric and CryptoRandomAlphaNumeric functions always return strings containing at least one digit from 0 to 9. This significantly reduces the amount of entropy in short strings generated by these functions.

References

CVSS Scores

version 3.1