Back to Labs
Weakness (CWE)

CWE-209

Generation of Error Message Containing Sensitive Information

About

The product generates an error message that includes sensitive information about its environment, users, or associated data.

Common consequences

  • Confidentiality → Read Application Data

Mitigations

  • Implementation: Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed informat
  • Implementation: Handle exceptions internally and do not display errors containing potentially sensitive information to a user.
  • Implementation: Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
  • Implementation, Build and Compilation: Debugging information should not make its way into a production release.
  • Implementation, Build and Compilation: Debugging information should not make its way into a production release.
  • System Configuration: Where available, configure the environment to use less verbose error messages. For example, in PHP, disable the display_errors setting during configuration, or at runtime using the error_reporting() function.

CVEs with this weakness

Frequently asked questions

What is CWE-209?

The product generates an error message that includes sensitive information about its environment, users, or associated data. Common consequences Confidentiality → Read Application Data Mitigations Implementation: Ensure that error messages only contain minimal details that are useful to the intended audience and no one else.

How likely is CWE-209 to be exploited?

MITRE rates the likelihood of exploit for CWE-209 as high.

Which platforms does CWE-209 affect?

CWE-209 has been observed on: PHP, Java, Not Technology-Specific.

How many CVEs does Rainforest track for CWE-209?

Rainforest Labs currently tracks 2 published CVEs mapped to CWE-209. They are listed on this page.

Empower Your Security Strategy with Rainforest

Discover vulnerabilities early, prioritize critical threats, and protect what truly matters. Rainforest streamlines your security operations, saving you time and reducing costs, so you can focus on what drives your business forward.