CVE-2021-4238: RandomAlphaNumeric & CryptoRandomAlphaNumeric - Weak Cryptography
- Cve: CVE-2021-4238
- Name: RandomAlphaNumeric & CryptoRandomAlphaNumeric - Weak Cryptography
- 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.
- Impact: Attackers can predict or brute-force generated strings, compromising security in systems relying on these functions for randomness.
- Remediation: Update functions to generate strings with full entropy, ensuring no guaranteed digit inclusion.
- Vulnerability type: weak_cryptography
- Vulnerability impact: information_disclosure
- Requirement type: none
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.1
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- Epss score: 0.01408
- Epss percentile: 0.7333
- Assignee: [email protected]
- Published at: 2022-12-27T22:15:12Z
- Age in days: 1428
- Modified at: 2026-06-17T04:19:19Z
- Patch available: yes
- Public exploits total: 1
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-4238
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-331 | Insufficient Entropy |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://pkg.go.dev/vuln/GO-2022-0411 | nvd | 2022-12-27 |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/Masterminds/goutils/commit/869801f20f9f1e7ecdbdb6422049d8241270d5e1 | nvd | Patch, Third Party Advisory |
| https://pkg.go.dev/vuln/GO-2022-0411 | nvd | Exploit, Patch, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| goutils_project:goutils | < 1.1.1 | no | nvd | /v1/products/goutils_project/goutils |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| masterminds/goutils | commit, package, releases, security_advisory | yes | /v1/repositories/masterminds/goutils |
Index
- Repositories: 19
- Packages: 1
- Checked, none or zero: repositories high signal
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2022-12-27
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts