824
Scope Impact Likelihood
Availability DoS: Crash, Exit, or Restart
If a pseudo-random number generator is using a limited
entropy source which runs out (if the generator fails
closed), the program may pause or crash.
Access Control
Other
Bypass Protection Mechanism
Other
If a PRNG is using a limited entropy source which runs out,
and the generator fails open, the generator could produce
predictable random numbers. Potentially a weak source
of random numbers could weaken the encryption method
used for authentication of users.
Potential Mitigations
Phase: Architecture and Design
Phase: Requirements
Strategy = Libraries or Frameworks
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").
Phase: Implementation
Consider a PRNG that re-seeds itself as needed from high-quality pseudo-random output, such
as hardware devices.
Phase: 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
Reference Description
[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)
https://www.unciphered.com/blog/randstorm-you-cant-patch-a-house-of-cards
CVE-2019-1715 security product has insufficient entropy in the DRBG, allowing collisions and
private key discovery
https://www.cve.org/CVERecord?id=CVE-2019-1715
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 861 The CERT Oracle Secure Coding Standard for Java
(2011) Chapter 18 - Miscellaneous (MSC)
844 2370
MemberOf 905 SFP Primary Cluster: Predictability 888 2388
MemberOf 1152 SEI CERT Oracle Secure Coding Standard for Java -
Guidelines 49. Miscellaneous (MSC)
1133 2453
MemberOf 1414 Comprehensive Categorization: Randomness 1400 2543
CWE Version 4.14
CWE-333: Improper Handling of Insufficient Entropy in TRNG
CWE-333: Improper Handling of Insufficient Entropy in TRNG