Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CWE-248:Uncaught Exception
Weakness ID:248
Version:v4.17
Weakness Name:Uncaught Exception
Vulnerability Mapping:Allowed
Abstraction:Base
Structure:Simple
Status:Draft
Likelihood of Exploit:
DetailsContent HistoryObserved CVE ExamplesReports
▼Description

An exception is thrown from a function, but it is not caught.

▼Extended Description

When an exception is not caught, it may cause the program to crash or expose sensitive information.

▼Alternate Terms
▼Relationships
Relevant to the view"Research Concepts - (1000)"
NatureMappingTypeIDName
ChildOfAllowed-with-ReviewC705Incorrect Control Flow Scoping
ChildOfDiscouragedC755Improper Handling of Exceptional Conditions
ParentOfAllowedV600Uncaught Exception in Servlet
Nature: ChildOf
Mapping: Allowed-with-Review
Type: Class
ID: 705
Name: Incorrect Control Flow Scoping
Nature: ChildOf
Mapping: Discouraged
Type: Class
ID: 755
Name: Improper Handling of Exceptional Conditions
Nature: ParentOf
Mapping: Allowed
Type: Variant
ID: 600
Name: Uncaught Exception in Servlet
▼Memberships
NatureMappingTypeIDName
MemberOfProhibitedC2277PK - API Abuse
MemberOfProhibitedC389Error Conditions, Return Values, Status Codes
MemberOfProhibitedC730OWASP Top Ten 2004 Category A9 - Denial of Service
MemberOfProhibitedC851The CERT Oracle Secure Coding Standard for Java (2011) Chapter 8 - Exceptional Behavior (ERR)
MemberOfProhibitedV884CWE Cross-section
MemberOfProhibitedC962SFP Secondary Cluster: Unchecked Status Condition
MemberOfProhibitedC1141SEI CERT Oracle Secure Coding Standard for Java - Guidelines 07. Exceptional Behavior (ERR)
MemberOfProhibitedC1181SEI CERT Perl Coding Standard - Guidelines 03. Expressions (EXP)
MemberOfProhibitedC1410Comprehensive Categorization: Insufficient Control Flow Management
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 227
Name: 7PK - API Abuse
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 389
Name: Error Conditions, Return Values, Status Codes
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 730
Name: OWASP Top Ten 2004 Category A9 - Denial of Service
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 851
Name: The CERT Oracle Secure Coding Standard for Java (2011) Chapter 8 - Exceptional Behavior (ERR)
Nature: MemberOf
Mapping: Prohibited
Type:View
ID: 884
Name: CWE Cross-section
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 962
Name: SFP Secondary Cluster: Unchecked Status Condition
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1141
Name: SEI CERT Oracle Secure Coding Standard for Java - Guidelines 07. Exceptional Behavior (ERR)
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1181
Name: SEI CERT Perl Coding Standard - Guidelines 03. Expressions (EXP)
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1410
Name: Comprehensive Categorization: Insufficient Control Flow Management
▼Tags
NatureMappingTypeIDName
MemberOfProhibitedBSBOSS-247Weaknesses in Software Written in C#
MemberOfProhibitedBSBOSS-324DoS: Crash, Exit, or Restart (impact)
MemberOfProhibitedBSBOSS-328Read Application Data (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-247
Name: Weaknesses in Software Written in C#
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-324
Name: DoS: Crash, Exit, or Restart (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-328
Name: Read Application Data (impact)
▼Relevant To View
Relevant to the view"Weaknesses Addressed by the SEI CERT Oracle Coding Standard for Java - (1133)"
NatureMappingTypeIDName
MemberOfProhibitedC1141SEI CERT Oracle Secure Coding Standard for Java - Guidelines 07. Exceptional Behavior (ERR)
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1141
Name: SEI CERT Oracle Secure Coding Standard for Java - Guidelines 07. Exceptional Behavior (ERR)
Relevant to the view"Weaknesses Addressed by the SEI CERT Perl Coding Standard - (1178)"
NatureMappingTypeIDName
MemberOfProhibitedC1181SEI CERT Perl Coding Standard - Guidelines 03. Expressions (EXP)
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1181
Name: SEI CERT Perl Coding Standard - Guidelines 03. Expressions (EXP)
Relevant to the view"Seven Pernicious Kingdoms - (700)"
NatureMappingTypeIDName
MemberOfProhibitedC2277PK - API Abuse
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 227
Name: 7PK - API Abuse
Relevant to the view"Software Development - (699)"
NatureMappingTypeIDName
MemberOfProhibitedC389Error Conditions, Return Values, Status Codes
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 389
Name: Error Conditions, Return Values, Status Codes
Relevant to the view"Software Fault Pattern (SFP) Clusters - (888)"
NatureMappingTypeIDName
MemberOfProhibitedC962SFP Secondary Cluster: Unchecked Status Condition
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 962
Name: SFP Secondary Cluster: Unchecked Status Condition
▼Background Detail

▼Common Consequences
ScopeLikelihoodImpactNote
AvailabilityConfidentialityN/ADoS: Crash, Exit, or RestartRead 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.

Scope: Availability, Confidentiality
Likelihood: N/A
Impact: DoS: Crash, Exit, or Restart, Read Application Data
Note:

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.

▼Potential Mitigations
▼Modes Of Introduction
Phase: Implementation
Note:

N/A

▼Applicable Platforms
Languages
Class: C++(Undetermined Prevalence)
Class: Java(Undetermined Prevalence)
Class: C#(Undetermined Prevalence)
▼Demonstrative Examples
Example 1

The following example attempts to resolve a hostname.

Language: ( code)
N/A

Language: Java(Bad code)
protected void doPost (HttpServletRequest req, HttpServletResponse res) throws IOException { String ip = req.getRemoteAddr(); InetAddress addr = InetAddress.getByName(ip); ... out.println("hello " + addr.getHostName()); }

Language: ( code)
N/A

A DNS lookup failure will cause the Servlet to throw an exception.

Example 2

The _alloca() function allocates memory on the stack. If an allocation request is too large for the available stack space, _alloca() throws an exception. If the exception is not caught, the program will crash, potentially enabling a denial of service attack. _alloca() has been deprecated as of Microsoft Visual Studio 2005(R). It has been replaced with the more secure _alloca_s().

Language: ( code)
N/A

Example 3

EnterCriticalSection() can raise an exception, potentially causing the program to crash. Under operating systems prior to Windows 2000, the EnterCriticalSection() function can raise an exception in low memory situations. If the exception is not caught, the program will crash, potentially enabling a denial of service attack.

Language: ( code)
N/A

▼Observed Examples
ReferenceDescription
CVE-2023-41151
SDK for OPC Unified Architecture (OPC UA) server has uncaught exception when a socket is blocked for writing but the server tries to send an error
CVE-2023-21087
Java code in a smartphone OS can encounter a "boot loop" due to an uncaught exception
Reference: CVE-2023-41151
Description:
SDK for OPC Unified Architecture (OPC UA) server has uncaught exception when a socket is blocked for writing but the server tries to send an error
Reference: CVE-2023-21087
Description:
Java code in a smartphone OS can encounter a "boot loop" due to an uncaught exception
▼Affected Resources
    ▼Functional Areas
      ▼Weakness Ordinalities
      OrdinalityDescription
      ▼Detection Methods
      Automated Static Analysis
      Detection Method ID:DM-14
      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
      Note:

      N/A

      ▼Vulnerability Mapping Notes
      Usage:Allowed
      Reason:Acceptable-Use
      Rationale:

      This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

      Comments:

      Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

      Suggestions:
      ▼Notes
      ▼Taxonomy Mappings
      Taxonomy NameEntry IDFitEntry Name
      7 Pernicious KingdomsN/AN/AOften Misused: Exception Handling
      The CERT Oracle Secure Coding Standard for Java (2011)ERR05-JN/ADo not let checked exceptions escape from a finally block
      The CERT Oracle Secure Coding Standard for Java (2011)ERR06-JN/ADo not throw undeclared checked exceptions
      SEI CERT Perl Coding StandardEXP31-PLExactDo not suppress or ignore exceptions
      Software Fault PatternsSFP4N/AUnchecked Status Condition
      Taxonomy Name: 7 Pernicious Kingdoms
      Entry ID: N/A
      Fit: N/A
      Entry Name: Often Misused: Exception Handling
      Taxonomy Name: The CERT Oracle Secure Coding Standard for Java (2011)
      Entry ID: ERR05-J
      Fit: N/A
      Entry Name: Do not let checked exceptions escape from a finally block
      Taxonomy Name: The CERT Oracle Secure Coding Standard for Java (2011)
      Entry ID: ERR06-J
      Fit: N/A
      Entry Name: Do not throw undeclared checked exceptions
      Taxonomy Name: SEI CERT Perl Coding Standard
      Entry ID: EXP31-PL
      Fit: Exact
      Entry Name: Do not suppress or ignore exceptions
      Taxonomy Name: Software Fault Patterns
      Entry ID: SFP4
      Fit: N/A
      Entry Name: Unchecked Status Condition
      ▼Related Attack Patterns
      IDName
      ▼References
      Reference ID: REF-6
      Title: Seven Pernicious Kingdoms: A Taxonomy of Software Security Errors
      Author: Katrina Tsipenyuk, Brian Chess, Gary McGraw
      Section:
      Publication:
      NIST Workshop on Software Security Assurance Tools Techniques and Metrics
      Publisher:NIST
      Edition:
      URL:https://samate.nist.gov/SSATTM_Content/papers/Seven%20Pernicious%20Kingdoms%20-%20Taxonomy%20of%20Sw%20Security%20Errors%20-%20Tsipenyuk%20-%20Chess%20-%20McGraw.pdf
      URL Date:
      Day:07
      Month:11
      Year:2005
      Details not found