Führe statische Analyse (SAST) auf der Codebasis aus und suche im Datenfluss nach dem unsicheren Muster.
ASP.NET Misconfiguration: Missing Custom Error Page
This vulnerability occurs when an ASP.NET application fails to configure custom error pages, allowing attackers to extract sensitive information from the framework's default error messages.
What is CWE-12?
Real-world CVEs caused by CWE-12
Bisher sind in MITREs Katalog keine öffentlichen CVE-Referenzen mit dieser CWE verknüpft.
Angreiferpfad Schritt für Schritt
- 1
The mode attribute of the tag in the Web.config file defines whether custom or default error pages are used.
- 2
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.
- 3
A more secure setting is to set the custom error message mode for remote users 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.
- 4
Another secure option is to set the mode attribute of the tag to use a custom page as follows:
Vulnerable ASP.NET
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.
<customErrors mode="Off" /> Secure ASP.NET
A more secure setting is to set the custom error message mode for remote users 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.
<customErrors mode="RemoteOnly" /> How to prevent CWE-12
- 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.
How to detect CWE-12
Führe dynamische Application-Security-Tests gegen den Live-Endpoint aus.
Beobachte Runtime-Logs auf ungewöhnliche Exception-Traces, fehlerhafte Eingaben oder Versuche, Autorisierung zu umgehen.
Code Review: Markiere jeden neuen Code, der Eingaben von dieser Oberfläche ohne validierte Framework-Helper verarbeitet.
Plexicus erkennt CWE-12 automatisch und öffnet in unter 60 Sekunden einen Fix-PR.
Codex Remedium scannt jeden Commit, identifiziert genau diese Schwachstelle und liefert einen reviewer-ready Pull Request mit dem Patch. Keine Tickets. Keine Hand-offs.
Frequently asked questions
Was ist CWE-12?
This vulnerability occurs when an ASP.NET application fails to configure custom error pages, allowing attackers to extract sensitive information from the framework's default error messages.
Wie gravierend ist CWE-12?
MITRE hat für diese Schwachstelle keine Exploit-Wahrscheinlichkeit veröffentlicht. Behandle sie als mittlere Auswirkung, bis dein Threat Model anderes belegt.
Welche Sprachen oder Plattformen sind von CWE-12 betroffen?
MITRE lists the following affected platforms: ASP.NET.
Wie kann ich CWE-12 verhindern?
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.
Wie erkennt und behebt Plexicus CWE-12?
Die SAST-Engine von Plexicus erkennt die Datenfluss-Signatur von CWE-12 bei jedem Commit. Bei einem Treffer öffnet unser Codex-Remedium-Agent einen Fix-PR mit korrigiertem Code, Tests und einer einzeiligen Zusammenfassung für den Reviewer.
Wo erfahre ich mehr über CWE-12?
MITRE veröffentlicht die kanonische Definition unter https://cwe.mitre.org/data/definitions/12.html. Für ergänzende Hinweise kannst du auch die OWASP- und NIST-Dokumentation heranziehen.
Weaknesses related to CWE-12
Missing Custom Error Page
This vulnerability occurs when an application fails to display its own user-friendly error pages, instead falling back to default system…
J2EE Misconfiguration: Missing Custom Error Page
This vulnerability occurs when a J2EE application uses the server's default error pages instead of custom ones, potentially leaking…
Further reading
- MITRE — offizielle CWE-12 https://cwe.mitre.org/data/definitions/12.html
- Seven Pernicious Kingdoms: A Taxonomy of Software Security Errors https://samate.nist.gov/SSATTM_Content/papers/Seven%20Pernicious%20Kingdoms%20-%20Taxonomy%20of%20Sw%20Security%20Errors%20-%20Tsipenyuk%20-%20Chess%20-%20McGraw.pdf
- ASP.NET Misconfiguration: Missing Custom Error Handling https://www.owasp.org/index.php/ASP.NET_Misconfiguration:_Missing_Custom_Error_Handling
Schluss mit dem Bezahlen pro Entwickler.
Schließ den Kreislauf.
Plexicus ist die KI-native ASPM, die scannt, filtert, fixt, pentestet und erklärt — autonom. Unbegrenzte Entwickler, unbegrenzte Repos, Fair-Use-KI-Aktionen. Echter kostenloser Tarif, €269/mo jährlich, wenn du bereit bist.