Weakness · Medium
CWE-211: Externally-Generated Error Message Containing Sensitive Information
What it is
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.
- Severity (our rating)
- Medium
- Likelihood of exploit
- Not rated by MITRE
- Introduced during
- Architecture and Design, Implementation, Operation
- Exploited in the wild
- No CVE in CISA's catalog
What an attacker can do
- Read Application Data (Confidentiality)
How to prevent it
System Configuration
- Configure the application's environment in a way that prevents errors from being generated. For example, in PHP, disable display_errors.
Implementation
- Debugging information should not make its way into a production release.
- Debugging information should not make its way into a production release.
- Handle exceptions internally and do not display errors containing potentially sensitive information to a user. Create default error pages if necessary.
- 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.
H2 Security
Found it in your code?
We review where it appears, fix it with your team, and check it was not already used against you.
Talk to our teamT Academy
Stop writing it in the first place
Learn to build software and systems without weaknesses like this one, with practice on real hosts in your browser, every objective checked on the machine.
Start freeSource: MITRE Common Weakness Enumeration, CWE version 4.19.1. CWE is a trademark of The MITRE Corporation.