SecurityContext

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

IdName
CWE-331Insufficient Entropy

Public exploits

UrlSourceAdded date
https://pkg.go.dev/vuln/GO-2022-0411nvd2022-12-27

References

UrlSourceTags
https://github.com/Masterminds/goutils/commit/869801f20f9f1e7ecdbdb6422049d8241270d5e1nvdPatch, Third Party Advisory
https://pkg.go.dev/vuln/GO-2022-0411nvdExploit, Patch, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
goutils_project:goutils< 1.1.1nonvd/v1/products/goutils_project/goutils

Projects

RepositoryLink kindsIndexedUrl
masterminds/goutilscommit, package, releases, security_advisoryyes/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