597
Nature Type ID Name Page
ChildOf 755 Improper Handling of Exceptional Conditions 1576
ChildOf 705 Incorrect Control Flow Scoping 1542
ParentOf 600 Uncaught Exception in Servlet 1343
Relevant to the view "CISQ Quality Measures (2020)" (CWE-1305)
Nature Type ID Name Page
ChildOf 703 Improper Check or Handling of Exceptional Conditions 1535
Relevant to the view "CISQ Data Protection Measures" (CWE-1340)
Nature Type ID Name Page
ChildOf 703 Improper Check or Handling of Exceptional Conditions 1535
Relevant to the view "Software Development" (CWE-699)
Nature Type ID Name Page
MemberOf 389 Error Conditions, Return Values, Status Codes 2322
Applicable Platforms
Language : C++ (Prevalence = Undetermined)
Language : Java (Prevalence = Undetermined)
Language : C# (Prevalence = Undetermined)
Common Consequences
Scope Impact Likelihood
Availability
Confidentiality
DoS: Crash, Exit, or Restart
Read Application Data
An uncaught exception could cause the system to be
placed in a state that could lead to a crash, exposure of
sensitive information or other unintended behaviors.
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
Demonstrative Examples
Example 1:
The following example attempts to resolve a hostname.
Example Language: Java (Bad)
protected void doPost (HttpServletRequest req, HttpServletResponse res) throws IOException {
String ip = req.getRemoteAddr();
InetAddress addr = InetAddress.getByName(ip);
...
out.println("hello " + addr.getHostName());
}
A DNS lookup failure will cause the Servlet to throw an exception.
CWE Version 4.14
CWE-248: Uncaught Exception
CWE-248: Uncaught Exception