Information Leakage
- CAPEC 118
- CWE 200
- WASC 13
- OWASP PC-C7
Information Leakage occurs when an application inadvertently exposes sensitive data that could aid an attacker in compromising the system or its users. This type of vulnerability arises from poor handling of error messages, verbose debugging information, misconfigured servers, excessive headers, metadata exposure, or improperly sanitized responses. Unlike direct exploitation vulnerabilities, information leakage often serves as a precursor to attacks, providing attackers with reconnaissance data such as system architecture, software versions, file paths, or API endpoints.
Common patterns leading to information leakage:
- Detailed error messages or stack traces exposed to users.
- Verbose HTTP headers revealing server, framework, or application version.
- Publicly accessible backup files, directories, or source code.
- Disclosure of sensitive data in comments, logs, or HTML/JavaScript content.
- Insecure API responses returning unnecessary or sensitive data fields.
- Leaking tokens, credentials, or session identifiers in URLs or headers.
Impacts:
- Reconnaissance: Helps attackers understand the system, software versions, and potential vulnerabilities.
- Facilitates Targeted Attacks: Enables SQL Injection, Cross-Site Scripting, Remote Code Execution, or privilege escalation by revealing weak points.
- Sensitive Data Exposure: May inadvertently expose personal information, API keys, or internal configurations.
- Reputation and Compliance Risks: Exposure of user or organizational data can lead to regulatory violations and reputational damage.
Detection indicators:
- Response headers containing detailed server or framework information.
- Error pages showing stack traces, database queries, or configuration data.
- Metadata in files (images, documents) containing sensitive information.
- Excessive debug information visible in production environments.
- Unintended data returned in API responses.
Remediation
Preventing information leakage involves controlling what data is exposed, sanitizing outputs, and securing the environment:
Sanitize Error Messages and Responses
Display generic error messages to users while logging detailed errors internally for debugging purposes.Disable Debug and Verbose Logging in Production
Ensure development tools and debug settings are turned off in production.Control HTTP Headers
Remove or mask server banners, version numbers, and framework information in headers.Secure Sensitive Files and Directories
Store backups, logs, source code, and configuration files outside the web root with restricted permissions.Review API Responses
Return only necessary data; avoid sending extra fields or internal identifiers to clients.Metadata Scrubbing
Remove sensitive metadata from files uploaded or served publicly.Implement Access Control
Ensure sensitive information is accessible only to authorized users.Regular Security Testing
Conduct automated scanning, penetration testing, and code review to detect information leakage vectors.Principle of Least Privilege
Limit access permissions for web servers, applications, and system processes to minimize potential exposure.Monitoring and Alerting
Monitor logs and responses for accidental disclosure of sensitive data, and alert on abnormal patterns.
References
Search Vulnerability
You may also see
- Internal IP Address Disclosure
- Username Disclosure
- Application Disclosure
- Email Disclosure
- 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