CWE-ID
stringlengths
8
118
Name
stringclasses
3 values
Weakness Abstraction
stringclasses
3 values
Status
stringlengths
36
505
Description
stringlengths
45
4.19k
Extended Description
stringlengths
57
363
Related Weaknesses
stringclasses
15 values
Weakness Ordinalities
stringclasses
74 values
Applicable Platforms
stringclasses
15 values
Background Details
stringclasses
49 values
Alternate Terms
stringclasses
61 values
Modes Of Introduction
float64
Exploitation Factors
float64
Likelihood of Exploit
stringlengths
28
1.92k
Common Consequences
stringclasses
52 values
Detection Methods
stringlengths
75
10.9k
Potential Mitigations
stringlengths
117
8.88k
Observed Examples
stringclasses
9 values
Functional Areas
stringclasses
4 values
Affected Resources
stringlengths
48
1.78k
Taxonomy Mappings
stringlengths
5
102
Related Attack Patterns
stringlengths
50
2.48k
Notes
float64
__index_level_0__
int64
15
1.39k
Processor Optimization Removal or Modification of Security-critical Code
Base
Incomplete
The developer builds a security-critical protection mechanism into the software, but the processor optimizes the execution of the program such that the mechanism is removed or modified.
null
::NATURE:ChildOf:CWE ID:1038:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Primary:DESCRIPTION:This weakness does not depend on other weaknesses and is the result of choices made by the processor in executing the specified application.::
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Rarely::TECHNOLOGY NAME:Processor Hardware:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Architecture and Design:NOTE:Optimizations built into the design of the processor can have unintended consequences during the execution of an application.::
null
null
::SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:LIKELIHOOD:High:NOTE:A successful exploitation of this weakness will change the order of an application's execution and will likely be used to bypass specific protection mechanisms. This bypass can be exploited further to potentially read data that should otherwise be unaccessible.::
::METHOD:White Box:DESCRIPTION:In theory this weakness can be detected through the use of white box testing techniques where specifically crafted test cases are used in conjunction with debuggers to verify the order of statements being executed.:EFFECTIVENESS:Opportunistic::
null
::REFERENCE:CVE-2017-5715:DESCRIPTION:Intel, ARM, and AMD processor optimizations related to speculative execution and branch prediction cause access control checks to be bypassed when placing data into the cache. Often known as Spectre.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-5715::REFERENCE:CVE-2017-5753:DESCRIPTION:Intel, ARM, and AMD processor optimizations related to speculative execution and branch prediction cause access control checks to be bypassed when placing data into the cache. Often known as Spectre.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-5753::REFERENCE:CVE-2017-5754:DESCRIPTION:Intel processor optimizations related to speculative execution cause access control checks to be bypassed when placing data into the cache. Often known as Meltdown.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-5754::
null
null
null
::663::
::TYPE:Maintenance:NOTE:As of CWE 4.9, members of the CWE Hardware SIG are closely analyzing this entry and others to improve CWE's coverage of transient execution weaknesses, which include issues related to Spectre, Meltdown, and other attacks. Additional investigation may include other weaknesses related to microarchitectural state. As a result, this entry might change significantly in CWE 4.10.::
null
1,037
Use of Redundant Code
Base
Incomplete
The product has multiple functions, methods, procedures, macros, etc. that contain the same code.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. For example, if there are two copies of the same code, the programmer might fix a weakness in one copy while forgetting to fix the same weakness in another copy.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
::PHASE:Implementation:DESCRIPTION:Merge common functionality into a single function and then call that function from across the entire code base.::
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-19::
null
null
null
1,041
Data Element Aggregating an Excessively Large Number of Non-Primitive Elements
Base
Incomplete
The product uses a data element that has an excessively large number of sub-elements with non-primitive data types such as structures or aggregated objects.
This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability. While the interpretation of excessively large may vary for each product or developer, CISQ recommends a default of 5 sub-elements.
::NATURE:ChildOf:CWE ID:1093:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-12::
null
null
null
1,043
Architecture with Number of Horizontal Layers Outside of Expected Range
Base
Incomplete
The product's architecture contains too many - or too few - horizontal layers.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. While the interpretation of expected range may vary for each product or developer, CISQ recommends a default minimum of 4 layers and maximum of 8 layers.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
::PHASE:Architecture and Design::
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-9::
null
null
null
1,044
Parent Class with a Virtual Destructor and a Child Class without a Virtual Destructor
Base
Incomplete
A parent class has a virtual destructor method, but the parent has a child class that does not have a virtual destructor.
This issue can prevent the product from running reliably, since the child might not perform essential destruction operations. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability, such as a memory leak (CWE-401).
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-17::
null
null
null
1,045
Creation of Immutable Text Using String Concatenation
Base
Incomplete
The product creates an immutable text string using string concatenation operations.
When building a string via a looping feature (e.g., a FOR or WHILE loop), the use of += to append to the existing string will result in the creation of a new object with each iteration. This programming pattern can be inefficient in comparison with use of text buffer data elements. This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this could be influenced to create performance problem.
::NATURE:ChildOf:CWE ID:1176:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-2::
null
null
null
1,046
Modules with Circular Dependencies
Base
Incomplete
The product contains modules in which one module has references that cycle back to itself, i.e., there are circular dependencies.
As an example, with Java, this weakness might indicate cycles between packages. This issue makes it more difficult to maintain the product due to insufficient modularity, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-7::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-13::
null
null
null
1,047
Invokable Control Element with Large Number of Outward Calls
Base
Incomplete
The code contains callable control elements that contain an excessively large number of references to other application objects external to the context of the callable, i.e. a Fan-Out value that is excessively large.
While the interpretation of excessively large Fan-Out value may vary for each product or developer, CISQ recommends a default of 5 referenced objects. This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-4::
null
null
null
1,048
Excessive Data Query Operations in a Large Data Table
Base
Incomplete
The product performs a data query with a large number of joins and sub-queries on a large data table.
This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability. While the interpretation of large data table and large number of joins or sub-queries may vary for each product or developer, CISQ recommends a default of 1 million rows for a large data table, a default minimum of 5 joins, and a default minimum of 3 sub-queries.
::NATURE:ChildOf:CWE ID:1176:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-4::
null
null
null
1,049
Excessive Platform Resource Consumption within a Loop
Base
Incomplete
The product has a loop body or loop condition that contains a control element that directly or indirectly consumes platform resources, e.g. messaging, sessions, locks, or file descriptors.
This issue can make the product perform more slowly. If an attacker can influence the number of iterations in the loop, then this performance problem might allow a denial of service by consuming more platform resources than intended.
::NATURE:ChildOf:CWE ID:405:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-8::
null
null
null
1,050
Initialization with Hard-Coded Network Resource Configuration Data
Base
Incomplete
The product initializes data using hard-coded values that act as network resource identifiers.
This issue can prevent the product from running reliably, e.g. if it runs in an environment does not use the hard-coded network resource identifiers. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1419:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-18::
null
null
null
1,051
Excessive Use of Hard-Coded Literals in Initialization
Base
Incomplete
The product initializes a data element using a hard-coded literal that is not a simple integer or static constant element.
This issue makes it more difficult to modify or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1419:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-3::
null
null
null
1,052
Missing Documentation for Design
Base
Incomplete
The product does not have documentation that represents how it is designed.
This issue can make it more difficult to understand and maintain the product. It can make it more difficult and time-consuming to detect and/or fix vulnerabilities.
::NATURE:ChildOf:CWE ID:1059:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,053
Invocation of a Control Element at an Unnecessarily Deep Horizontal Layer
Base
Incomplete
The code at one architectural layer invokes code that resides at a deeper layer than the adjacent layer, i.e., the invocation skips at least one layer, and the invoked code is not part of a vertical utility layer that can be referenced from any horizontal layer.
This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1061:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-12::
null
null
null
1,054
Multiple Inheritance from Concrete Classes
Base
Incomplete
The product contains a class with inheritance from more than one concrete class.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1093:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-2::
null
null
null
1,055
Invokable Control Element with Variadic Parameters
Base
Incomplete
A named-callable or method control element has a signature that supports a variable (variadic) number of parameters or arguments.
This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability. With variadic arguments, it can be difficult or inefficient for manual analysis to be certain of which function/method is being invoked.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-8::
null
null
null
1,056
Data Access Operations Outside of Expected Data Manager Component
Base
Incomplete
The product uses a dedicated, central data manager component as required by design, but it contains code that performs data-access operations that do not use this data manager.
This issue can make the product perform more slowly than intended, since the intended central data manager may have been explicitly optimized for performance or other quality characteristics. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1061:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-11::
null
null
null
1,057
Invokable Control Element in Multi-Thread Context with non-Final Static Storable or Member Element
Base
Incomplete
The code contains a function or method that operates in a multi-threaded environment but owns an unsafe non-final static storable or member data element.
This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:662:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:662:VIEW ID:1305:ORDINAL:Primary::NATURE:ChildOf:CWE ID:662:VIEW ID:1340:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-11::
null
null
null
1,058
Excessive Number of Inefficient Server-Side Data Accesses
Base
Incomplete
The product performs too many data queries without using efficient data processing functionality such as stored procedures.
This issue can make the product perform more slowly due to computational expense. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability. While the interpretation of too many data queries may vary for each product or developer, CISQ recommends a default maximum of 5 data queries for an inefficient function/procedure.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-9::
null
null
null
1,060
Parent Class with References to Child Class
Base
Incomplete
The code has a parent class that contains references to a child class, its methods, or its members.
This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1061:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-14::
null
null
null
1,062
Creation of Class Instance within a Static Code Block
Base
Incomplete
A static code block creates an instance of a class.
This pattern identifies situations where a storable data element or member data element is initialized with a value in a block of code which is declared as static. This issue can make the product perform more slowly by performing initialization before it is needed. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1176:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-1::
null
null
null
1,063
Invokable Control Element with Signature Containing an Excessive Number of Parameters
Base
Incomplete
The product contains a function, subroutine, or method whose signature has an unnecessarily large number of parameters/arguments.
This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. While the interpretation of large number of parameters. may vary for each product or developer, CISQ recommends a default maximum of 7 parameters/arguments.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-13::
null
null
null
1,064
Runtime Resource Management Control Element in a Component Built to Run on Application Servers
Base
Incomplete
The product uses deployed components from application servers, but it also uses low-level functions/methods for management of resources, instead of the API provided by the application server.
This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-5::
null
null
null
1,065
Missing Serialization Control Element
Base
Incomplete
The product contains a serializable data element that does not have an associated serialization method.
This issue can prevent the product from running reliably, e.g. by triggering an exception. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability. As examples, the serializable nature of a data element comes from a serializable SerializableAttribute attribute in .NET and the inheritance from the java.io.Serializable interface in Java.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-2::
null
null
null
1,066
Excessive Execution of Sequential Searches of Data Resource
Base
Incomplete
The product contains a data query against an SQL table or view that is configured in a way that does not utilize an index and may cause sequential searches to be performed.
This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1176:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-5::
null
null
null
1,067
Inconsistency Between Implementation and Documented Design
Base
Incomplete
The implementation of the product is not consistent with the design as described within the relevant documentation.
This issue makes it more difficult to maintain the product due to inconsistencies, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Implementation::
null
null
null
null
null
null
null
null
null
null
null
null
1,068
Serializable Data Element Containing non-Serializable Item Elements
Base
Incomplete
The product contains a serializable, storable data element such as a field or member, but the data element contains member elements that are not serializable.
This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability. As examples, the serializable nature of a data element comes from a serializable SerializableAttribute attribute in .NET and the inheritance from the java.io.Serializable interface in Java.
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-3::
null
null
null
1,070
Empty Code Block
Base
Incomplete
The source code contains a block that does not contain any code, i.e., the block is empty.
Empty code blocks can occur in the bodies of conditionals, function or method definitions, exception handlers, etc. While an empty code block might be intentional, it might also indicate incomplete implementation, accidental code deletion, unexpected macro expansion, etc. For some programming languages and constructs, an empty block might be allowed by the syntax, but the lack of any behavior within the block might violate a convention or API in such a way that it is an error.
::NATURE:ChildOf:CWE ID:1164:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
null
null
null
null
1,071
Data Resource Access without Use of Connection Pooling
Base
Incomplete
The product accesses a data resource through a database without using a connection pooling capability.
This issue can make the product perform more slowly, as connection pools allow connections to be reused without the overhead and time consumption of opening and closing a new connection. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:405:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-13::
null
null
null
1,072
Non-SQL Invokable Control Element with Excessive Number of Data Resource Accesses
Base
Incomplete
The product contains a client with a function or method that contains a large number of data accesses/queries that are sent through a data manager, i.e., does not use efficient database capabilities.
This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability. While the interpretation of large number of data accesses/queries may vary for each product or developer, CISQ recommends a default maximum of 2 data accesses per function/method.
::NATURE:ChildOf:CWE ID:405:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-10::
null
null
null
1,073
Class with Excessively Deep Inheritance
Base
Incomplete
A class has an inheritance level that is too high, i.e., it has a large number of parent classes.
This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. While the interpretation of large number of parent classes may vary for each product or developer, CISQ recommends a default maximum of 7 parent classes.
::NATURE:ChildOf:CWE ID:1093:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-17::
null
null
null
1,074
Unconditional Control Flow Transfer outside of Switch Block
Base
Incomplete
The product performs unconditional control transfer (such as a goto) in code outside of a branching structure such as a switch block.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-1::
null
null
null
1,075
Parent Class without Virtual Destructor Method
Base
Incomplete
A parent class contains one or more child classes, but the parent class does not have a virtual destructor method.
This issue can prevent the product from running reliably due to undefined or unexpected behaviors. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-16::
null
null
null
1,079
Source Code File with Excessive Number of Lines of Code
Base
Incomplete
A source code file has too many lines of code.
This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. While the interpretation of too many lines of code may vary for each product or developer, CISQ recommends a default threshold value of 1000.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-8::
null
null
null
1,080
Class Instance Self Destruction Control Element
Base
Incomplete
The code contains a class instance that calls the method or function to delete or destroy itself.
For example, in C++, delete this will cause the object to delete itself. This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-7::
null
null
null
1,082
Data Access from Outside Expected Data Manager Component
Base
Incomplete
The product is intended to manage data access through a particular data manager component such as a relational or non-SQL database, but it contains code that performs data access operations without using that component.
When the product has a data access component, the design may be intended to handle all data access operations through that component. If a data access operation is performed outside of that component, then this may indicate a violation of the intended design. This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1061:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-10::
null
null
null
1,083
Invokable Control Element with Excessive File or Data Access Operations
Base
Incomplete
A function or method contains too many operations that utilize a data manager or file resource.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. While the interpretation of too many operations may vary for each product or developer, CISQ recommends a default maximum of 7 operations for the same data manager or file.
::NATURE:ChildOf:CWE ID:405:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-14::
null
null
null
1,084
Invokable Control Element with Excessive Volume of Commented-out Code
Base
Incomplete
A function, method, procedure, etc. contains an excessive amount of code that has been commented out within its body.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. While the interpretation of excessive volume may vary for each product or developer, CISQ recommends a default threshold of 2% of commented code.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-6::
null
null
null
1,085
Class with Excessive Number of Child Classes
Base
Incomplete
A class contains an unnecessarily large number of children.
This issue makes it more difficult to understand and maintain the software, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. While the interpretation of large number of children may vary for each product or developer, CISQ recommends a default maximum of 10 child classes.
::NATURE:ChildOf:CWE ID:1093:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-18::
null
null
null
1,086
Class with Virtual Method without a Virtual Destructor
Base
Incomplete
A class contains a virtual method, but the method does not have an associated virtual destructor.
This issue can prevent the product from running reliably, e.g. due to undefined behavior. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-15::
null
null
null
1,087
Large Data Table with Excessive Number of Indices
Base
Incomplete
The product uses a large data table that contains an excessively large number of indices.
This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability. While the interpretation of large data table and excessively large number of indices may vary for each product or developer, CISQ recommends a default threshold of 1000000 rows for a large table and a default threshold of 3 indices.
::NATURE:ChildOf:CWE ID:405:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-6::
null
null
null
1,089
Method Containing Access of a Member Element from Another Class
Base
Incomplete
A method for a class performs an operation that directly accesses a member element from another class.
This issue suggests poor encapsulation and makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1061:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-16::
null
null
null
1,090
Use of Same Invokable Control Element in Multiple Architectural Layers
Base
Incomplete
The product uses the same control element across multiple architectural layers.
This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-10::
null
null
null
1,092
Excessive Index Range Scan for a Data Resource
Base
Incomplete
The product contains an index range scan for a large data table, but the scan can cover a large number of rows.
This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this performance problem might introduce a vulnerability. While the interpretation of large data table and excessive index range may vary for each product or developer, CISQ recommends a threshold of 1000000 table rows and a threshold of 10 for the index range.
::NATURE:ChildOf:CWE ID:405:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Performance::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCPEM:ENTRY ID:ASCPEM-PRF-7::
null
null
null
1,094
Loop Condition Value Update within the Loop
Base
Incomplete
The product uses a loop with a control flow condition based on a value that is updated within the body of the loop.
This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-5::
null
null
null
1,095
Persistent Storable Data Element without Associated Comparison Control Element
Base
Incomplete
The product uses a storable data element that does not have all of the associated functions or methods that are necessary to support comparison.
For example, with Java, a class that is made persistent requires both hashCode() and equals() methods to be defined. This issue can prevent the product from running reliably, due to incorrect or unexpected comparison results. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:595:VIEW ID:1305:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-4::
null
null
null
1,097
Data Element containing Pointer Item without Proper Copy Control Element
Base
Incomplete
The code contains a data element with a pointer that does not have an associated copy or constructor method.
This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Reliability::
null
null
null
null
null
::TAXONOMY NAME:OMG ASCRM:ENTRY ID:ASCRM-RLB-6::
null
null
null
1,098
Inconsistent Naming Conventions for Identifiers
Base
Incomplete
The product's code, documentation, or other artifacts do not consistently use the same naming conventions for variables, callables, groups of related callables, I/O capabilities, data types, file names, or similar types of elements.
This issue makes it more difficult to understand and/or maintain the product due to inconsistencies, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,099
Insufficient Isolation of System-Dependent Functions
Base
Incomplete
The product or code does not isolate system-dependent functionality into separate standalone modules.
This issue makes it more difficult to maintain and/or port the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1061:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,100
Reliance on Runtime Component in Generated Code
Base
Incomplete
The product uses automatically-generated code that cannot be executed without a specific runtime support component.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,101
Reliance on Machine-Dependent Data Representation
Base
Incomplete
The code uses a data representation that relies on low-level data representation or constructs that may vary across different processors, physical machines, OSes, or other physical components.
This issue makes it more difficult to maintain and/or port the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:758:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:1105:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,102
Use of Platform-Dependent Third Party Components
Base
Incomplete
The product relies on third-party components that do not provide equivalent functionality across all desirable platforms.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:758:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,103
Use of Unmaintained Third Party Components
Base
Incomplete
The product relies on third-party components that are not actively supported or maintained by the original developer or a trusted proxy for the original developer.
Reliance on components that are no longer maintained can make it difficult or impossible to fix significant bugs, vulnerabilities, or quality issues. In effect, unmaintained code can become obsolete. This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1357:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,104
Insufficient Encapsulation of Machine-Dependent Functionality
Base
Incomplete
The product or code uses machine-dependent functionality, but it does not sufficiently encapsulate or isolate this functionality from the rest of the code.
This issue makes it more difficult to port or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:758:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:1061:VIEW ID:1000::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,105
Insufficient Use of Symbolic Constants
Base
Incomplete
The source code uses literal constants that may need to change or evolve over time, instead of using symbolic constants.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,106
Insufficient Isolation of Symbolic Constant Definitions
Base
Incomplete
The source code uses symbolic constants, but it does not sufficiently place the definitions of these constants into a more centralized or isolated location.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,107
Excessive Reliance on Global Variables
Base
Incomplete
The code is structured in a way that relies too much on using or setting global variables throughout various points in the code, instead of preserving the associated information in a narrower, more local context.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1076:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
::METHOD:Automated Static Analysis:DESCRIPTION: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.):EFFECTIVENESS:High::
null
null
null
null
null
null
null
null
1,108
Use of Same Variable for Multiple Purposes
Base
Incomplete
The code contains a callable, block, or other code element in which the same variable is used to control more than one unique task or store more than one instance of data.
Use of the same variable for multiple purposes can make it more difficult for a person to read or understand the code, potentially hiding other quality issues. This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,109
Incomplete Design Documentation
Base
Incomplete
The product's design documentation does not adequately describe control flow, data flow, system initialization, relationships between tasks, components, rationales, or other important aspects of the design.
null
::NATURE:ChildOf:CWE ID:1059:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,110
Incomplete I/O Documentation
Base
Incomplete
The product's documentation does not adequately define inputs, outputs, or system/software interfaces.
null
::NATURE:ChildOf:CWE ID:1059:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,111
Incomplete Documentation of Program Execution
Base
Incomplete
The document does not fully define all mechanisms that are used to control or influence how product-specific programs are executed.
This includes environmental variables, configuration files, registry keys, command-line switches or options, or system settings.
::NATURE:ChildOf:CWE ID:1059:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,112
Inappropriate Comment Style
Base
Incomplete
The source code uses comment styles or formats that are inconsistent or do not follow expected standards for the product.
This issue makes it more difficult to maintain the product due to insufficient legibility, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,113
Inappropriate Whitespace Style
Base
Incomplete
The source code contains whitespace that is inconsistent across the code or does not follow expected standards for the product.
This issue makes it more difficult to understand and maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,114
Source Code Element without Standard Prologue
Base
Incomplete
The source code contains elements such as source files that do not consistently provide a prologue or header that has been standardized for the project.
The lack of a prologue can make it more difficult to accurately and quickly understand the associated code. Standard prologues or headers may contain information such as module name, version number, author, date, purpose, function, assumptions, limitations, accuracy considerations, etc. This issue makes it more difficult to maintain the product due to insufficient analyzability, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,115
Inaccurate Comments
Base
Incomplete
The source code contains comments that do not accurately describe or explain aspects of the portion of the code with which the comment is associated.
When a comment does not accurately reflect the associated code elements, this can introduce confusion to a reviewer (due to inconsistencies) or make it more difficult and less efficient to validate that the code is implementing the intended behavior correctly. This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
::PHASE:Implementation:DESCRIPTION:Verify that each comment accurately reflects what is intended to happen during execution of the code.::
null
null
null
null
null
null
null
1,116
Callable with Insufficient Behavioral Summary
Base
Incomplete
The code contains a function or method whose signature and/or associated inline documentation does not sufficiently describe the callable's inputs, outputs, side effects, assumptions, or return codes.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1078:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,117
Insufficient Documentation of Error Handling Techniques
Base
Incomplete
The documentation does not sufficiently describe the techniques that are used for error handling, exception processing, or similar mechanisms.
Documentation may need to cover error handling techniques at multiple layers, such as module, executable, compilable code unit, or callable.
::NATURE:ChildOf:CWE ID:1059:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,118
Excessive Use of Unconditional Branching
Base
Incomplete
The code uses too many unconditional branches (such as goto).
This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,119
Excessive McCabe Cyclomatic Complexity
Base
Incomplete
The code contains McCabe cyclomatic complexity that exceeds a desirable maximum.
This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
::TAXONOMY NAME:OMG ASCMM:ENTRY ID:ASCMM-MNT-11::
null
null
null
1,121
Excessive Halstead Complexity
Base
Incomplete
The code is structured in a way that a Halstead complexity measure exceeds a desirable maximum.
A variety of Halstead complexity measures exist, such as program vocabulary size or volume. This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,122
Excessive Use of Self-Modifying Code
Base
Incomplete
The product uses too much self-modifying code.
This issue makes it more difficult to understand or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,123
Excessively Deep Nesting
Base
Incomplete
The code contains a callable or other code grouping in which the nesting / branching is too deep.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,124
Excessive Attack Surface
Base
Incomplete
The product has an attack surface whose quantitative measurement exceeds a desirable maximum.
Originating from software security, an attack surface measure typically reflects the number of input points and output points that can be utilized by an untrusted party, i.e. a potential attacker. A larger attack surface provides more places to attack, and more opportunities for developers to introduce weaknesses. In some cases, this measure may reflect other aspects of quality besides security; e.g., a product with many inputs and outputs may require a large number of tests in order to improve code coverage.
::NATURE:ChildOf:CWE ID:1120:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
1,125
Declaration of Variable with Unnecessarily Wide Scope
Base
Incomplete
The source code declares a variable in one scope, but the variable is only used within a narrower scope.
This issue makes it more difficult to understand and/or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
null
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,126
Compilation with Insufficient Warnings or Errors
Base
Incomplete
The code is compiled without sufficient warnings enabled, which may prevent the detection of subtle bugs or quality issues.
This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
::NATURE:ChildOf:CWE ID:710:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
null
null
null
::PHASE:Build and Compilation::
null
null
::SCOPE:Other:IMPACT:Reduce Maintainability::
null
null
null
null
null
null
null
null
null
1,127
Improper Use of Validation Framework
Base
Draft
The product does not use, or incorrectly uses, an input validation framework that is provided by the source language or an independent library.
Many modern coding languages provide developers with input validation frameworks to make the task of input validation easier and less error-prone. These frameworks will automatically check all input against specified criteria and direct execution to error handlers when invalid input is received. The improper use (i.e., an incorrect implementation or missing altogether) of these frameworks is not directly exploitable, but can lead to an exploitable condition if proper input validation is not performed later in the product. Not using provided input validation frameworks can also hurt the maintainability of code as future developers may not recognize the downstream input validation being used in the place of the validation framework.
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Indirect::
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
null
null
::PHASE:Architecture and Design:NOTE:This weakness may occur when software designers choose to not leverage input validation frameworks provided by the source language.::PHASE:Implementation:NOTE:This weakness may occur when developers do not correctly use a provided input validation framework.::
null
null
::SCOPE:Integrity:IMPACT:Unexpected State:NOTE:Unchecked input leads to cross-site scripting, process control, and SQL injection vulnerabilities, among others.::
::METHOD:Automated Static Analysis:DESCRIPTION:Some instances of improper input validation can be detected using automated static analysis. A static analysis tool might allow the user to specify which application-specific methods or functions perform input validation; the tool might also have built-in knowledge of validation frameworks such as Struts. The tool may then suppress or de-prioritize any associated warnings. This allows the analyst to focus on areas of the software in which input validation does not appear to be present. Except in the cases described in the previous paragraph, automated static analysis might not be able to recognize when proper input validation is being performed, leading to false positives - i.e., warnings that do not have any security consequences or require any code changes.::
::PHASE:Implementation:DESCRIPTION:Properly use provided input validation frameworks.::
null
null
null
null
null
null
null
1,173
Initialization of a Resource with an Insecure Default
Base
Incomplete
The product initializes or sets a resource with a default that is intended to be changed by the administrator, but the default is not secure.
Developers often choose default values that leave the product as open and easy to use as possible out-of-the-box, under the assumption that the administrator can (or should) change the default value. However, this ease-of-use comes at a cost when the default is insecure and the administrator does not change it.
::NATURE:ChildOf:CWE ID:1419:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:665:VIEW ID:1003:ORDINAL:Primary::
::ORDINALITY:Primary::
null
null
null
null
null
null
null
null
null
::REFERENCE:CVE-2022-36349:DESCRIPTION:insecure default variable initialization in BIOS firmware for a hardware board allows DoS:LINK:https://www.cve.org/CVERecord?id=CVE-2022-36349::REFERENCE:CVE-2022-42467:DESCRIPTION:A generic database browser interface has a default mode that exposes a web server to the network, allowing queries to the database.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-42467::
null
null
null
::665::
::TYPE:Maintenance:NOTE:This entry improves organization of concepts under initialization. The typical CWE model is to cover Missing and Incorrect behaviors. Arguably, this entry could be named as Incorrect instead of Insecure. This might be changed in the near future.::
null
1,188
Generation of Weak Initialization Vector (IV)
Base
Incomplete
The product uses a cryptographic primitive that uses an Initialization Vector (IV), but the product does not generate IVs that are sufficiently unpredictable or unique according to the expected cryptographic requirements for that primitive.
By design, some cryptographic primitives (such as block ciphers) require that IVs must have certain properties for the uniqueness and/or unpredictability of an IV. Primitives may vary in how important these properties are. If these properties are not maintained, e.g. by a bug in the code, then the cryptography may be weakened or broken by attacking the IVs themselves.
::NATURE:ChildOf:CWE ID:330:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:If the IV is not properly initialized, data that is encrypted can be compromised and information about the data can be leaked. See [REF-1179].::
null
::PHASE:Implementation:DESCRIPTION:Different cipher modes have different requirements for their IVs. When choosing and implementing a mode, it is important to understand those requirements in order to keep security guarantees intact. Generally, it is safest to generate a random IV, since it will be both unpredictable and have a very low chance of being non-unique. IVs do not have to be kept secret, so if generating duplicate IVs is a concern, a list of already-used IVs can be kept and checked against. NIST offers recommendations on generation of IVs for modes of which they have approved. These include options for when random IVs are not practical. For CBC, CFB, and OFB, see [REF-1175]; for GCM, see [REF-1178].::
::REFERENCE:CVE-2020-1472:DESCRIPTION:ZeroLogon vulnerability - use of a static IV of all zeroes in AES-CFB8 mode:LINK:https://www.cve.org/CVERecord?id=CVE-2020-1472::REFERENCE:CVE-2011-3389:DESCRIPTION:BEAST attack in SSL 3.0 / TLS 1.0. In CBC mode, chained initialization vectors are non-random, allowing decryption of HTTPS traffic using a chosen plaintext attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2011-3389::REFERENCE:CVE-2001-0161:DESCRIPTION:wireless router does not use 6 of the 24 bits for WEP encryption, making it easier for attackers to decrypt traffic:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0161::REFERENCE:CVE-2001-0160:DESCRIPTION:WEP card generates predictable IV values, making it easier for attackers to decrypt traffic:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0160::REFERENCE:CVE-2017-3225:DESCRIPTION:device bootloader uses a zero initialization vector during AES-CBC:LINK:https://www.cve.org/CVERecord?id=CVE-2017-3225::REFERENCE:CVE-2016-6485:DESCRIPTION:crypto framework uses PHP rand function - which is not cryptographically secure - for an initialization vector:LINK:https://www.cve.org/CVERecord?id=CVE-2016-6485::REFERENCE:CVE-2014-5386:DESCRIPTION:encryption routine does not seed the random number generator, causing the same initialization vector to be generated repeatedly:LINK:https://www.cve.org/CVERecord?id=CVE-2014-5386::REFERENCE:CVE-2020-5408:DESCRIPTION:encryption functionality in an authentication framework uses a fixed null IV with CBC mode, allowing attackers to decrypt traffic in applications that use this functionality:LINK:https://www.cve.org/CVERecord?id=CVE-2020-5408::REFERENCE:CVE-2017-17704:DESCRIPTION:messages for a door-unlocking product use a fixed IV in CBC mode, which is the same after each restart:LINK:https://www.cve.org/CVERecord?id=CVE-2017-17704::REFERENCE:CVE-2017-11133:DESCRIPTION:application uses AES in CBC mode, but the pseudo-random secret and IV are generated using math.random, which is not cryptographically strong.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-11133::REFERENCE:CVE-2007-3528:DESCRIPTION:Blowfish-CBC implementation constructs an IV where each byte is calculated modulo 8 instead of modulo 256, resulting in less than 12 bits for the effective IV length, and less than 4096 possible IV values.:LINK:https://www.cve.org/CVERecord?id=CVE-2007-3528::
::Cryptography::
null
null
::20::97::
::TYPE:Maintenance:NOTE: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.::
null
1,204
Insufficient Granularity of Access Control
Base
Incomplete
The product implements access controls via a policy or other feature with the intention to disable or restrict accesses (reads and/or writes) to assets in a system from untrusted agents. However, implemented access controls lack required granularity, which renders the control policy too broad because it allows accesses from unauthorized agents to the security-sensitive assets.
Integrated circuits and hardware engines can expose accesses to assets (device configuration, keys, etc.) to trusted firmware or a software module (commonly set by BIOS/bootloader). This access is typically access-controlled. Upon a power reset, the hardware or system usually starts with default values in registers, and the trusted firmware (Boot firmware) configures the necessary access-control protection. A common weakness that can exist in such protection schemes is that access controls or policies are not granular enough. This condition allows agents beyond trusted agents to access assets and could lead to a loss of functionality or the ability to set up the device securely. This further results in security risks from leaked, sensitive, key material to modification of device configuration.
::NATURE:ChildOf:CWE ID:284:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Architecture and Design:NOTE:Such issues could be introduced during hardware architecture and design and identified later during Testing or System Configuration phases.::PHASE:Implementation:NOTE:Such issues could be introduced during hardware implementation and identified later during Testing or System Configuration phases.::
null
null
::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Access Control:IMPACT:Modify Memory:IMPACT:Read Memory:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Gain Privileges or Assume Identity:IMPACT:Bypass Protection Mechanism:IMPACT:Other:LIKELIHOOD:High::
null
::PHASE:Architecture and Design Implementation Testing:DESCRIPTION:Access-control-policy protections must be reviewed for design inconsistency and common weaknesses. Access-control-policy definition and programming flow must be tested in pre-silicon, post-silicon testing.:EFFECTIVENESS:High::
::REFERENCE:CVE-2022-24985:DESCRIPTION:A form hosting website only checks the session authentication status for a single form, making it possible to bypass authentication when there are multiple forms:LINK:https://www.cve.org/CVERecord?id=CVE-2022-24985::REFERENCE:CVE-2021-36934:DESCRIPTION:An operating system has an overly permission Access Control List onsome system files, including those related to user passwords:LINK:https://www.cve.org/CVERecord?id=CVE-2021-36934::
null
null
null
::1::180::
null
null
1,220
Exposure of Sensitive Information Through Metadata
Base
Incomplete
The product prevents direct access to a resource containing sensitive information, but it does not sufficiently limit access to metadata that is derived from the original, sensitive information.
Developers might correctly prevent unauthorized access to a database or other resource containing sensitive information, but they might not consider that portions of the original information might also be recorded in metadata, search indices, statistical reports, or other resources. If these resources are not also restricted, then attackers might be able to extract some or all of the original information, or otherwise infer some details. For example, an attacker could specify search terms that are known to be unique to a particular person, or view metadata such as activity or creation dates in order to identify usage patterns.
::NATURE:ChildOf:CWE ID:285:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::
null
null
::PHASE:Architecture and Design::
null
null
null
null
null
null
null
null
null
null
null
null
1,230
Incorrect Use of Autoboxing and Unboxing for Performance Critical Operations
Base
Incomplete
The code uses boxed primitives, which may introduce inefficiencies into performance-critical operations.
Languages such as Java and C# support automatic conversion through their respective compilers from primitive types into objects of the corresponding wrapper classes, and vice versa. For example, a compiler might convert an int to Integer (called autoboxing) or an Integer to int (called unboxing). This eliminates forcing the programmer to perform these conversions manually, which makes the code cleaner. However, this feature comes at a cost of performance and can lead to resource exhaustion and impact availability when used with generic collections. Therefore, they should not be used for scientific computing or other performance critical operations. They are only suited to support impedance mismatch between reference types and primitives.
::NATURE:ChildOf:CWE ID:400:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C#:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Implementation:NOTE:The programmer may use boxed primitives when not strictly necessary.::
null
null
::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):IMPACT:DoS: Resource Consumption (Memory):IMPACT:DoS: Resource Consumption (Other):IMPACT:Reduce Performance:LIKELIHOOD:Low:NOTE:Incorrect autoboxing/unboxing would result in reduced performance, which sometimes can lead to resource consumption issues.::
null
::PHASE:Implementation:DESCRIPTION:Use of boxed primitives should be limited to certain situations such as when calling methods with typed parameters. Examine the use of boxed primitives prior to use. Use SparseArrays or ArrayMap instead of HashMap to avoid performance overhead.::
null
null
null
::TAXONOMY NAME:SEI CERT Oracle Coding Standard for Java:ENTRY ID:EXP04-J:ENTRY NAME:Do not pass arguments to certain Java Collections Framework methods that are a different type than the collection parameter type::TAXONOMY NAME:ISA/IEC 62443:ENTRY ID:Part 4-1:ENTRY NAME:Req SI-2::
null
null
null
1,235
Improper Neutralization of Formula Elements in a CSV File
Base
Incomplete
The product saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by a spreadsheet product.
User-provided data is often saved to traditional databases. This data can be exported to a CSV file, which allows users to read the data using spreadsheet software such as Excel, Numbers, or Calc. This software interprets entries beginning with '=' as formulas, which are then executed by the spreadsheet software. The software's formula language often allows methods to access hyperlinks or the local command line, and frequently allows enough characters to invoke an entire script. Attackers can populate data fields which, when saved to a CSV file, may attempt information exfiltration or other malicious activity when automatically executed by the spreadsheet software.
::NATURE:ChildOf:CWE ID:74:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:74:VIEW ID:1003:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY NAME:Other:TECHNOLOGY PREVALENCE:Undetermined::
null
::TERM:CSV Injection::TERM:Formula Injection::TERM:Excel Macro Injection::
::PHASE:Implementation:NOTE:The weakness is in the implementation of a software's CSV export feature, in particular how it formats formula entries as the output gets flattened into a text file.::
null
null
::SCOPE:Confidentiality:IMPACT:Read Application Data:IMPACT:Execute Unauthorized Code or Commands:LIKELIHOOD:Low:NOTE:Current versions of Excel warn users of untrusted content.::
null
::PHASE:Implementation:DESCRIPTION:When generating CSV output, ensure that formula-sensitive metacharacters are effectively escaped or removed from all data before storage in the resultant CSV. Risky characters include '=' (equal), '+' (plus), '-' (minus), and '@' (at).:EFFECTIVENESS:Moderate::PHASE:Implementation:DESCRIPTION:If a field starts with a formula character, prepend it with a ' (single apostrophe), which prevents Excel from executing the formula.:EFFECTIVENESS:Moderate::PHASE:Architecture and Design:DESCRIPTION:Certain implementations of spreadsheet software might disallow formulas from executing if the file is untrusted, or if the file is not authored by the current user.:EFFECTIVENESS:Limited::
::REFERENCE:CVE-2019-12134:DESCRIPTION:Low privileged user can trigger CSV injection through a contact form field value:LINK:https://www.cve.org/CVERecord?id=CVE-2019-12134::REFERENCE:CVE-2019-4521:DESCRIPTION:Cloud management product allows arbitrary command execution via CSV injection:LINK:https://www.cve.org/CVERecord?id=CVE-2019-4521::REFERENCE:CVE-2019-17661:DESCRIPTION:CSV injection in content management system via formula code in a first or last name:LINK:https://www.cve.org/CVERecord?id=CVE-2019-17661::
null
null
null
null
null
null
1,236
Use of a Cryptographic Primitive with a Risky Implementation
Base
Draft
To fulfill the need for a cryptographic primitive, the product implements a cryptographic algorithm using a non-standard, unproven, or disallowed/non-compliant cryptographic implementation.
Cryptographic protocols and systems depend on cryptographic primitives (and associated algorithms) as their basic building blocks. Some common examples of primitives are digital signatures, one-way hash functions, ciphers, and public key cryptography; however, the notion of primitive can vary depending on point of view. See Terminology Notes for further explanation of some concepts. Cryptographic primitives are defined to accomplish one very specific task in a precisely defined and mathematically reliable fashion. For example, suppose that for a specific cryptographic primitive (such as an encryption routine), the consensus is that the primitive can only be broken after trying out N different inputs (where the larger the value of N, the stronger the cryptography). For an encryption scheme like AES-256, one would expect N to be so large as to be infeasible to execute in a reasonable amount of time. If a vulnerability is ever found that shows that one can break a cryptographic primitive in significantly less than the expected number of attempts, then that primitive is considered weakened (or sometimes in extreme cases, colloquially it is broken). As a result, anything using this cryptographic primitive would now be considered insecure or risky. Thus, even breaking or weakening a seemingly small cryptographic primitive has the potential to render the whole system vulnerable, due to its reliance on the primitive. A historical example can be found in TLS when using DES. One would colloquially call DES the cryptographic primitive for transport encryption in this version of TLS. In the past, DES was considered strong, because no weaknesses were found in it; importantly, DES has a key length of 56 bits. Trying N=2^56 keys was considered impractical for most actors. Unfortunately, attacking a system with 56-bit keys is now practical via brute force, which makes defeating DES encryption practical. It is now practical for an adversary to read any information sent under this version of TLS and use this information to attack the system. As a result, it can be claimed that this use of TLS is weak, and that any system depending on TLS with DES could potentially render the entire system vulnerable to attack. Cryptographic primitives and associated algorithms are only considered safe after extensive research and review from experienced cryptographers from academia, industry, and government entities looking for any possible flaws. Furthermore, cryptographic primitives and associated algorithms are frequently reevaluated for safety when new mathematical and attack techniques are discovered. As a result and over time, even well-known cryptographic primitives can lose their compliance status with the discovery of novel attacks that might either defeat the algorithm or reduce its robustness significantly. If ad-hoc cryptographic primitives are implemented, it is almost certain that the implementation will be vulnerable to attacks that are well understood by cryptographers, resulting in the exposure of sensitive information and other consequences. This weakness is even more difficult to manage for hardware-implemented deployment of cryptographic algorithms. First, because hardware is not patchable as easily as software, any flaw discovered after release and production typically cannot be fixed without a recall of the product. Secondly, the hardware product is often expected to work for years, during which time computation power available to the attacker only increases. Therefore, for hardware implementations of cryptographic primitives, it is absolutely essential that only strong, proven cryptographic primitives are used.
::NATURE:ChildOf:CWE ID:327:VIEW ID:1000:ORDINAL:Primary::
::ORDINALITY:Primary::
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY CLASS:System on Chip:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Architecture and Design:NOTE:This weakness is primarily introduced during the architecture and design phase as risky primitives are included.::PHASE:Implementation:NOTE:Even in cases where the Architectural phase properly specifies a cryptographically secure design, the design may be changed during implementation due to unforeseen constraints.::
null
null
::SCOPE:Confidentiality:IMPACT:Read Application Data:LIKELIHOOD:High:NOTE:Incorrect usage of crypto primitives could render the supposedly encrypted data as unencrypted plaintext in the worst case.::
::METHOD:Architecture or Design Review:DESCRIPTION:Review requirements, documentation, and product design to ensure that primitives are consistent with the strongest-available recommendations from trusted parties. If the product appears to be using custom or proprietary implementations that have not had sufficient public review and approval, then this is a significant concern.:EFFECTIVENESS:High::METHOD:Manual Analysis:DESCRIPTION:Analyze the product to ensure that implementations for each primitive do not contain any known vulnerabilities and are not using any known-weak algorithms, including MD4, MD5, SHA1, DES, etc.:EFFECTIVENESS:Moderate::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:For hardware, during the implementation (pre-Silicon / post-Silicon) phase, dynamic tests should be done to ensure that outputs from cryptographic routines are indeed working properly, such as test vectors provided by NIST [REF-1236].:EFFECTIVENESS:Moderate::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:It needs to be determined if the output of a cryptographic primitive is lacking entropy, which is one clear sign that something went wrong with the crypto implementation. There exist many methods of measuring the entropy of a bytestream, from sophisticated ones (like calculating Shannon's entropy of a sequence of characters) to crude ones (by compressing it and comparing the size of the original bytestream vs. the compressed - a truly random byte stream should not be compressible and hence the uncompressed and compressed bytestreams should be nearly identical in size).:EFFECTIVENESS:Moderate::
::PHASE:Requirements:DESCRIPTION:Require compliance with the strongest-available recommendations from trusted parties, and require that compliance must be kept up-to-date, since recommendations evolve over time. For example, US government systems require FIPS 140-3 certification, which supersedes FIPS 140-2 [REF-1192] [REF-1226].:EFFECTIVENESS:High::PHASE:Architecture and Design:DESCRIPTION:Ensure that the architecture/design uses the strongest-available primitives and algorithms from trusted parties. For example, US government systems require FIPS 140-3 certification, which supersedes FIPS 140-2 [REF-1192] [REF-1226].:EFFECTIVENESS:High::PHASE:Architecture and Design:DESCRIPTION:Do not develop custom or private cryptographic algorithms. They will likely be exposed to attacks that are well-understood by cryptographers. As with all cryptographic mechanisms, the source code should be available for analysis. If the algorithm may be compromised when attackers find out how it works, then it is especially weak.:EFFECTIVENESS:Discouraged Common Practice::PHASE:Architecture and Design:DESCRIPTION:Try not to use cryptographic algorithms in novel ways or with new modes of operation even when you know it is secure. For example, using SHA-2 chaining to create a 1-time pad for encryption might sound like a good idea, but one should not do this.:EFFECTIVENESS:Discouraged Common Practice::PHASE:Architecture and Design:DESCRIPTION:Ensure that the design can replace one cryptographic primitive or algorithm with another in the next generation (cryptographic agility). Where possible, use wrappers to make the interfaces uniform. This will make it easier to upgrade to stronger algorithms. This is especially important for hardware, which can be more difficult to upgrade quickly than software; design the hardware at a replaceable block level.:EFFECTIVENESS:Defense in Depth::PHASE:Architecture and Design:DESCRIPTION:Do not use outdated or non-compliant cryptography algorithms. Some older algorithms, once thought to require a billion years of computing time, can now be broken in days or hours. This includes MD4, MD5, SHA1, DES, and other algorithms that were once regarded as strong [REF-267].:EFFECTIVENESS:Discouraged Common Practice::PHASE:Architecture and Design Implementation:DESCRIPTION:Do not use a linear-feedback shift register (LFSR) or other legacy methods as a substitute for an accepted and standard Random Number Generator.:EFFECTIVENESS:Discouraged Common Practice::PHASE:Architecture and Design Implementation:DESCRIPTION:Do not use a checksum as a substitute for a cryptographically generated hash.:EFFECTIVENESS:Discouraged Common Practice::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use a vetted cryptographic library or framework. Industry-standard implementations will save development time and are more likely to avoid errors that can occur during implementation of cryptographic algorithms. However, the library/framework could be used incorrectly during implementation.:EFFECTIVENESS:High::PHASE:Architecture and Design Implementation:DESCRIPTION:When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive steps (CWE-325). These steps are often essential for the prevention of common attacks.:EFFECTIVENESS:Moderate::PHASE:Architecture and Design Implementation:DESCRIPTION:Do not store keys in areas accessible to untrusted agents. Carefully manage and protect the cryptographic keys (see CWE-320). If the keys can be guessed or stolen, then the strength of the cryptography algorithm is irrelevant.:EFFECTIVENESS:Moderate::
::REFERENCE:CVE-2020-4778:DESCRIPTION:software uses MD5, which is less safe than the default SHA-256 used by related products:LINK:https://www.cve.org/CVERecord?id=CVE-2020-4778::REFERENCE:CVE-2005-2946:DESCRIPTION:Default configuration of product uses MD5 instead of stronger algorithms that are available, simplifying forgery of certificates.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2946::REFERENCE:CVE-2019-3907:DESCRIPTION:identity card uses MD5 hash of a salt and password:LINK:https://www.cve.org/CVERecord?id=CVE-2019-3907::REFERENCE:CVE-2021-34687:DESCRIPTION:personal key is transmitted over the network using a substitution cipher:LINK:https://www.cve.org/CVERecord?id=CVE-2021-34687::REFERENCE:CVE-2020-14254:DESCRIPTION:product does not disable TLS-RSA cipher suites, allowing decryption of traffic if TLS 2.0 and secure ciphers are not enabled.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-14254::REFERENCE:CVE-2019-1543:DESCRIPTION:SSL/TLS library generates 16-byte nonces but reduces them to 12 byte nonces for the ChaCha20-Poly1305 cipher, converting them in a way that violates the cipher's requirements for unique nonces.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-1543::REFERENCE:CVE-2017-9267:DESCRIPTION:LDAP interface allows use of weak ciphers:LINK:https://www.cve.org/CVERecord?id=CVE-2017-9267::REFERENCE:CVE-2017-7971:DESCRIPTION:SCADA product allows use of outdated cipher suites:LINK:https://www.cve.org/CVERecord?id=CVE-2017-7971::REFERENCE:CVE-2020-6616:DESCRIPTION:Chip implementing Bluetooth uses a low-entropy PRNG instead of a hardware RNG, allowing spoofing.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-6616::REFERENCE:CVE-2019-1715:DESCRIPTION:security product has insufficient entropy in the DRBG, allowing collisions and private key discovery:LINK:https://www.cve.org/CVERecord?id=CVE-2019-1715::REFERENCE:CVE-2014-4192:DESCRIPTION:Dual_EC_DRBG implementation in RSA toolkit does not correctly handle certain byte requests, simplifying plaintext recovery:LINK:https://www.cve.org/CVERecord?id=CVE-2014-4192::REFERENCE:CVE-2007-6755:DESCRIPTION:Recommendation for Dual_EC_DRBG algorithm contains point Q constants that could simplify decryption:LINK:https://www.cve.org/CVERecord?id=CVE-2007-6755::
null
null
null
::97::
::TYPE:Terminology:NOTE:Terminology for cryptography varies widely, from informal and colloquial to mathematically-defined, with different precision and formalism depending on whether the stakeholder is a developer, cryptologist, etc. Yet there is a need for CWE to be self-consistent while remaining understandable and acceptable to multiple audiences. As of CWE 4.6, CWE terminology around primitives and algorithms is emerging as shown by the following example, subject to future consultation and agreement within the CWE and cryptography communities. Suppose one wishes to send encrypted data using a CLI tool such as OpenSSL. One might choose to use AES with a 256-bit key and require tamper protection (GCM mode, for instance). For compatibility's sake, one might also choose the ciphertext to be formatted to the PKCS#5 standard. In this case, the cryptographic system would be AES-256-GCM with PKCS#5 formatting. The cryptographic function would be AES-256 in the GCM mode of operation, and the algorithm would be AES. Colloquially, one would say that AES (and sometimes AES-256) is the cryptographic primitive, because it is the algorithm that realizes the concept of symmetric encryption (without modes of operation or other protocol related modifications). In practice, developers and architects typically refer to base cryptographic algorithms (AES, SHA, etc.) as cryptographic primitives.::TYPE:Maintenance:NOTE:Since CWE 4.4, various cryptography-related entries, including CWE-327 and CWE-1240, have been slated for extensive research, analysis, and community consultation to define consistent terminology, improve relationships, and reduce overlap or duplication. As of CWE 4.6, this work is still ongoing.::
null
1,240
Use of Predictable Algorithm in Random Number Generator
Base
Draft
The device uses an algorithm that is predictable and generates a pseudo-random number.
Pseudo-random number generator algorithms are predictable because their registers have a finite number of possible states, which eventually lead to repeating patterns. As a result, pseudo-random number generators (PRNGs) can compromise their randomness or expose their internal state to various attacks, such as reverse engineering or tampering. It is highly recommended to use hardware-based true random number generators (TRNGs) to ensure the security of encryption schemes. TRNGs generate unpredictable, unbiased, and independent random numbers because they employ physical phenomena, e.g., electrical noise, as sources to generate random numbers.
::NATURE:ChildOf:CWE ID:330:VIEW ID:1000:ORDINAL:Primary::
null
::TECHNOLOGY CLASS:System on Chip:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Architecture and Design::PHASE:Implementation:NOTE:In many cases, the design originally defines a cryptographically secure random number generator, but is then changed during implementation due to unforeseen constraints.::
null
null
::SCOPE:Confidentiality:IMPACT:Read Application Data:LIKELIHOOD:High::
null
::PHASE:Architecture and Design:DESCRIPTION:A true random number generator should be specified for cryptographic algorithms.::PHASE:Implementation:DESCRIPTION:A true random number generator should be implemented for cryptographic algorithms.::
::REFERENCE:CVE-2021-3692:DESCRIPTION:PHP framework uses mt_rand() function (Marsenne Twister) when generating tokens:LINK:https://www.cve.org/CVERecord?id=CVE-2021-3692::
null
null
null
::97::
::TYPE:Maintenance:NOTE: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.::
null
1,241
Unintended Reentrant Invocation of Non-reentrant Code Via Nested Calls
Base
Draft
During execution of non-reentrant code, the product performs a call that unintentionally produces a nested invocation of the non-reentrant code.
In a complex product, a single function call may lead to many different possible code paths, some of which may involve deeply nested calls. It may be difficult to foresee all possible code paths that could emanate from a given function call. In some systems, an external actor can manipulate inputs to the system and thereby achieve a wide range of possible control flows. This is frequently a concern in products that execute scripts from untrusted sources. Examples of such products are web browsers and PDF readers. A weakness is present when one of the possible code paths resulting from a function call alters program state that the original caller assumes to be unchanged during the call.
::NATURE:ChildOf:CWE ID:691:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:663:VIEW ID:1000::NATURE:CanPrecede:CWE ID:416:VIEW ID:1000::
::ORDINALITY:Primary::
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
null
null
null
null
null
::SCOPE:Integrity:IMPACT:Unexpected State:LIKELIHOOD:Unknown:NOTE:Exploitation of this weakness can leave the application in an unexpected state and cause variables to be reassigned before the first invocation has completed. This may eventually result in memory corruption or unexpected code execution.::
null
::PHASE:Architecture and Design:DESCRIPTION:When architecting a system that will execute untrusted code in response to events, consider executing the untrusted event handlers asynchronously (asynchronous message passing) as opposed to executing them synchronously at the time each event fires. The untrusted code should execute at the start of the next iteration of the thread's message loop. In this way, calls into non-reentrant code are strictly serialized, so that each operation completes fully before the next operation begins. Special attention must be paid to all places where type coercion may result in script execution. Performing all needed coercions at the very beginning of an operation can help reduce the chance of operations executing at unexpected junctures.:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:Make sure the code (e.g., function or class) in question is reentrant by not leveraging non-local data, not modifying its own code, and not calling other non-reentrant code.:EFFECTIVENESS:High::
::REFERENCE:CVE-2014-1772:DESCRIPTION:In this vulnerability, by registering a malicious onerror handler, an adversary can produce unexpected re-entrance of a CDOMRange object. [REF-1098]:LINK:https://www.cve.org/CVERecord?id=CVE-2014-1772::REFERENCE:CVE-2018-8174:DESCRIPTION:This CVE covers several vulnerable scenarios enabled by abuse of the Class_Terminate feature in Microsoft VBScript. In one scenario, Class_Terminate is used to produce an undesirable re-entrance of ScriptingDictionary during execution of that object's destructor. In another scenario, a vulnerable condition results from a recursive entrance of a property setter method. This recursive invocation produces a second, spurious call to the Release method of a reference-counted object, causing a UAF when that object is freed prematurely. This vulnerability pattern has been popularized as Double Kill. [REF-1099]:LINK:https://www.cve.org/CVERecord?id=CVE-2018-8174::
null
null
null
::74::
null
null
1,265
Improper Validation of Specified Quantity in Input
Base
Incomplete
The product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.
Specified quantities include size, length, frequency, price, rate, number of operations, time, and others. Code may rely on specified quantities to allocate resources, perform calculations, control iteration, etc. When the quantity is not properly validated, then attackers can specify malicious quantities to cause excessive resource allocation, trigger unexpected failures, enable buffer overflows, etc.
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:20:VIEW ID:1003:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:789:VIEW ID:1000::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Often::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Other:IMPACT:Varies by Context:NOTE:Since quantities are used so often to affect resource allocation or process financial data, they are often present in many places in the code.::
null
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.:EFFECTIVENESS:High::
::REFERENCE:CVE-2022-21668:DESCRIPTION:Chain: Python library does not limit the resources used to process images that specify a very large number of bands (CWE-1284), leading to excessive memory consumption (CWE-789) or an integer overflow (CWE-190).:LINK:https://www.cve.org/CVERecord?id=CVE-2022-21668::REFERENCE:CVE-2008-1440:DESCRIPTION:lack of validation of length field leads to infinite loop:LINK:https://www.cve.org/CVERecord?id=CVE-2008-1440::REFERENCE:CVE-2008-2374:DESCRIPTION:lack of validation of string length fields allows memory consumption or buffer over-read:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2374::
null
null
null
null
::TYPE:Maintenance:NOTE:This entry is still under development and will continue to see updates and content improvements.::
null
1,284
Improper Validation of Specified Index, Position, or Offset in Input
Base
Incomplete
The product receives input that is expected to specify an index, position, or offset into an indexable resource such as a buffer or file, but it does not validate or incorrectly validates that the specified index/position/offset has the required properties.
Often, indexable resources such as memory buffers or files can be accessed using a specific position, index, or offset, such as an index for an array or a position for a file. When untrusted input is not properly validated before it is used as an index, attackers could access (or attempt to access) unauthorized portions of these resources. This could be used to cause buffer overflows, excessive resource allocation, or trigger unexpected failures.
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Often::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Other:IMPACT:Varies by Context::
null
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.:EFFECTIVENESS:High::
::REFERENCE:CVE-2005-0369:DESCRIPTION:large ID in packet used as array index:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0369::REFERENCE:CVE-2001-1009:DESCRIPTION:negative array index as argument to POP LIST command:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1009::
null
null
null
null
::TYPE:Maintenance:NOTE:This entry is still under development and will continue to see updates and content improvements.::
null
1,285
Improper Validation of Syntactic Correctness of Input
Base
Incomplete
The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax.
Often, complex inputs are expected to follow a particular syntax, which is either assumed by the input itself, or declared within metadata such as headers. The syntax could be for data exchange formats, markup languages, or even programming languages. When untrusted input is not properly validated for the expected syntax, attackers could cause parsing failures, trigger unexpected errors, or expose latent vulnerabilities that might not be directly exploitable if the input had conformed to the syntax.
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Often::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Other:IMPACT:Varies by Context::
null
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.:EFFECTIVENESS:High::
::REFERENCE:CVE-2016-4029:DESCRIPTION:Chain: incorrect validation of intended decimal-based IP address format (CWE-1286) enables parsing of octal or hexadecimal formats (CWE-1389), allowing bypass of an SSRF protection mechanism (CWE-918).:LINK:https://www.cve.org/CVERecord?id=CVE-2016-4029::REFERENCE:CVE-2007-5893:DESCRIPTION:HTTP request with missing protocol version number leads to crash:LINK:https://www.cve.org/CVERecord?id=CVE-2007-5893::
null
null
null
::66::676::
::TYPE:Maintenance:NOTE:This entry is still under development and will continue to see updates and content improvements.::
null
1,286
Improper Validation of Specified Type of Input
Base
Incomplete
The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type.
When input does not comply with the expected type, attackers could trigger unexpected errors, cause incorrect actions to take place, or exploit latent vulnerabilities that would not be possible if the input conformed with the expected type. This weakness can appear in type-unsafe programming languages, or in programming languages that support casting or conversion of an input to another type.
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:843:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Often::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Other:IMPACT:Varies by Context::
null
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.:EFFECTIVENESS:High::
::REFERENCE:CVE-2008-2223:DESCRIPTION:SQL injection through an ID that was supposed to be numeric.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2223::
null
null
null
null
::TYPE:Maintenance:NOTE:This entry is still under development and will continue to see updates and content improvements.::
null
1,287
Improper Validation of Consistency within Input
Base
Incomplete
The product receives a complex input with multiple elements or fields that must be consistent with each other, but it does not validate or incorrectly validates that the input is actually consistent.
Some input data can be structured with multiple elements or fields that must be consistent with each other, e.g. a number-of-items field that is followed by the expected number of elements. When such complex inputs are inconsistent, attackers could trigger unexpected errors, cause incorrect actions to take place, or exploit latent vulnerabilities.
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Often::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Other:IMPACT:Varies by Context::
null
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.:EFFECTIVENESS:High::
::REFERENCE:CVE-2018-16733:DESCRIPTION:product does not validate that the start block appears before the end block:LINK:https://www.cve.org/CVERecord?id=CVE-2018-16733::REFERENCE:CVE-2006-3790:DESCRIPTION:size field that is inconsistent with packet size leads to buffer over-read:LINK:https://www.cve.org/CVERecord?id=CVE-2006-3790::REFERENCE:CVE-2008-4114:DESCRIPTION:system crash with offset value that is inconsistent with packet size:LINK:https://www.cve.org/CVERecord?id=CVE-2008-4114::
null
null
null
null
::TYPE:Maintenance:NOTE:This entry is still under development and will continue to see updates and content improvements.::
null
1,288
Improper Validation of Unsafe Equivalence in Input
Base
Incomplete
The product receives an input value that is used as a resource identifier or other type of reference, but it does not validate or incorrectly validates that the input is equivalent to a potentially-unsafe value.
Attackers can sometimes bypass input validation schemes by finding inputs that appear to be safe, but will be dangerous when processed at a lower layer or by a downstream component. For example, a simple XSS protection mechanism might try to validate that an input has no <script> tags using case-sensitive matching, but since HTML is case-insensitive when processed by web browsers, an attacker could inject <ScrIpT> and trigger XSS.
::NATURE:ChildOf:CWE ID:20:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:41:VIEW ID:1000::NATURE:PeerOf:CWE ID:178:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Often::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Other:IMPACT:Varies by Context::
null
::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.:EFFECTIVENESS:High::
::REFERENCE:CVE-2021-39155:DESCRIPTION:Chain: A microservice integration and management platform compares the hostname in the HTTP Host header in a case-sensitive way (CWE-178, CWE-1289), allowing bypass of the authorization policy (CWE-863) using a hostname with mixed case or other variations.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-39155::REFERENCE:CVE-2020-11053:DESCRIPTION:Chain: Go-based Oauth2 reverse proxy can send the authenticated user to another site at the end of the authentication flow. A redirect URL with HTML-encoded whitespace characters can bypass the validation (CWE-1289) to redirect to a malicious site (CWE-601):LINK:https://www.cve.org/CVERecord?id=CVE-2020-11053::REFERENCE:CVE-2005-0269:DESCRIPTION:File extension check in forum software only verifies extensions that contain all lowercase letters, which allows remote attackers to upload arbitrary files via file extensions that include uppercase letters.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-0269::REFERENCE:CVE-2001-1238:DESCRIPTION:Task Manager does not allow local users to end processes with uppercase letters named (1) winlogon.exe, (2) csrss.exe, (3) smss.exe and (4) services.exe via the Process tab which could allow local users to install Trojan horses that cannot be stopped.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1238::REFERENCE:CVE-2004-2214:DESCRIPTION:HTTP server allows bypass of access restrictions using URIs with mixed case.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2214::
null
null
null
null
::TYPE:Maintenance:NOTE:This entry is still under development and will continue to see updates and content improvements.::
null
1,289
Use of Blocking Code in Single-threaded, Non-blocking Context
Base
Incomplete
The product uses a non-blocking model that relies on a single threaded process for features such as scalability, but it contains code that can block when it is invoked.
When an attacker can directly invoke the blocking code, or the blocking code can be affected by environmental conditions that can be influenced by an attacker, then this can lead to a denial of service by causing unexpected hang or freeze of the code. Examples of blocking code might be an expensive computation or calling blocking library calls, such as those that perform exclusive file operations or require a successful network operation. Due to limitations in multi-thread models, single-threaded models are used to overcome the resource constraints that are caused by using many threads. In such a model, all code should generally be non-blocking. If blocking code is called, then the event loop will effectively be stopped, which can be undesirable or dangerous. Such models are used in Python asyncio, Vert.x, and Node.js, or other custom event loop code.
::NATURE:ChildOf:CWE ID:834:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:835:VIEW ID:1000:ORDINAL:Primary::
null
null
null
null
::PHASE:Implementation::
null
null
::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):NOTE:An unexpected call to blocking code can trigger an infinite loop, or a large loop that causes the software to pause and wait indefinitely.::
null
::PHASE:Implementation:DESCRIPTION:Generally speaking, blocking calls should be replaced with non-blocking alternatives that can be used asynchronously. Expensive computations should be passed off to worker threads, although the correct approach depends on the framework being used.::PHASE:Implementation:DESCRIPTION:For expensive computations, consider breaking them up into multiple smaller computations. Refer to the documentation of the framework being used for guidance.::
null
null
null
null
::25::
null
null
1,322
Binding to an Unrestricted IP Address
Base
Incomplete
The product assigns the address 0.0.0.0 for a database server, a cloud service/instance, or any computing resource that communicates remotely.
When a server binds to the address 0.0.0.0, it allows connections from every IP address on the local machine, effectively exposing the server to every possible network. This might be much broader access than intended by the developer or administrator, who might only be expecting the server to be reachable from a single interface/network.
::NATURE:ChildOf:CWE ID:668:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE NAME:Other:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY NAME:Web Server:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:Client Server:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:Cloud Computing:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:System Configuration::
null
null
::SCOPE:Availability:IMPACT:DoS: Amplification:LIKELIHOOD:High::
null
::PHASE:System Configuration:DESCRIPTION:Assign IP addresses that are not 0.0.0.0.:EFFECTIVENESS:High::PHASE:System Configuration:STRATEGY:Firewall:DESCRIPTION:Unwanted connections to the configured server may be denied through a firewall or other packet filtering measures.:EFFECTIVENESS:High::
::REFERENCE:CVE-2022-21947:DESCRIPTION:Desktop manager for Kubernetes and container management binds a service to 0.0.0.0, allowing users on the network to make requests to a dashboard API.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-21947::
null
null
null
::1::
null
null
1,327
Inefficient Regular Expression Complexity
Base
Draft
The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles.
Some regular expression engines have a feature called backtracking. If the token cannot match, the engine backtracks to a position that may result in a different token that can match. Backtracking becomes a weakness if all of these conditions are met: The number of possible backtracking attempts are exponential relative to the length of the input. The input can fail to match the regular expression. The input can be long enough. Attackers can create crafted inputs that intentionally cause the regular expression to use excessive backtracking in a way that causes the CPU consumption to spike.
::NATURE:ChildOf:CWE ID:407:VIEW ID:1000:ORDINAL:Primary::NATURE:ChildOf:CWE ID:407:VIEW ID:1003:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::
null
::TERM:ReDoS:DESCRIPTION:ReDoS is an abbreviation of Regular expression Denial of Service.::TERM:Regular Expression Denial of Service:DESCRIPTION:While this term is attack-focused, this is commonly used to describe the weakness.::TERM:Catastrophic backtracking:DESCRIPTION:This term is used to describe the behavior of the regular expression as a negative technical impact.::
::PHASE:Implementation:NOTE:A RegEx can be easy to create and read using unbounded matching characters, but the programmer might not consider the risk of excessive backtracking.::
null
null
::SCOPE:Availability:IMPACT:DoS: Resource Consumption (CPU):LIKELIHOOD:High::
null
::PHASE:Architecture and Design:DESCRIPTION:Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.:EFFECTIVENESS:High::PHASE:System Configuration:DESCRIPTION:Set backtracking limits in the configuration of the regular expression implementation, such as PHP's pcre.backtrack_limit. Also consider limits on execution time for the process.:EFFECTIVENESS:Moderate::PHASE:Implementation:DESCRIPTION:Do not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.:EFFECTIVENESS:High::PHASE:Implementation:DESCRIPTION:Limit the length of the input that the regular expression will process.:EFFECTIVENESS:Moderate::
::REFERENCE:CVE-2020-5243:DESCRIPTION:server allows ReDOS with crafted User-Agent strings, due to overlapping capture groups that cause excessive backtracking.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-5243::REFERENCE:CVE-2021-21317:DESCRIPTION:npm package for user-agent parser prone to ReDoS due to overlapping capture groups:LINK:https://www.cve.org/CVERecord?id=CVE-2021-21317::REFERENCE:CVE-2019-16215:DESCRIPTION:Markdown parser uses inefficient regex when processing a message, allowing users to cause CPU consumption and delay preventing processing of other messages.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-16215::REFERENCE:CVE-2019-6785:DESCRIPTION:Long string in a version control product allows DoS due to an inefficient regex.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-6785::REFERENCE:CVE-2019-12041:DESCRIPTION:Javascript code allows ReDoS via a long string due to excessive backtracking.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-12041::REFERENCE:CVE-2015-8315:DESCRIPTION:ReDoS when parsing time.:LINK:https://www.cve.org/CVERecord?id=CVE-2015-8315::REFERENCE:CVE-2015-8854:DESCRIPTION:ReDoS when parsing documents.:LINK:https://www.cve.org/CVERecord?id=CVE-2015-8854::REFERENCE:CVE-2017-16021:DESCRIPTION:ReDoS when validating URL.:LINK:https://www.cve.org/CVERecord?id=CVE-2017-16021::
null
null
null
::492::
null
null
1,333
Incorrect Bitwise Shift of Integer
Base
Draft
An integer value is specified to be shifted by a negative amount or an amount greater than or equal to the number of bits contained in the value causing an unexpected or indeterminate result.
Specifying a value to be shifted by a negative amount is undefined in various languages. Various computer architectures implement this action in different ways. The compilers and interpreters when generating code to accomplish a shift generally do not do a check for this issue. Specifying an over-shift, a shift greater than or equal to the number of bits contained in a value to be shifted, produces a result which varies by architecture and compiler. In some languages, this action is specifically listed as producing an undefined result.
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C#:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:JavaScript:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Implementation:NOTE:Adding shifts without properly verifying the size and sign of the shift amount.::
null
null
::SCOPE:Integrity:IMPACT:DoS: Crash, Exit, or Restart::
null
::PHASE:Implementation:DESCRIPTION:Implicitly or explicitly add checks and mitigation for negative or over-shift values.::
::REFERENCE:CVE-2009-4307:DESCRIPTION:An unexpected large value in the ext4 filesystem causes an overshift condition resulting in a divide by zero.:LINK:https://www.cve.org/CVERecord?id=CVE-2009-4307::REFERENCE:CVE-2012-2100:DESCRIPTION:An unexpected large value in the ext4 filesystem causes an overshift condition resulting in a divide by zero - fix of CVE-2009-4307.:LINK:https://www.cve.org/CVERecord?id=CVE-2012-2100::REFERENCE:CVE-2020-8835:DESCRIPTION:An overshift in a kernel allowed out of bounds reads and writes resulting in a root takeover.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-8835::REFERENCE:CVE-2015-1607:DESCRIPTION:Program is not properly handling signed bitwise left-shifts causing an overlapping memcpy memory range error.:LINK:https://www.cve.org/CVERecord?id=CVE-2015-1607::REFERENCE:CVE-2016-9842:DESCRIPTION:Compression function improperly executes a signed left shift of a negative integer.:LINK:https://www.cve.org/CVERecord?id=CVE-2016-9842::REFERENCE:CVE-2018-18445:DESCRIPTION:Some kernels improperly handle right shifts of 32 bit numbers in a 64 bit register.:LINK:https://www.cve.org/CVERecord?id=CVE-2018-18445::REFERENCE:CVE-2013-4206:DESCRIPTION:Putty has an incorrectly sized shift value resulting in an overshift.:LINK:https://www.cve.org/CVERecord?id=CVE-2013-4206::REFERENCE:CVE-2018-20788:DESCRIPTION:LED driver overshifts under certain conditions resulting in a DoS.:LINK:https://www.cve.org/CVERecord?id=CVE-2018-20788::
null
null
null
null
null
null
1,335
Insufficient Precision or Accuracy of a Real Number
Base
Draft
The product processes a real number with an implementation in which the number's representation does not preserve required accuracy and precision in its fractional part, causing an incorrect result.
When a security decision or calculation requires highly precise, accurate numbers such as financial calculations or prices, then small variations in the number could be exploited by an attacker. There are multiple ways to store the fractional part of a real number in a computer. In all of these cases, there is a limit to the accuracy of recording a fraction. If the fraction can be represented in a fixed number of digits (binary or decimal), there might not be enough digits assigned to represent the number. In other cases the number cannot be represented in a fixed number of digits due to repeating in decimal or binary notation (e.g. 0.333333...) or due to a transcendental number such as Π or √2. Rounding of numbers can lead to situations where the computer results do not adequately match the result of sufficiently accurate math.
::NATURE:ChildOf:CWE ID:682:VIEW ID:1000:ORDINAL:Primary::NATURE:PeerOf:CWE ID:190:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:834:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:119:VIEW ID:1000::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
::There are three major ways to store real numbers in computers. Each method is described along with the limitations of how they store their numbers. Fixed: Some implementations use a fixed number of binary bits to represent both the integer and the fraction. In the demonstrative example about Muller's Recurrence, the fraction 108.0 - ((815.0 - 1500.0 / z) / y) cannot be represented in 8 binary digits. The numeric accuracy within languages such as PL/1, COBOL and Ada is expressed in decimal digits rather than binary digits. In SQL and most databases, the length of the integer and the fraction are specified by the programmer in decimal. In the language C, fixed reals are implemented according to ISO/IEC TR18037 Floating: The number is stored in a version of scientific notation with a fixed length for the base and the significand. This allows flexibility for more accuracy when the integer portion is smaller. When dealing with large integers, the fractional accuracy is less. Languages such as PL/1, COBOL and Ada set the accuracy by decimal digit representation rather than using binary digits. Python also implements decimal floating-point numbers using the IEEE 754-2008 encoding method. Ratio: The number is stored as the ratio of two integers. These integers also have their limits. These integers can be stored in a fixed number of bits or in a vector of digits. While the vector of digits method provides for very large integers, they cannot truly represent a repeating or transcendental number as those numbers do not ever have a fixed length.::
null
::PHASE:Implementation:NOTE:This weakness is introduced when the developer picks a method to represent a real number. The weakness may only be visible with very specific numeric inputs.::
null
null
::SCOPE:Availability:IMPACT:DoS: Crash, Exit, or Restart:NOTE:This weakness will generally lead to undefined results and therefore crashes. In some implementations the program will halt if the weakness causes an overflow during a calculation.::SCOPE:Integrity:IMPACT:Execute Unauthorized Code or Commands:NOTE:The results of the math are not as expected. This could cause issues where a value would not be properly calculated and provide an incorrect answer.::SCOPE:Confidentiality:SCOPE:Availability:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Modify Application Data:NOTE:This weakness can sometimes trigger buffer overflows which can be used to execute arbitrary code. This is usually outside the scope of a product's implicit security policy.::
null
::PHASE:Implementation Patching and Maintenance:DESCRIPTION:The developer or maintainer can move to a more accurate representation of real numbers. In extreme cases, the programmer can move to representations such as ratios of BigInts which can represent real numbers to extremely fine precision. The programmer can also use the concept of an Unum real. The memory and CPU tradeoffs of this change must be examined. Since floating point reals are used in many products and many locations, they are implemented in hardware and most format changes will cause the calculations to be moved into software resulting in slower products.::
::REFERENCE:CVE-2018-16069:DESCRIPTION:Chain: series of floating-point precision errors (CWE-1339) in a web browser rendering engine causes out-of-bounds read (CWE-125), giving access to cross-origin data:LINK:https://www.cve.org/CVERecord?id=CVE-2018-16069::REFERENCE:CVE-2017-7619:DESCRIPTION:Chain: rounding error in floating-point calculations (CWE-1339) in image processor leads to infinite loop (CWE-835):LINK:https://www.cve.org/CVERecord?id=CVE-2017-7619::REFERENCE:CVE-2021-29529:DESCRIPTION:Chain: machine-learning product can have a heap-based buffer overflow (CWE-122) when some integer-oriented bounds are calculated by using ceiling() and floor() on floating point values (CWE-1339):LINK:https://www.cve.org/CVERecord?id=CVE-2021-29529::REFERENCE:CVE-2008-2108:DESCRIPTION:Chain: insufficient precision (CWE-1339) in random-number generator causes some zero bits to be reliably generated, reducing the amount of entropy (CWE-331):LINK:https://www.cve.org/CVERecord?id=CVE-2008-2108::REFERENCE:CVE-2006-6499:DESCRIPTION:Chain: web browser crashes due to infinite loop - bad looping logic [that relies on] floating point math [CWE-1339] to exit the loop [CWE-835]:LINK:https://www.cve.org/CVERecord?id=CVE-2006-6499::
null
null
null
null
null
null
1,339
Multiple Releases of Same Resource or Handle
Base
Incomplete
The product attempts to close or release a resource or handle more than once, without any successful open between the close operations.
Code typically requires opening handles or references to resources such as memory, files, devices, socket connections, services, etc. When the code is finished with using the resource, it is typically expected to close or release the resource, which indicates to the environment (such as the OS) that the resource can be re-assigned or reused by unrelated processes or actors - or in some cases, within the same process. API functions or other abstractions are often used to perform this release, such as free() or delete() within C/C++, or file-handle close() operations that are used in many languages. Unfortunately, the implementation or design of such APIs might expect the developer to be responsible for ensuring that such APIs are only called once per release of the resource. If the developer attempts to release the same resource/handle more than once, then the API's expectations are not met, resulting in undefined and/or insecure behavior. This could lead to consequences such as memory corruption, data corruption, execution path corruption, or other consequences. Note that while the implementation for most (if not all) resource reservation allocations involve a unique identifier/pointer/symbolic reference, then if this identifier is reused, checking the identifier for resource closure may result in a false state of openness and closing of the wrong resource. For this reason, reuse of identifiers is discouraged.
::NATURE:ChildOf:CWE ID:675:VIEW ID:1000:ORDINAL:Primary::NATURE:CanPrecede:CWE ID:672:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE NAME:Java:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:Rust:LANGUAGE PREVALENCE:Undetermined::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C:LANGUAGE PREVALENCE:Undetermined::LANGUAGE NAME:C++:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Implementation::
null
null
::SCOPE:Availability:SCOPE:Integrity:IMPACT:DoS: Crash, Exit, or Restart:LIKELIHOOD:Medium::
::METHOD:Automated Static Analysis:DESCRIPTION:For commonly-used APIs and resource types, automated tools often have signatures that can spot this issue.::METHOD:Automated Dynamic Analysis:DESCRIPTION:Some compiler instrumentation tools such as AddressSanitizer (ASan) can indirectly detect some instances of this weakness.::
::PHASE:Implementation:DESCRIPTION:Change the code's logic so that the resource is only closed once. This might require simplifying or refactoring. This fix can be simple to do in small code blocks, but more difficult when multiple closes are buried within complex conditionals.::PHASE:Implementation:STRATEGY:Refactoring:DESCRIPTION:It can be effective to implement a flag that is (1) set when the resource is opened, (2) cleared when it is closed, and (3) checked before closing. This approach can be useful when there are disparate cases in which closes must be performed. However, flag-tracking can increase code complexity and requires diligent compliance by the programmer.::PHASE:Implementation:STRATEGY:Refactoring:DESCRIPTION:When closing a resource, set the resource's associated variable to NULL or equivalent value for the given language. Some APIs will ignore this null value without causing errors. For other APIs, this can lead to application crashes or exceptions, which may still be preferable to corrupting an unintended resource such as memory or data.:EFFECTIVENESS:Defense in Depth::
::REFERENCE:CVE-2019-13351:DESCRIPTION:file descriptor double close can cause the wrong file to be associated with a file descriptor.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-13351::REFERENCE:CVE-2006-5051:DESCRIPTION:Chain: Signal handler contains too much functionality (CWE-828), introducing a race condition that leads to a double free (CWE-415).:LINK:https://www.cve.org/CVERecord?id=CVE-2006-5051::REFERENCE:CVE-2004-0772:DESCRIPTION:Double free resultant from certain error conditions.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0772::
null
null
null
null
::TYPE:Terminology:NOTE:The terms related to release may vary depending on the type of resource, programming language, specification, or framework. Close has been used synonymously for the release of resources like file descriptors and file handles. Return is sometimes used instead of Release. Free is typically used when releasing memory or buffers back into the system for reuse.::
null
1,341
Incorrect Parsing of Numbers with Different Radices
Base
Incomplete
The product parses numeric input assuming base 10 (decimal) values, but it does not account for inputs that use a different base number (radix).
Frequently, a numeric input that begins with 0 is treated as octal, or 0x causes it to be treated as hexadecimal, e.g. by the inet_addr() function. For example, 023 (octal) is 35 decimal, or 0x31 is 49 decimal. Other bases may be used as well. If the developer assumes decimal-only inputs, the code could produce incorrect numbers when the inputs are parsed using a different base. This can result in unexpected and/or dangerous behavior. For example, a 0127.0.0.1 IP address is parsed as octal due to the leading 0, whose numeric value would be the same as 87.0.0.1 (decimal), where the developer likely expected to use 127.0.0.1. The consequences vary depending on the surrounding code in which this weakness occurs, but they can include bypassing network-based access control using unexpected IP addresses or netmasks, or causing apparently-symbolic identifiers to be processed as if they are numbers. In web applications, this can enable bypassing of SSRF restrictions.
::NATURE:ChildOf:CWE ID:704:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Implementation:NOTE:Input validation used may assume decimal bases during conditional checks, when it may not always be the case.::PHASE:Implementation:NOTE:The application may rely on a service that supports different numerical bases.::
null
null
::SCOPE:Confidentiality:IMPACT:Read Application Data:LIKELIHOOD:Unknown:NOTE:An attacker may use an unexpected numerical base to access private application resources.::SCOPE:Integrity:IMPACT:Bypass Protection Mechanism:IMPACT:Alter Execution Logic:LIKELIHOOD:Unknown:NOTE:An attacker may use an unexpected numerical base to bypass or manipulate access control mechanisms.::
null
::PHASE:Implementation:STRATEGY:Enforcement by Conversion:DESCRIPTION:If only decimal-based values are expected in the application, conditional checks should be created in a way that prevent octal or hexadecimal strings from being checked. This can be achieved by converting any numerical string to an explicit base-10 integer prior to the conditional check, to prevent octal or hex values from ever being checked against the condition.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:If various numerical bases do need to be supported, check for leading values indicating the non-decimal base you wish to support (such as 0x for hex) and convert the numeric strings to integers of the respective base. Reject any other alternative-base string that is not intentionally supported by the application.::PHASE:Implementation:STRATEGY:Input Validation:DESCRIPTION:If regular expressions are used to validate IP addresses, ensure that they are bounded using ^ and $ to prevent base-prepended IP addresses from being matched.::
::REFERENCE:CVE-2021-29662:DESCRIPTION:Chain: Use of zero-prepended IP addresses in Perl-based IP validation module can lead to an access control bypass.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-29662::REFERENCE:CVE-2021-28918:DESCRIPTION:Chain: Use of zero-prepended IP addresses in a product that manages IP blocks can lead to an SSRF.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-28918::REFERENCE:CVE-2021-29921:DESCRIPTION:Chain: Use of zero-prepended IP addresses in a Python standard library package can lead to an SSRF.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-29921::REFERENCE:CVE-2021-29923:DESCRIPTION:Chain: Use of zero-prepended IP addresses in the net Golang library can lead to an access control bypass.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-29923::REFERENCE:CVE-2021-29424:DESCRIPTION:Chain: Use of zero-prepended IP addresses in Perl netmask module allows bypass of IP-based access control.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-29424::REFERENCE:CVE-2016-4029:DESCRIPTION:Chain: incorrect validation of intended decimal-based IP address format (CWE-1286) enables parsing of octal or hexadecimal formats (CWE-1389), allowing bypass of an SSRF protection mechanism (CWE-918).:LINK:https://www.cve.org/CVERecord?id=CVE-2016-4029::REFERENCE:CVE-2020-13776:DESCRIPTION:Mishandling of hex-valued usernames leads to unexpected decimal conversion and privilege escalation in the systemd Linux suite.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-13776::
null
null
null
null
null
null
1,389
Use of Default Credentials
Base
Incomplete
The product uses default credentials (such as passwords or cryptographic keys) for potentially critical functionality.
It is common practice for products to be designed to use default keys, passwords, or other mechanisms for authentication. The rationale is to simplify the manufacturing process or the system administrator's task of installation and deployment into an enterprise. However, if admins do not change the defaults, it is easier for attackers to bypass authentication quickly across multiple organizations.
::NATURE:ChildOf:CWE ID:1391:VIEW ID:1000:ORDINAL:Primary::
null
::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::OPERATING SYSTEM CLASS:Not OS-Specific:OPERATING SYSTEM PREVALENCE:Undetermined::ARCHITECTURE CLASS:Not Architecture-Specific:ARCHITECTURE PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::
null
null
::PHASE:Architecture and Design::
null
null
::SCOPE:Authentication:IMPACT:Gain Privileges or Assume Identity::
null
::PHASE:Requirements:DESCRIPTION:Prohibit use of default, hard-coded, or other values that do not vary for each installation of the product - especially for separate organizations.:EFFECTIVENESS:High::PHASE:Architecture and Design:DESCRIPTION:Force the administrator to change the credential upon installation.:EFFECTIVENESS:High::PHASE:Installation Operation:DESCRIPTION:The product administrator could change the defaults upon installation or during operation.:EFFECTIVENESS:Moderate::
::REFERENCE:CVE-2022-30270:DESCRIPTION:Remote Terminal Unit (RTU) uses default credentials for some SSH accounts:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30270::REFERENCE:CVE-2021-41192:DESCRIPTION:data visualization/sharing package uses default secret keys or cookie values if they are not specified in environment variables:LINK:https://www.cve.org/CVERecord?id=CVE-2021-41192::REFERENCE:CVE-2021-38759:DESCRIPTION:microcontroller board has default password:LINK:https://www.cve.org/CVERecord?id=CVE-2021-38759::REFERENCE:CVE-2010-2306:DESCRIPTION:Intrusion Detection System (IDS) uses the same static, private SSL keys for multiple devices and installations, allowing decryption of SSL traffic:LINK:https://www.cve.org/CVERecord?id=CVE-2010-2306::
null
null
null
null
null
null
1,392