CWE-12: ASP.NET Misconfiguration: Missing Custom Error Page
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 it's found
ASP.NET Misconfiguration: Missing Custom Error Page is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
Vulnerable vs. safe
<customErrors mode="Off" /><customErrors mode="RemoteOnly" />Consequences
- Read Application Data: 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.
Mitigations
- System Configuration: Handle exceptions appropriately in source code. ASP .NET applications should be configured to use custom error pages instead of the framework default page.
- Architecture and Design: Do not attempt to process an error or attempt to mask it.
- Implementation: Verify return values are correct and do not supply sensitive information about the system.
Where this fits in a TurboPentest engagement
TurboPentest's agentic pentest is powerful and covers a broad range of issues automatically. This particular class is best confirmed in a manual IntegSec engagement, where human pentesters apply deeper methodology and a larger context window than any automated pass.
Frequently asked questions
What is CWE-12?
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 do you find ASP.NET Misconfiguration: Missing Custom Error Page?
ASP.NET Misconfiguration: Missing Custom Error Page is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
What is the impact of CWE-12?
Read Application Data: 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.
Does TurboPentest test for ASP.NET Misconfiguration: Missing Custom Error Page?
TurboPentest's agentic pentest is powerful and covers a broad range of issues automatically. This particular class is best confirmed in a manual IntegSec engagement, where human pentesters apply deeper methodology and a larger context window than any automated pass.
Related CWEs
Find these issues before an attacker does
TurboPentest runs an agentic AI pentest against your target and reports findings with proof, from $99 per target.
Start a $99 pentest