CWE-343: Predictable Value Range from Previous Values
|
Weakness ID: 343
Vulnerability Mapping:
ALLOWED
This CWE ID may be used to map to real-world vulnerabilities
Abstraction:
Base
Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource.
|
View customized information:
Shows the description and diagram, platforms, mitigations, consequences, relationships, memberships, and content history.
For users who are interested in more notional aspects of a weakness. Example: educators, technical writers, and project/program managers.
For users who are concerned with the practical application and details about the nature of a weakness and how to prevent it from happening. Example: tool developers, security researchers, pen-testers, incident response analysts.
For users who are mapping an issue to CWE/CAPEC IDs, i.e., finding the most appropriate CWE for a specific issue (e.g., a CVE record). Example: tool developers, security researchers.
For users who wish to see all available information for the CWE/CAPEC entry.
For users who want to customize what details are displayed.
More information is available — Please edit the custom filter or select a different filter.
Description
The product's random number generator produces a series of values which, when observed, can be used to infer a relatively small range of possibilities for the next value that could be generated.
Common Consequences
This table specifies different individual consequences
associated with the weakness. The Scope identifies the application security area that is
violated, while the Impact describes the negative technical impact that arises if an
adversary succeeds in exploiting this weakness. The Likelihood provides information about
how likely the specific consequence is expected to be seen relative to the other
consequences in the list. For example, there may be high likelihood that a weakness will be
exploited to achieve a certain impact, but a low likelihood that it will be exploited to
achieve a different impact.
| Impact |
Details |
|
Varies by Context
|
Scope: Other
In some cases, an attacker cannot predict the exact value that will be produced next, but can narrow down the possibilities significantly. This reduces the amount of effort to perform a brute force attack.
|
Potential Mitigations
| Phase(s) |
Mitigation |
|
Architecture and Design; Implementation
|
The output of a random number generator
should not be predictable based on observations of
previous values.
|
|
Implementation
|
Increase the entropy used to seed a PRNG.
|
|
Architecture and Design; Requirements
|
Strategy: Libraries or Frameworks
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.
|
Modes
Of Introduction
The different Modes of Introduction provide information
about how and when this
weakness may be introduced. The Phase identifies a point in the life cycle at which
introduction
may occur, while the Note provides a typical scenario related to introduction during the
given
phase.
| Phase(s) |
Note |
|
Architecture and Design
|
|
|
Implementation
|
|
Applicable Platforms
This listing shows possible areas for which the given
weakness could appear. These
may be for specific named Languages, Operating Systems, Architectures, Paradigms,
Technologies,
or a class of such platforms. The platform is listed along with how frequently the given
weakness appears for that instance.
| Type |
Applicable Platforms |
Notes |
| Languages |
Class: Not Language-Specific
(Undetermined Prevalence)
|
|
Demonstrative Examples
Example 1
Suppose a product generates random numbers
between 1 and 100,000, but it always produces a larger value
until it reaches 100,000.
If the generator produces a value of 90,000, then the
attacker knows that the next value will be somewhere
between 90,000 and 100,000. Instead of 100,000
possibilities, the attacker only needs to consider
10,000 - that is, 10% of the entire range.
Weakness Ordinalities
| Ordinality |
Description |
|
Primary
|
(where the weakness exists independent of other weaknesses)
|
Vulnerability Mapping Notes
|
Usage
|
ALLOWED
(this CWE ID may be used to map to real-world vulnerabilities)
|
| Reason |
Acceptable-Use
|
|
Rationale
|
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
|
|
Comments
|
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
|
Notes
Maintenance
As of CWE 4.5, terminology related to randomness, entropy, and
predictability can vary widely. Within the developer and other
communities, "randomness" is used heavily. However, within
cryptography, "entropy" is distinct, typically implied as a
measurement. There are no commonly-used definitions, even within
standards documents and cryptography papers. Future versions of
CWE will attempt to define these terms and, if necessary,
distinguish between them in ways that are appropriate for
different communities but do not reduce the usability of CWE for
mapping, understanding, or other scenarios.
Taxonomy
Mappings
| Mapped Taxonomy Name |
Node ID |
Fit |
Mapped Node Name |
| PLOVER |
|
|
Predictable Value Range from Previous Values |
References
| [REF-267] |
Information Technology Laboratory, National Institute of Standards and Technology. "FIPS PUB 140-2: SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC MODULES". 2001-05-25.
<https://csrc.nist.gov/files/pubs/fips/140-2/upd2/final/docs/fips1402.pdf>.
(URL validated: 2025-05-21)
|
| [REF-320] |
Michal Zalewski. "Strange Attractors and TCP/IP Sequence Number Analysis". 2001.
<https://lcamtuf.coredump.cx/oldtcp/tcpseq.html>.
(URL validated: 2023-04-07)
|
| [REF-44] |
Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 20: Weak Random Numbers." Page 299. McGraw-Hill. 2010.
|
Content
History
| Submissions |
| Submission Date |
Submitter |
Organization |
2006-07-19
(CWE Draft 3, 2006-07-19)
|
PLOVER |
|
|
|
| Modifications |
| Modification Date |
Modifier |
Organization |
2026-10-28
(CWE 5.0, 2026-10-28)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences, Demonstrative_Examples, Description, Potential_Mitigations
|
2025-12-11
(CWE 4.19, 2025-12-11)
|
CWE Content Team |
MITRE |
|
updated Weakness_Ordinalities
|
2025-09-09
(CWE 4.18, 2025-09-09)
|
CWE Content Team |
MITRE |
|
updated References
|
2023-06-29
(CWE 4.12, 2023-06-29)
|
CWE Content Team |
MITRE |
|
updated Mapping_Notes
|
2023-04-27
(CWE 4.11, 2023-04-27)
|
CWE Content Team |
MITRE |
|
updated References, Relationships
|
2023-01-31
(CWE 4.10, 2023-01-31)
|
CWE Content Team |
MITRE |
|
updated Description
|
2021-07-20
(CWE 4.5, 2021-07-20)
|
CWE Content Team |
MITRE |
|
updated Maintenance_Notes
|
2020-02-24
(CWE 4.0, 2020-02-24)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2017-11-08
(CWE 3.0, 2017-11-08)
|
CWE Content Team |
MITRE |
|
updated Applicable_Platforms, References
|
2012-10-30
(CWE 2.3, 2012-10-30)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations
|
2012-05-11
(CWE 2.2, 2012-05-15)
|
CWE Content Team |
MITRE |
|
updated References, Relationships
|
2011-09-13
(CWE 2.1, 2011-09-13)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations, References
|
2011-06-27
(CWE 2.0, 2011-06-27)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences
|
2011-06-01
(CWE 1.13, 2011-06-01)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences
|
2010-06-21
(CWE 1.9, 2010-06-21)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations
|
2009-12-28
(CWE 1.7, 2009-12-28)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations
|
2009-03-10
(CWE 1.3, 2009-03-10)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations
|
2008-10-14
(CWE 1.0.1, 2008-10-14)
|
CWE Content Team |
MITRE |
|
updated Description
|
2008-09-08
(CWE 1.0, 2008-09-09)
|
CWE Content Team |
MITRE |
|
updated Relationships, Taxonomy_Mappings
|
2008-07-01
(CWE 1.0, 2008-09-09)
|
Eric Dalci |
Cigital |
|
updated Time_of_Introduction
|
More information is available — Please edit the custom filter or select a different filter.
|