1379
Nature Type ID Name Page
ChildOf 670 Always-Incorrect Control Flow Implementation 1475
CanFollow 193 Off-by-one Error 486
Relevant to the view "Weaknesses for Simplified Mapping of Published
Vulnerabilities" (CWE-1003)
Nature Type ID Name Page
ChildOf 670 Always-Incorrect Control Flow Implementation 1475
Relevant to the view "Software Development" (CWE-699)
Nature Type ID Name Page
MemberOf 389 Error Conditions, Return Values, Status Codes 2322
Weakness Ordinalities
Resultant :
Alternate Terms
assertion failure :
Common Consequences
Scope Impact Likelihood
Availability DoS: Crash, Exit, or Restart
An attacker that can trigger an assert statement can still
lead to a denial of service if the relevant code can be
triggered by an attacker, and if the scope of the assert()
extends beyond the attacker's own session.
Detection Methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST),
can find some instances of this weakness by analyzing source code (or binary/compiled code)
without having to execute it. Typically, this is done by building a model of data flow and control
flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input)
with "sinks" (destinations where the data interacts with external components, a lower layer such
as the OS, etc.)
Effectiveness = High
Potential Mitigations
Phase: Implementation
Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/
close resources)
Phase: Implementation
Strategy = Input Validation
Perform input validation on user data.
Demonstrative Examples
Example 1:
In the excerpt below, an AssertionError (an unchecked exception) is thrown if the user hasn't
entered an email address in an HTML form.
Example Language: Java (Bad)
String email = request.getParameter("email_address");
CWE Version 4.14
CWE-618: Exposed Unsafe ActiveX Method
CWE-618: Exposed Unsafe ActiveX Method