Skip to content
OpenAdvisories

Weakness (CWE)

CWE-335: Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG)

Base Draft

The product uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.

More detail

PRNGs are deterministic and, while their output appears
random, they cannot actually create entropy. They rely on
cryptographically secure and unique seeds for entropy so
proper seeding is critical to the secure operation of the
PRNG.

Management of seeds could be broken down into two main areas:

-
(1) protecting seeds as cryptographic material (such as a cryptographic key);

-
(2) whenever possible, using a uniquely generated seed from
a cryptographically secure source

PRNGs require a seed as input to generate a stream of
numbers that are functionally indistinguishable from
random numbers. While the output is, in many cases,
sufficient for cryptographic uses, the output of any
PRNG is directly determined by the seed provided as
input. If the seed can be ascertained by a third party,
the entire output of the PRNG can be made known to
them. As such, the seed should be kept secret and
should ideally not be able to be guessed. For example,
the current time may be a poor seed. Knowing the
approximate time the PRNG was seeded greatly reduces
the possible key space.

Seeds do not necessarily need to be unique, but reusing seeds may open up attacks if the seed is discovered.

Source: MITRE CWE-335

25 results · Feed

  • High 7.3

    Botan: AutoSeeded_RNG can become reinitialized from predictable data after clearing state

    Botan is a C++ cryptography library. From 3.7.0 until 3.13.0, an application that calls AutoSeeded_RNG::clear() and then calls randomize with an empty output buffer while the generator is unseeded can cause AutoSeeded_RNG to mark itself seeded without consult…

  • Medium 5.4

    Insufficient session randomness vulnerability exists in certain NETGEAR EX Series Models

    Insufficient session randomness vulnerability in the listed NETGEAR Extender models allows a network-adjacent attacker having network access (such as WiFi credentials) to predict valid session identifiers and hijack an authenticated administrator session on t…

  • High 7.5

    Bytes::Random::Secure::Tiny versions through 1.011 for Perl share internal state across forked processes

    Bytes::Random::Secure::Tiny versions through 1.011 for Perl share internal state across forked processes. When an object is initialised before forking, then the internal state for the PRNG is shared across processes and identical random streams will be produc…

  • High 7.5

    Bytes::Random::Secure versions through 0.29 for Perl share internal state across forked processes

    Bytes::Random::Secure versions through 0.29 for Perl share internal state across forked processes. When an object is initialised before forking, or when the functional interface is used, then the internal state for the PRNG is shared across processes and iden…

  • High 7.5

    CryptX versions before 0.088 for Perl do not reseed the Crypt::PK PRNG state after forking

    CryptX versions before 0.088 for Perl do not reseed the Crypt::PK PRNG state after forking. The Crypt::PK::RSA, Crypt::PK::DSA, Crypt::PK::DH, Crypt::PK::ECC, Crypt::PK::Ed25519 and Crypt::PK::X25519 modules seed a per-object PRNG state in their constructors …

  • High 7.7

    Mbed TLS before 3.6.6 and TF-PSA-Crypto before 1.1.0 misuse seeds in a Pseudo-Random Number Generator (PRNG).

  • Medium 4.3

    Fault injection attack with ML-DSA and ML-KEM on ARM

    Protection mechanism failure in wolfCrypt post-quantum implementations (ML-KEM and ML-DSA) in wolfSSL on ARM Cortex-M microcontrollers allows a physical attacker to compromise key material and/or cryptographic outcomes via induced transient faults that corrup…

  • Medium 5.7

    Incorrect Usage of Seeds in Pseudo-Random Number Generator (CWE- 335) vulnerability in the High Sec ELM may allow a sop…

  • High 7.5
    CVE-2025-27580 Public exploit

    NIH BRICS (aka Biomedical Research Informatics Computing System) through 14.0.0-67 generates predictable tokens (that d…

  • High 7.5

    Apache Cocoon: continuations may not be private

    ** UNSUPPORTED WHEN ASSIGNED ** Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG) vulnerability in Apache Cocoon. This issue affects Apache Cocoon: all versions. When a continuation is created, it gets a random identifier. Because the random n…

  • Medium 6.6

    ColPack 1.0.10 through 9a7293a has a predictable temporary file (located under /tmp with a name derived from an unseede…

  • Critical 9.8

    QAbstractOAuth in Qt Network Authorization in Qt before 5.15.17, 6.x before 6.2.13, 6.3.x through 6.5.x before 6.5.6, a…

  • High 8.1

    Insufficient seeding of random number generator

    Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG) vulnerability in Secomea GateManager (Webserver modules) allows Session Hijacking.This issue affects GateManager: before 11.2.624071020.

  • High 8.8
    CVE-2024-27632 Public exploit

    An issue in GNU Savane v.3.12 and before allows a remote attacker to escalate privileges via the form_id in the form_he…

  • Critical 9.8

    Cryptographically weak PRNG in Opinio 7.22

    Objectplanet Opinio version 7.22 and prior uses a cryptographically weak pseudo-random number generator (PRNG) coupled to a predictable seed, which could lead to an unauthenticated account takeover of any user on the application.

  • Medium 4.3

    D-Link COVR 1200,1202,1203 v1.08 was discovered to have a predictable seed in a Pseudo-Random Number Generator.

  • Medium 5.5

    Predictable credential obfuscation seed value used in rabbitmq-server

    RabbitMQ is a multi-protocol messaging and streaming broker. In affected versions the shovel and federation plugins perform URI obfuscation in their worker (link) state. The encryption key used to encrypt the URI was seeded with a predictable secret. This mea…

  • High 7.5

    Random number seed fixed during compilation

    The JS Compute Runtime for Fastly's Compute@Edge platform provides the environment JavaScript is executed in when using the Compute@Edge JavaScript SDK. In versions prior to 0.5.3, the `Math.random` and `crypto.getRandomValues` methods fail to use sufficientl…

  • High 7.5

    Insecure PRNG use in random_password_generator

    The random_password_generator (aka RandomPasswordGenerator) gem through 1.0.0 for Ruby uses Kernel#rand to generate passwords, which, due to its cyclic nature, can facilitate password prediction.

  • Unscored —

    Piwigo is image gallery software written in PHP. When a criteria is not met on a host, piwigo defaults to usingmt_rand …

  • Medium 5.5
    CVE-2021-34600 Public exploit

    Telenot complex: Insecure AES Key Generation

    Telenot CompasX versions prior to 32.0 use a weak seed for random number generation leading to predictable AES keys used in the NFC tags used for local authorization of users. This may lead to total loss of trustworthiness of the installation.

  • High 8.7
    CVE-2021-41117 Public exploit

    Insecure random number generation

    keypair is a a RSA PEM key generator written in javascript. keypair implements a lot of cryptographic primitives on its own or by borrowing from other libraries where possible, including node-forge. An issue was discovered where this library was generating id…

  • High 7.5

    Cryptographic Issues in ECK

    Elastic Cloud on Kubernetes (ECK) versions prior to 1.1.0 generate passwords using a weak random number generator. If an attacker is able to determine when the current Elastic Stack cluster was deployed they may be able to more easily brute force the Elastics…

  • Medium 5.3
    CVE-2018-14647 EPSS 11%

    Python's elementtree C accelerator failed to initialise Expat's hash salt during initialization. This could make it eas…

  • High 7.5

    An issue was discovered on the D-Link DWR-932B router. WPS PIN generation is based on srand(time(0)) seeding.