VariantIncomplete

CWE-7J2EE Misconfiguration: Missing Custom Error Page

Category: config

Description

The default error page of a web application should not display sensitive information about the product.

Common consequences· 1

  • Confidentiality — Read Application Data
    A stack trace might show the attacker a malformed SQL query string, the type of database being used, and the version of the application container. This information enables the attacker to target known vulnerabilities in these components.

Potential mitigations· 4

  • [Implementation]Handle exceptions appropriately in source code.
  • [Implementation, System Configuration]Always define appropriate error pages. The application configuration should specify a default error page in order to guarantee that the application will never leak error messages to an attacker. Handling standard HTTP error codes is useful and user-friendly in addition to being a good security practice, and a good configuration will also define a last-chance error handler that catches any exception that could possibly be thrown by the application.
  • [Implementation]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.

References

  1. https://cwe.mitre.org/data/definitions/7.html

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
ASP.NET Misconfiguration: Missing Custom Error Page
CWE
Missing Custom Error Page
CWE
J2EE Misconfiguration: Plaintext Password in Configuration File
CWE
Servlet Runtime Error Message Containing Sensitive Information
CWE
J2EE Misconfiguration: Data Transmission Without Encryption
CWE
Java Runtime Error Message Containing Sensitive Information
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.