Error Message (SQLite)
- PCI 3.2-6.5.5
- OWASP 2013-A5
Error Message Disclosure occurs when an application returns overly detailed error messages to end users, revealing internal system information such as stack traces, database queries, file paths, configuration details, or API endpoints. Attackers can leverage this information to perform reconnaissance, identify vulnerabilities, or craft more effective attacks. While the errors themselves may not allow direct exploitation, the sensitive data exposed can significantly aid attackers in bypassing security controls.
Common patterns leading to error message disclosure:
- Detailed stack traces or exception information displayed in the browser.
- Database error messages including table names, column names, or query fragments.
- Misconfigured frameworks or development environments in production that reveal internal code paths.
- Including internal IPs, server software versions, or configuration parameters in error responses.
- APIs returning full error payloads instead of sanitized error codes.
Impacts:
- Information Disclosure: Reveals internal implementation details, database structures, and server configuration.
- Facilitates Exploitation: Attackers can use detailed errors to craft SQL injection, path traversal, or other attacks.
- Exposure of Sensitive Data: Credentials, tokens, or internal paths may be leaked.
- Increased Attack Surface: Knowledge gained from error messages can lead to targeted attacks and privilege escalation.
Detection indicators:
- Application responses contain stack traces, system paths, or database error messages.
- Web server or framework default error pages displayed to users.
- Error codes including implementation details or debug information.
Remediation
Preventing error message disclosure involves sanitizing outputs, handling errors securely, and logging details internally:
Generic Error Messages for Users
Display minimal information to end users, such as "An unexpected error occurred," without revealing stack traces or system details.Internal Logging
Log full error details, including stack traces, query information, and server context, to secure internal logs accessible only to administrators.Disable Debug/Development Mode in Production
Ensure frameworks and libraries are configured for production, preventing debug output from being displayed.Exception Handling
Implement centralized error handling to catch exceptions and return sanitized messages.Avoid Returning Sensitive Data in API Responses
Return standardized error codes or messages instead of including raw system data.Monitor and Alert
Set up alerts for repeated errors or unusual error patterns that may indicate probing or exploitation attempts.Regular Security Testing
Include error message leakage checks in penetration tests and code reviews.Least Privilege Principle
Ensure application components and users have only the permissions required to execute their functionality to reduce the impact of errors.
References
Search Vulnerability
You may also see
- Error Message (PHP)
- Error Message (MySQL)
- Error Message (ASP.NET)
- Error Message (SQLite)
- Long Redirect Response
- Error Message
- Stack Trace
- Internal Path
- Not Secure Cookie
- Not Http-Only Cookie
- Sensitive Data in Query String
- Sensitive Data over HTTP
- Server Error
- Source Code Disclosure
- Information Leakage
- Web Backdoor
- Database Connection String
- Autocomplete Enabled
- Undefined Content-Type Header
- Missing X-Frame-Options Header
- File Upload Input Detected
- Mixed Content
- Insecure iFrame
- XPath Injection
- Basic Authentication over HTTP
- Forbidden Resource
- Multiple Choices Enabled
- Apache MultiViews Enabled
- GraphQL Endpoint Detected