ASP.NET Misconfiguration: Missing Custom Error Page |
Weakness ID: 12 (Weakness Variant) | Status: Draft |
Description Summary
Scope | Effect |
---|---|
Confidentiality | Default error pages gives detailed information about the error that occurred, and should not be used in production environments. Attackers can leverage the additional information provided by a default error page to mount attacks targeted on the framework, database, or other resources used by the application. |
Example 1
Custom error message mode is turned off. An ASP.NET error message with detailed stack trace and platform versions will be returned.
Example 2
Custom error message mode for remote user only. No defaultRedirect error page is specified. The local user on the web server will see a detailed stack trace. For remote users, an ASP.NET error message with the server customError configuration setting and the platform version will be returned.
Handle exceptions appropriately in source code. The best practice is to use a custom error message. Make sure that the mode attribute is set to "RemoteOnly" in the web.config file as shown in the following example. (Good Code) <customErrors mode="RemoteOnly" /> The mode attribute of the <customErrors> tag in the Web.config file defines whether custom or default error pages are used. It should be configured to use a custom page as follows: (Good Code) <customErrors mode="On" defaultRedirect="YourErrorPage.htm" /> |
Do not attempt to process an error or attempt to mask it. |
Verify return values are correct and do not supply sensitive information about the system. |
ASP .NET applications should be configured to use custom error pages instead of the framework default page. |
The mode attribute of the <customErrors> tag defines whether custom or default error pages are used. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 2 | Environment | Seven Pernicious Kingdoms (primary)700 |
ChildOf | ![]() | 10 | ASP.NET Environment Issues | Development Concepts (primary)699 |
ChildOf | ![]() | 756 | Missing Custom Error Page | Research Concepts (primary)1000 |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
7 Pernicious Kingdoms | ASP.NET Misconfiguration: Missing Custom Error Handling |
M. Howard, D. LeBlanc and J. Viega. "19 Deadly Sins of Software Security". McGraw-Hill/Osborne. 2005. |
OWASP, Fortify Software. "ASP.NET Misconfiguration: Missing Custom Error Handling". <http://www.owasp.org/index.php/ASP.NET_Misconfiguration:_Missing_Custom_Error_Handling>. |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
7 Pernicious Kingdoms | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Eric Dalci | Cigital | External | |
updated References, Demonstrative Example, Potential Mitigations, Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Other Notes, References, Taxonomy Mappings | ||||
2008-10-14 | CWE Content Team | MITRE | Internal | |
updated Relationships | ||||
2008-11-24 | CWE Content Team | MITRE | Internal | |
updated Common Consequences, Other Notes, Potential Mitigations | ||||
2009-03-10 | CWE Content Team | MITRE | Internal | |
updated Name, Relationships | ||||
2009-07-27 | CWE Content Team | MITRE | Internal | |
updated Background Details, Common Consequences, Other Notes | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2009-03-10 | ASP.NET Misconfiguration: Missing Custom Error Handling | |||