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

What is CWE-337?

CWE-337 is Predictable Seed in Pseudo-Random Number Generator (PRNG). The flaw arises when A Pseudo-Random Number Generator (PRNG) is initialized from a predictable seed, such as the process ID or system time. The database currently holds 6 vulnerabilities mapped to CWE-337 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP TOP 10:2025 RANK4 — A04:2025 — Cryptographic Failures
Related CVES (365 days)6
AbstractionVariant
Likelihood of exploit-

Vulnerabilities mapped to CWE-337

6 vulnerabilities500% increase year over year

No data

No vulnerability data in CISA KEV for CWE-337

Official definition

ByMitre CWE

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

Characteristics

Modes of introduction

  • Implementation: REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Common consequences

ImpactScopeExplanation
Bypass Protection Mechanism, Varies by ContextOtherThe 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.

Risk mitigations

  1. Use non-predictable inputs for seed generation.
  2. Libraries or Frameworks · Architecture and Design, RequirementsUse 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.
  3. ImplementationUse 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

MethodApproachEffectiveness
Automated Static AnalysisAutomated 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.)-

Representative vulnerabilities

Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.