CWEweakness

CWE-341 Predictable from Observable State

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

Description

A number or object is predictable based on observations that the attacker can make about the state of the system or network, such as time, process ID, etc.

Common consequences

• Other: Varies by Context — This weakness could be exploited by an attacker in a number of ways depending on the context. If a predictable number is used to generate IDs or keys that are used within protection mechanisms, then an attacker could gain unauthorized access to the system. If predictable filenames are used for storing sensitive information, then an attacker might gain access to the system and may be able to gain access to the information in the file.

Potential mitigations

• [Implementation] Increase the entropy used to seed a PRNG. • [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"). • [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-2024-48445: Chain: e-commerce app relies on an easily-guessable timestamp (CWE-341) in a weak authentication algorithm (CWE-1390) • CVE-2002-0389: Mail server stores private mail messages with predictable filenames in a world-executable directory, which allows local users to read private mailing list archives. • CVE-2001-1141: PRNG allows attackers to use the output of small PRNG requests to determine the internal state information, which could be used by attackers to predict future pseudo-random numbers. • CVE-2000-0335: DNS resolver library uses predictable IDs, which allows a local attacker to spoof DNS query results. • CVE-2005-1636: MFV. predictable filename and insecure permissions allows file modification to execute SQL queries.

Related

Observed example · CVE (5)

  • CVE-2024-48445 An issue in compop.ca ONLINE MALL v.3.5.3 allows a remote attacker to execute arbitrary code via the rid, tid, et, and ts parameters. vulnerability
  • CVE-2005-1636 mysql_install_db in MySQL 4.1.x before 4.1.12 and 5.x up to 5.0.4 creates the mysql_install_db.X file with a predictable filename and… vulnerability
  • CVE-2002-0389 Pipermail in Mailman stores private mail messages with predictable filenames in a world-executable directory, which allows local users to… vulnerability
  • CVE-2001-1141 The Pseudo-Random Number Generator (PRNG) in SSLeay and OpenSSL before 0.9.6b allows attackers to use the output of small PRNG requests to… vulnerability
  • CVE-2000-0335 The resolver in glibc 2.1.3 uses predictable IDs, which allows a local attacker to spoof DNS query results. vulnerability

Child of · CWE (1)

  • CWE-340 Generation of Predictable Numbers or Identifiers weakness

Referenced by CVE · weakness (20)

  • CVE-2026-94456 Postiz generates security-sensitive credentials using `Math.random()` instead of a cryptographically secure source. vulnerability
  • CVE-2026-87912 A missing S3 bucket ownership verification in the AWS Security Agent plugin in Amazon aws-agents-for-devsecops before 1.1.0 might allow… vulnerability
  • CVE-2026-87913 A missing S3 bucket ownership verification in the AWS Security Agent MCP server before 0.2.0 version might allow remote attackers to obtain… vulnerability
  • CVE-2026-19565 Apache::AppSamurai::Util versions through 1.01 for Perl generate predictable session authentication keys from the clock and process id in… vulnerability
  • CVE-2026-15571 A flaw was found in the legacy client-initiated account-linking endpoint of Keycloak, a widely used open-source identity and access… vulnerability
  • CVE-2026-38968 ntopng through 6.6 is vulnerable to Predictable Session Identifier which can lead to Session Hijacking. vulnerability
  • CVE-2026-36609 Mercusys AC12G (EU) V1 router with firmware AC12G(EU)_V1_200909 uses a static authentication nonce that does not change between requests… vulnerability
  • CVE-2026-5081 Apache::Session::Generate::ModUniqueId versions from 1.54 through 1.94 for Perl session ids are insecure. vulnerability
  • CVE-2026-42365 A guessable session cookie vulnerability exists in the Web Interface functionality of GeoVision LPC2011/LPC2211 1.10. vulnerability
  • CVE-2026-40164 jq is a command-line JSON processor. vulnerability
  • CVE-2025-40780 In specific circumstances, due to a weakness in the Pseudo Random Number Generator (PRNG) that is used, it is possible for an attacker to… vulnerability
  • CVE-2025-42925 Due to the lack of randomness in assigning Object Identifiers in the SAP NetWeaver AS JAVA IIOP service, an authenticated attacker with low… vulnerability
  • CVE-2025-48461 Successful exploitation of the vulnerability could allow an unauthenticated attacker to conduct brute force guessing and account takeover… vulnerability
  • CVE-2024-10141 A vulnerability, which was classified as problematic, was found in jsbroks COCO Annotator 0.11.1. vulnerability
  • CVE-2023-49259 The authentication cookies are generated using an algorithm based on the username, hardcoded secret and the up-time, and can be guessed in… vulnerability
  • CVE-2021-4277 A vulnerability, which was classified as problematic, has been found in fredsmith utils. vulnerability
  • CVE-2020-5365 Dell EMC Isilon versions 8.2.2 and earlier contain a remotesupport vulnerability. vulnerability
  • CVE-2020-1731 A flaw was found in all versions of the Keycloak operator, before version 8.0.2,(community only) where the operator generates a random… vulnerability
  • CVE-2019-6563 Moxa IKS and EDS generate a predictable cookie calculated with an MD5 hash, allowing an attacker to capture the administrator's password,… vulnerability
  • CVE-2018-17917 All versions of Hangzhou Xiongmai Technology Co., Ltd XMeye P2P Cloud Server may allow an attacker to use MAC addresses to enumerate… vulnerability

Referenced by CWE · has member (1)

Referenced by CWE · peer of (1)

  • CWE-339 Small Seed Space in PRNG weakness