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

- Severity: Critical 9.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.41%, higher than 73% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-05-21T16:26:06.000Z
- Modified: 2026-09-10T03:49:50.235Z
- Also known as: GHSA-3839-6r69-m497, GHSA-xg2h-wx96-xgxr, GO-2022-0411
- Related: CGA-cx55-8x76-2v73, RHSA-2023:0540
- Weaknesses: CWE-331
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: Go

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

(As written by CVE List.)

## Affected

- github.com/Masterminds/goutils: before 1.1.1
- github.com/Masterminds/goutils (Go): before 1.1.1
- goutils_project goutils: before 1.1.1

## Every score

- CISA-ADP: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- GitHub: rating Low
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://pkg.go.dev/vuln/GO-2022-0411> (exploit, patch, third-party-advisory, web)
- <https://github.com/Masterminds/goutils/commit/869801f20f9f1e7ecdbdb6422049d8241270d5e1> (fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-4238> (advisory)
- <https://github.com/Masterminds/goutils> (package)
- <https://github.com/Masterminds/goutils/security/advisories/GHSA-xg2h-wx96-xgxr> (web)
- <https://github.com/Masterminds/goutils/commit/f1923532a168b8203bfe956d8cd3b17ebece5982> (web)
- <https://github.com/Masterminds/goutils/releases/tag/v1.1.1> (web)

## Sources

- CVE List: [CVE-2021-4238](https://www.cve.org/CVERecord?id=CVE-2021-4238), CVE Terms of Use, modified 2025-04-11
- GitHub Advisory Database: [GHSA-3839-6r69-m497](https://github.com/advisories/GHSA-3839-6r69-m497), CC-BY-4.0, modified 2026-09-10
- GitHub Advisory Database: [GHSA-xg2h-wx96-xgxr](https://github.com/advisories/GHSA-xg2h-wx96-xgxr), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2022-0411](https://pkg.go.dev/vuln/GO-2022-0411), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2021-4238](https://nvd.nist.gov/vuln/detail/CVE-2021-4238), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-4238 · Whole record: https://cve.day/CVE-2021-4238.json · Rebuilt by cve.day 2026-11-25T22:58:08.020Z
