Skip to content
OpenAdvisories

Weakness (CWE)

CWE-330: Use of Insufficiently Random Values

Class Mapping discouraged

The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.

How to prevent it (3 mitigations)
  1. Architecture and Design

    Use a well-vetted algorithm that is currently considered to be strong by experts in the field, and select well-tested implementations with adequate length seeds.

    In general, if a pseudo-random number generator is not advertised as being cryptographically secure, then it is probably a statistical PRNG and should not be used in security-sensitive contexts.

    Pseudo-random number generators can produce predictable numbers if the generator is known and the seed can be guessed. A 256-bit seed is a good starting point for producing a "random enough" number.

  2. Implementation

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

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

Source: MITRE CWE-330

92 results · Clear filters · Feed

  • Medium 6.5

    Dictionary attack with Spring Security queryable text encryptor

    Spring Security versions 5.3.x prior to 5.3.2, 5.2.x prior to 5.2.4, 5.1.x prior to 5.1.10, 5.0.x prior to 5.0.16 and 4.2.x prior to 4.2.16 use a fixed null initialization vector with CBC Mode in the implementation of the queryable text encryptor. A malicious…

  • Medium 5.9

    pyrad is vulnerable to the use of Insufficiently Random Values

    packet.py in pyrad before 2.1 uses weak random numbers to generate RADIUS authenticators and hash passwords, which makes it easier for remote attackers to obtain sensitive information via a brute force attack.

  • Medium 5.9

    miekg/dns insecurely generates random numbers

    The miekg Go DNS package before 1.1.25, as used in CoreDNS before 1.6.6 and other products, improperly generates random numbers because math/rand is used. The TXID becomes predictable, leading to response forgeries.

  • Medium 5.3

    TYPO3 is vulnerable to Insecure randomness in uniqid function

    TYPO3 before 4.1.14, 4.2.x before 4.2.13, 4.3.x before 4.3.4 and 4.4.x before 4.4.1 contains insecure randomness in the uniqid function.

  • Medium 5.9

    golang.org/x/crypto/salsa20/salsa uses insufficiently random values

    An issue was discovered in the supplementary Go cryptography library, golang.org/x/crypto, before v0.0.0-20190320223903-b7391e95e576. A flaw was found in the amd64 implementation of the golang.org/x/crypto/salsa20 and golang.org/x/crypto/salsa20/salsa package…

  • Medium 5.3

    Cryptographically Weak PRNG in randomatic

    react-native-meteor-oauth is a library for Oauth2 login to a Meteor server in React Native. The oauth Random Token is generated using a non-cryptographically strong RNG (Math.random()).

  • Medium 5.9

    kernel drivers before version 4.17-rc1 are vulnerable to a weakness in the Linux kernel's implementation of random seed…

  • Medium 5.3

    Pysaml2 improperly initializes encryption vector

    Python package pysaml2 version 4.4.0 and earlier reuses the initialization vector across encryptions in the IDP server, resulting in weak encryption of data.

  • Medium 5.9

    OrientDB Server Community Edition uses insufficiently random values to generate session IDs

    server/network/protocol/http/OHttpSessionManager.java in the Studio component in OrientDB Server Community Edition before 2.0.15 and 2.1.x before 2.1.1 improperly relies on the java.util.Random class for generation of random Session ID values, which makes it …

  • Medium —

    Fat Free CRM has fixed token value

    config/initializers/secret_token.rb in Fat Free CRM before 0.12.1 has a fixed FatFreeCRM::Application.config.secret_token value, which makes it easier for remote attackers to spoof signed cookies by referring to the key in the source code.

  • Medium 4.0

    Ansible uses a socket with predictable filename in /tmp

    runner/connection_plugins/ssh.py in Ansible before 1.2.3, when using ControlPersist, allows local users to redirect a ssh session via a symlink attack on a socket file with a predictable name in /tmp/.

  • Medium —

    Jetty Uses Predictable Session Identifiers

    Jetty before 4.2.27, 5.1 before 5.1.12, 6.0 before 6.0.2, and 6.1 before 6.1.0pre3 generates predictable session identifiers using java.util.random, which makes it easier for remote attackers to guess a session identifier through brute force attacks, bypass a…