What’s Vulnerable › Vulnerabilities
CVE-2021-4238: Insufficient randomness in github.com/Masterminds/goutils
- Severity: critical (CVSS 9.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-12-27 · updated 2026-06-17
- Weakness: CWE-331
Description
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.
Affected products
- github.com/Masterminds/goutils: before 1.1.1 — fixed in 1.1.1
- Go Github.Com/Masterminds/Goutils: before 1.1.1 — fixed in 1.1.1
How to fix
Upgrade to a fixed version: github.com/Masterminds/goutils 1.1.1; Go Github.Com/Masterminds/Goutils 1.1.1. Check the vendor advisory for mitigations.
References
- https://github.com/Masterminds/goutils/commit/869801f20f9f1e7ecdbdb6422049d8241270d5e1
- https://pkg.go.dev/vuln/GO-2022-0411
- https://github.com/Masterminds/goutils/commit/869801f20f9f1e7ecdbdb6422049d8241270d5e1
- https://pkg.go.dev/vuln/GO-2022-0411
Get alerted when CVE-2021-4238 or the next vulnerability affects your stack