CWEweakness

CWE-337 Predictable Seed in Pseudo-Random Number Generator (PRNG)

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Draft
Languages
Not Language-Specific
CWE version
5.0

Description

A Pseudo-Random Number Generator (PRNG) is initialized from a predictable seed, such as the process ID or system time.

Common consequences

• Other: Bypass Protection Mechanism, Varies by Context — The use of predictable seeds significantly reduces the number of possible seeds that an attacker would need to test in order to predict which random numbers will be generated by the PRNG. A protection mechanism that depends on a PRNG could be compromised.

Potential mitigations

• Use non-predictable inputs for seed generation. • [Architecture and Design, Requirements] Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems, or use the more recent FIPS 140-3 [REF-1192] if possible. • [Implementation] Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Observed examples

• CVE-2020-7010: Cloud application on Kubernetes generates passwords using a weak random number generator based on deployment time. • CVE-2019-11495: server uses erlang:now() to seed the PRNG, which results in a small search space for potential random seeds • CVE-2008-0166: The removal of a couple lines of code caused Debian's OpenSSL Package to only use the current process ID for seeding a PRNG • CVE-2016-10180: Router's PIN generation is based on rand(time(0)) seeding. • CVE-2018-9057: cloud provider product uses a non-cryptographically secure PRNG and seeds it with the current time

Related

Observed example · CVE (5)

  • CVE-2020-7010 Elastic Cloud on Kubernetes (ECK) versions prior to 1.1.0 generate passwords using a weak random number generator. vulnerability
  • CVE-2019-11495 In Couchbase Server 5.1.1, the cookie used for intra-node communication was not generated securely. vulnerability
  • CVE-2018-9057 aws/resource_aws_iam_user_login_profile.go in the HashiCorp Terraform Amazon Web Services (AWS) provider through v1.12.0 has an… vulnerability
  • CVE-2016-10180 An issue was discovered on the D-Link DWR-932B router. vulnerability
  • CVE-2008-0166 OpenSSL 0.9.8c-1 up to versions before 0.9.8g-9 on Debian-based operating systems uses a random number generator that generates predictable… vulnerability

Child of · CWE (1)

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

Referenced by CVE · weakness (18)

  • CVE-2026-18451 The HTML5 KVM-over-IP console authenticates with a token returned by the web interface. vulnerability
  • CVE-2026-55889 XDG Desktop Portal is a desktop integration portal. vulnerability
  • CVE-2026-73794 HPE NonStop MODULAR NSJ contains a predictable seed vulnerability in Random Number Generation (PRNG) vulnerability
  • CVE-2026-19396 A predictable seed in the pseudo-random number generator (PRNG) in the IFTTT pairing token generation of the ASUS RT-BE57 router allows an… vulnerability
  • CVE-2026-66372 The affected products use insufficiently random values, which allows web session tokens to be predictable, bounding token entropy to the… vulnerability
  • CVE-2026-26018 CoreDNS is a DNS server that chains plugins. vulnerability
  • CVE-2026-25235 PEAR is a framework and distribution system for reusable PHP components. vulnerability
  • CVE-2025-62710 Sakai is a Collaboration and Learning Environment. vulnerability
  • CVE-2025-55069 A predictable seed in pseudo-random number generator vulnerability has been discovered in firmware version 3.60 of the Click Plus PLC. vulnerability
  • CVE-2025-20613 Predictable Seed in Pseudo-Random Number Generator (PRNG) in the firmware for some Intel(R) TDX may allow an authenticated user to… vulnerability
  • CVE-2025-7770 Tigo Energy's CCA device is vulnerable to insecure session ID generation in their remote API. vulnerability
  • CVE-2024-7558 JUJU_CONTEXT_ID is a predictable authentication secret. vulnerability
  • CVE-2024-22194 cdo-local-uuid project provides a specialized UUID-generating function that can, on user request, cause a program to generate deterministic… vulnerability
  • CVE-2023-49343 Temporary data passed between application components by Budgie Extras Dropby applet could potentially be viewed or manipulated. vulnerability
  • CVE-2022-40267 Predictable Seed in Pseudo-Random Number Generator (PRNG) vulnerability in Mitsubishi Electric Corporation MELSEC iQ-F Series FX5U-xMy/z… vulnerability
  • CVE-2016-15006 A vulnerability, which was classified as problematic, has been found in enigmaX up to 2.2. vulnerability
  • CVE-2022-26852 Dell PowerScale OneFS, versions 8.2.x-9.3.x, contain a predictable seed in pseudo-random number generator. vulnerability
  • CVE-2020-28597 A predictable seed vulnerability exists in the password reset functionality of Epignosis EfrontPro 5.2.21. vulnerability

Referenced by OWASP · mapped cwe (2)

  • A04:2025 Cryptographic Failures Top 10 2025
  • A02:2021 Cryptographic Failures Top 10 2021