An ASP .NET application must enable custom error pages in order to prevent attackers from mining information from the framework's built-in responses.
View on MITREDefault 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.
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.
No detection method information available for this CWE.
The mode attribute of the <customErrors> tag in the Web.config file defines whether custom or default error pages are used.
In the following insecure ASP.NET application setting, custom error message mode is turned off. An ASP.NET error message with detailed stack trace and platform versions will be returned.
The mode attribute of the <customErrors> tag in the Web.config file defines whether custom or default error pages are used.
In the following insecure ASP.NET application setting, custom error message mode is turned off. An ASP.NET error message with detailed stack trace and platform versions will be returned.
The mode attribute of the <customErrors> tag in the Web.config file defines whether custom or default error pages are used.
In the following insecure ASP.NET application setting, custom error message mode is turned off. An ASP.NET error message with detailed stack trace and platform versions will be returned.
No relationship information available for this CWE.
CWE-12: ASP.NET Misconfiguration: Missing Custom Error Page is a Common Weakness Enumeration (CWE) entry maintained by MITRE. An ASP .NET application must enable custom error pages in order to prevent attackers from mining information from the framework's built-in responses.
If exploited, CWE-12 (ASP.NET Misconfiguration: Missing Custom Error Page) it can compromise Confidentiality, leading to outcomes such as Read Application Data.
Recommended mitigations for CWE-12 include: 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.
CWE-12 commonly affects ASP.NET. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.
A CWE (Common Weakness Enumeration) like CWE-12 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.