Skip to content
OpenAdvisories

Weakness (CWE)

CWE-332: Insufficient Entropy in PRNG

Variant Draft

The lack of entropy available for, or used by, a Pseudo-Random Number Generator (PRNG) can be a stability and security threat.

How to prevent it (3 mitigations)
  1. 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").

  2. Implementation

    Consider a PRNG that re-seeds itself as needed from high-quality pseudo-random output, such as hardware devices.

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

Source: MITRE CWE-332

4 results · Clear filters · Feed

  • High 7.4

    Timing limitations of the HRNG in RS9116 when power save mode is enabled results in predictable values

    Timing limitations of the HRNG in RS9116 when power save mode is enabled results in predictable values

  • High 8.8

    Cryptographically weak random number generation in github.com/dinever/golf

    CSRF tokens are generated using math/rand, which is not a cryptographically secure random number generator, allowing an attacker to predict values and bypass CSRF protections with relatively few requests.

  • High 7.5

    Symfony Cryptographic Vulnerability

    The nextBytes function in the SecureRandom class in Symfony before 2.3.37, 2.6.x before 2.6.13, and 2.7.x before 2.7.9 does not properly generate random numbers when used with PHP 5.x without the paragonie/random_compat library and the openssl_random_pseudo_b…

  • High 7.5

    PyCrypto does not properly reseed PRNG before allowing access

    The Crypto.Random.atfork function in PyCrypto before 2.6.1 does not properly reseed the pseudo-random number generator (PRNG) before allowing a child process to access it, which makes it easier for context-dependent attackers to obtain sensitive information b…