CWE-332: Insufficient Entropy in PRNG
10 CVEs have CWE-332 as their primary weakness. 0 of them are in the CISA KEV catalog. The highest EPSS score among them is 4.807%.
The lack of entropy available for, or used by, a Pseudo-Random Number Generator (PRNG) can be a stability and security threat.
Child of CWE-331: Insufficient Entropy
Mitigations
- Architecture and Design Requirements: Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).
- Implementation: Consider a PRNG that re-seeds itself as needed from high-quality pseudo-random output, such as hardware devices.
- Architecture and Design: When deciding which PRNG to use, look at its sources of entropy. Depending on what your security needs are, you may need to use a random number generator that always uses strong random data -- i.e., a random number generator that attempts to be strong but will fail in a weak way or will always provide some middle ground of protection through techniques like re-seeding. Generally, something that always provides a predictable amount of strength is preferable.
Observed examples
- [REF-1374]: Chain: JavaScript-based cryptocurrency library can fall back to the insecure Math.random() function instead of reporting a failure (CWE-392), thus reducing the entropy (CWE-332) and leading to generation of non-unique cryptographic keys for Bitcoin wallets (CWE-1391)
- CVE-2019-1715: security product has insufficient entropy in the DRBG, allowing collisions and private key discovery
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-332'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-332'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).