The product uses a scheme that generates numbers or identifiers that are more predictable than required.
View on MITRENo mitigation information available for this CWE.
No detection method information available for this CWE.
This code generates a unique random identifier for a user's session.
Because the seed for the PRNG is always the user's ID, the session ID will always be the same. An attacker could thus predict any user's session ID and potentially hijack the session.
Product for administering PBX systems uses predictable identifiers and timestamps for filenames (CWE-340) which allows attackers to access files via direct request (CWE-425).
View DetailsPRNG 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.
View DetailsCWE-340: Generation of Predictable Numbers or Identifiers is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product uses a scheme that generates numbers or identifiers that are more predictable than required.
If exploited, CWE-340 (Generation of Predictable Numbers or Identifiers) it can compromise Other, leading to outcomes such as Varies by Context.
MITRE documents real CVEs mapped to CWE-340, including CVE-2022-29330, CVE-2001-1141 and CVE-1999-0074. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.
A CWE (Common Weakness Enumeration) like CWE-340 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.