Error Handling |
Category ID: 388 (Category) | Status: Draft |
Description Summary
Extended Description
An attacker may discover this type of error, as forcing these errors can occur with a variety of corrupt input.
Scope | Effect |
---|---|
Confidentiality | Generally, the consequences of improper error handling are the disclosure of the internal workings of the application to the attacker, providing details to use in further attacks. Web applications that do not properly handle error conditions frequently generate error messages such as stack traces, detailed diagnostics, and other inner details of the application. |
Example 1
In the snippet below, an unchecked runtime exception thrown from within the try block may cause the container to display its default error page (which may contain a full stack trace, among other things).
Use a standard exception handling mechanism to be sure that your application properly handles all types of processing errors. All error messages sent to the user should contain as little detail as necessary to explain what happened. |
If the error was caused by unexpected and likely malicious input, it may be appropriate to send the user no error message other than a simple "could not process the request" response. |
The details of the error and its cause should be recorded in a detailed diagnostic log for later analysis. Do not allow the application to throw errors up to the application container, generally the web application server. |
Be sure that the container is properly configured to handle errors if you choose to let any errors propagate up to it. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 18 | Source Code | Development Concepts (primary)699 |
ChildOf | ![]() | 728 | OWASP Top Ten 2004 Category A7 - Improper Error Handling | Weaknesses in OWASP Top Ten (2004) (primary)711 |
ParentOf | ![]() | 389 | Error Conditions, Return Values, Status Codes | Development Concepts (primary)699 |
ParentOf | ![]() | 391 | Unchecked Error Condition | Seven Pernicious Kingdoms (primary)700 |
ParentOf | ![]() | 395 | Use of NullPointerException Catch to Detect NULL Pointer Dereference | Seven Pernicious Kingdoms (primary)700 |
ParentOf | ![]() | 396 | Declaration of Catch for Generic Exception | Seven Pernicious Kingdoms (primary)700 |
ParentOf | ![]() | 397 | Declaration of Throws for Generic Exception | Seven Pernicious Kingdoms (primary)700 |
ParentOf | ![]() | 544 | Failure to Use a Standardized Error Handling Mechanism | Development Concepts (primary)699 |
ParentOf | ![]() | 600 | Failure to Catch All Exceptions in Servlet | Development Concepts (primary)699 |
ParentOf | ![]() | 636 | Not Failing Securely ('Failing Open') | Development Concepts699 |
ParentOf | ![]() | 754 | Improper Check for Unusual or Exceptional Conditions | Development Concepts (primary)699 |
ParentOf | ![]() | 756 | Missing Custom Error Page | Development Concepts (primary)699 |
MemberOf | ![]() | 700 | Seven Pernicious Kingdoms | Seven Pernicious Kingdoms (primary)700 |
PeerOf | ![]() | 619 | Dangling Database Cursor ('Cursor Injection') | Research Concepts1000 |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
7 Pernicious Kingdoms | Error Handling | ||
OWASP Top Ten 2004 | A7 | CWE More Specific | Improper Error Handling |
CAPEC-ID | Attack Pattern Name | (CAPEC Version: 1.4) |
---|---|---|
28 | Fuzzing |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
7 Pernicious Kingdoms | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Sean Eidemiller | Cigital | External | |
added/updated demonstrative examples | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Common Consequences, Description, Relationships, Taxonomy Mappings | ||||
2008-10-14 | CWE Content Team | MITRE | Internal | |
updated Description | ||||
2009-03-10 | CWE Content Team | MITRE | Internal | |
updated Relationships | ||||
2009-10-29 | CWE Content Team | MITRE | Internal | |
updated Common Consequences |