Description
An ASP .NET application must enable custom error pages in order to prevent attackers from mining information from the framework's built-in responses.
Potential Impact
Confidentiality
Read Application Data
Demonstrative Examples
<customErrors mode="Off" /><customErrors mode="RemoteOnly" /><customErrors mode="On" defaultRedirect="YourErrorPage.htm" />Mitigations & Prevention
Handle exceptions appropriately in source code. ASP .NET applications should be configured to use custom error pages instead of the framework default page.
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.
Related Weaknesses
Taxonomy Mappings
- 7 Pernicious Kingdoms: — ASP.NET Misconfiguration: Missing Custom Error Handling
Frequently Asked Questions
What is CWE-12?
CWE-12 (ASP.NET Misconfiguration: Missing Custom Error Page) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. An ASP .NET application must enable custom error pages in order to prevent attackers from mining information from the framework's built-in responses.
How can CWE-12 be exploited?
Attackers can exploit CWE-12 (ASP.NET Misconfiguration: Missing Custom Error Page) to read application data. This weakness is typically introduced during the Implementation, Operation phase of software development.
How do I prevent CWE-12?
Key mitigations include: Handle exceptions appropriately in source code. ASP .NET applications should be configured to use custom error pages instead of the framework default page.
What is the severity of CWE-12?
CWE-12 is classified as a Variant-level weakness (Low-Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.