CWE-211
Weakness AllowedExternally-Generated Error Message Containing Sensitive Information
Abstraction: Base · Status: Incomplete
The product performs an operation that triggers an external diagnostic or error message that is not directly generated or controlled by the product, such as an error generated by the programming language interpreter that a software application uses. The error can contain sensitive system information.
Mapping guidance
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Modes of introduction
PHP applications are often targeted for having this issue when the PHP interpreter generates the error outside of the application's control. However, other languages/environments exhibit the same issue.
REALIZATION: This weakness is caused during implementation of an architectural security tactic.
Notes
Relationship
This is inherently a resultant vulnerability from a weakness within the product or an interaction error.
Content history
updated Time_of_Introduction
updated Applicable_Platforms, Relationships, Other_Notes, Taxonomy_Mappings
updated Description
updated Description, Enabling_Factors_for_Exploitation, Functional_Areas, Observed_Examples, Other_Notes, Potential_Mitigations, Relationship_Notes, Weakness_Ordinalities
updated Potential_Mitigations
updated Observed_Examples
updated Name
updated Common_Consequences
updated Relationships
updated Name
updated Relationships
updated Applicable_Platforms, Enabling_Factors_for_Exploitation, Modes_of_Introduction, Relationships
updated Description, Name, Relationships
updated Description
updated Relationships
updated Mapping_Notes
updated Demonstrative_Examples
updated Applicable_Platforms
0 vulnerabilities reference this CWE, most recent first.
No vulnerabilities reference this CWE.
Mitigation
Configure the application's environment in a way that prevents errors from being generated. For example, in PHP, disable display_errors.
Mitigation MIT-40
Strategy: Compilation or Build Hardening
Debugging information should not make its way into a production release.
Mitigation MIT-40
Strategy: Environment Hardening
Debugging information should not make its way into a production release.
Mitigation
Handle exceptions internally and do not display errors containing potentially sensitive information to a user. Create default error pages if necessary.
Mitigation
The best way to prevent this weakness during implementation is to avoid any bugs that could trigger the external error message. This typically happens when the program encounters fatal errors, such as a divide-by-zero. You will not always be able to control the use of error pages, and you might not be using a language that handles exceptions.
No CAPEC attack patterns related to this CWE.