Category: Error Conditions, Return Values, Status Codes

Incomplete
Summary

This category includes weaknesses that occur if a function does not generate the correct return/status code, or if the application does not handle all possible return/status codes that could be generated by a function. This type of problem is most often found in conditions that are rarely encountered during the normal operation of the product. Presumably, most bugs related to common conditions are found and eliminated during development and testing. In some cases, the attacker can directly control or influence the environment to trigger the rare conditions.

Membership
IDNameDescription
CWE-209Generation of Error Message Containing Sensitive InformationThe product generates an error message that includes sensitive information about its environment, users, or associated data.
CWE-248Uncaught ExceptionAn exception is thrown from a function, but it is not caught.
CWE-252Unchecked Return ValueThe product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
CWE-253Incorrect Check of Function Return ValueThe product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions.
CWE-390Detection of Error Condition Without ActionThe product detects a specific error, but takes no actions to handle the error.
CWE-391Unchecked Error Condition[PLANNED FOR DEPRECATION. SEE MAINTENANCE NOTES AND CONSIDER CWE-252, CWE-248, OR CWE-1069.] Ignoring exceptions and other error conditions may allow an attacker to induce unexpected behavior unnoticed.
CWE-392Missing Report of Error ConditionThe product encounters an error but does not provide a status code or return value to indicate that an error has occurred.
CWE-393Return of Wrong Status CodeA function or operation returns an incorrect return value or status code that does not indicate the true result of execution, causing the product to modify its behavior based on the incorrect result.
CWE-394Unexpected Status Code or Return ValueThe product does not properly check when a function or operation returns a value that is legitimate for the function, but is not expected by the product.
CWE-395Use of NullPointerException Catch to Detect NULL Pointer DereferenceCatching NullPointerException should not be used as an alternative to programmatic checks to prevent dereferencing a null pointer.
CWE-396Declaration of Catch for Generic ExceptionCatching overly broad exceptions promotes complex error handling code that is more likely to contain security vulnerabilities.
CWE-397Declaration of Throws for Generic ExceptionThe product throws or raises an overly broad exceptions that can hide important details and produce inappropriate responses to certain conditions.
CWE-544Missing Standardized Error Handling MechanismThe product does not use a standardized method for handling errors throughout the code, which might introduce inconsistent error handling and resultant weaknesses.
CWE-584Return Inside Finally BlockThe code has a return statement inside a finally block, which will cause any thrown exception in the try block to be discarded.
CWE-617Reachable AssertionThe product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
CWE-756Missing Custom Error PageThe product does not return custom error pages to the user, possibly exposing sensitive information.
CWE-699Software DevelopmentThis view organizes weaknesses around concepts that are frequently used or encountered in software development. This includes all aspects of the software development lifecycle including both architecture and implementation. Accordingly, this view can align closely with the perspectives of architects, developers, educators, and assessment vendors. It provides a variety of categories that are intended to simplify navigation, browsing, and mapping.
Vulnerability Mapping Notes
Usage: Prohibited
Reasons: Category
Rationale:
This entry is a Category. Using categories for mapping has been discouraged since 2019. Categories are informal organizational groupings of weaknesses that can help CWE users with data aggregation, navigation, and browsing. However, they are not weaknesses in themselves.
Comment:
See member weaknesses of this category.