CWE-209: Generation of Error Message Containing Sensitive Information

low-risk

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

Abstraction: Base

Common Consequences

Confidentiality Read Application Data

Detection Methods

Manual Analysis

This weakness generally requires domain-specific interpretation using manual analysis. However, the number of potential error conditions may be too large to cover completely within limited time constraints.

Automated Analysis

Automated methods may be able to detect certain idioms automatically, such as exposed stack traces or pathnames, but violation of business rules or privacy requirements is not typically feasible.

Automated Dynamic Analysis

This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results. Error conditions may be triggered with a stress-test by calling the software simultaneously from a large number of threads or processes, and look for evidence of any unexpected behavior.

Manual Dynamic Analysis

Identify error conditions that are not likely to occur during normal usage and trigger them. For example, run the program under low memory conditions, run with insufficient privileges or permissions, interrupt a transaction before it is completed, or disable connectivity to basic network services such as DNS. Monitor the software for any unexpected behavior. If you trigger an unhandled exception or similar error that was discovered and handled by the application's environment, it may still indicate unexpected conditions that were not handled by the application itself.

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2024-29059 7.5 93.8% Y
CVE-2024-29059 7.5 93.8% Y
CVE-2023-27587 7.4 87.5%
CVE-2024-45440 5.3 87.2%
CVE-2024-45440 5.3 87.2%
CVE-2013-7331 6.5 81.8% Y
CVE-2024-21733 5.3 73.4%
CVE-2021-22145 6.5 67.9%
CVE-2024-39719 7.5 39.2%
CVE-2022-29266 7.5 35.8%
3
/ 100
low-risk
Active Threat 3/50 · Minimal
Exploit Availability 0/50 · Minimal