| Impact | Details |
|---|---|
|
Bypass Protection Mechanism; Other |
Scope: Access Control, Other
An attacker could guess the random numbers generated and could gain unauthorized access to a system if the random numbers are used for authentication and authorization.
|
| Phase(s) | Mitigation |
|---|---|
|
Implementation |
Determine the necessary entropy to adequately provide for randomness and predictability. This can be achieved by increasing the number of bits of objects such as keys and seeds.
|
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 330 | Use of Insufficiently Random Values |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 332 | Insufficient Entropy in PRNG |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 333 | Improper Handling of Insufficient Entropy in TRNG |
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 330 | Use of Insufficiently Random Values |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | Category Category - a CWE entry that contains a set of other entries that share a common characteristic. | 1013 | Encrypt Data |
| Phase | Note |
|---|---|
| Architecture and Design | |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
Class: Not Language-Specific (Undetermined Prevalence)
Example 1
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.
This example also exhibits a Small Seed Space (CWE-339).
Example 2
The following code uses a statistical PRNG to create a URL for a receipt that remains active for some period of time after a purchase.
This code uses the Random.nextInt() function to generate "unique" identifiers for the receipt pages it generates. Because Random.nextInt() is a statistical PRNG, it is easy for an attacker to guess the strings it generates. Although the underlying design of the receipt system is also faulty, it would be more secure if it used a random number generator that did not produce predictable receipt identifiers, such as a cryptographic PRNG.
Note: this is a curated list of examples for users to understand the variety of ways in which this weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference | Description |
|---|---|
|
Insufficiently random data used to generate session tokens using C rand(). Also, for certificate/key generation, uses a source that does not block when entropy is low.
|
|
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | ViewView - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). | 884 | CWE Cross-section |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 905 | SFP Primary Cluster: Predictability |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1170 | SEI CERT C Coding Standard - Guidelines 48. Miscellaneous (MSC) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1346 | OWASP Top Ten 2021 Category A02:2021 - Cryptographic Failures |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1414 | Comprehensive Categorization: Randomness |
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.Maintenance
| Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
|---|---|---|---|
| PLOVER | Insufficient Entropy | ||
| WASC | 11 | Brute Force | |
| CERT C Secure Coding | MSC32-C | Exact | Properly seed pseudorandom number generators |
| CAPEC-ID | Attack Pattern Name |
|---|---|
| CAPEC-59 | Session Credential Falsification through Prediction |
| Submissions | ||
|---|---|---|
| Submission Date | Submitter | Organization |
|
2006年07月19日
(CWE Draft 3, 2006年07月19日) |
PLOVER | |
| Modifications | ||
| Modification Date | Modifier | Organization |
| 2023年06月29日 | CWE Content Team | MITRE |
| updated Mapping_Notes | ||
| 2023年04月27日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2023年01月31日 | CWE Content Team | MITRE |
| updated Description | ||
| 2021年10月28日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2021年07月20日 | CWE Content Team | MITRE |
| updated Maintenance_Notes, Observed_Examples | ||
| 2020年02月24日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2019年06月20日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2019年01月03日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2017年11月08日 | CWE Content Team | MITRE |
| updated Applicable_Platforms, Modes_of_Introduction, Relationships, Taxonomy_Mappings | ||
| 2015年12月07日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2012年10月30日 | CWE Content Team | MITRE |
| updated Potential_Mitigations | ||
| 2012年05月11日 | CWE Content Team | MITRE |
| updated Common_Consequences, Demonstrative_Examples, References, Relationships | ||
| 2011年06月01日 | CWE Content Team | MITRE |
| updated Common_Consequences | ||
| 2010年02月16日 | CWE Content Team | MITRE |
| updated Taxonomy_Mappings | ||
| 2008年09月08日 | CWE Content Team | MITRE |
| updated Relationships, Taxonomy_Mappings | ||
| 2008年07月01日 | Eric Dalci | Cigital |
| updated Time_of_Introduction | ||
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.