December 1, 2026
P3 Sensitive Information Disclosure Through Verbose API Error Messages
Severity: P3 โ Medium (subject to demonstrated sensitivity) Vulnerability Type: Information Disclosure / Improper Error Handling

By Akash motkar
2 min read
CWE:
- CWE-209 โ Generation of Error Message Containing Sensitive Information
- CWE-200 โ Exposure of Sensitive Information to an Unauthorized Actor
- CWE-703 โ Improper Check or Handling of Exceptional Conditions
OWASP: A04 Insecure Design / A05 โ Security Misconfiguration (depending on root cause)
1. Description
The application's API endpoints return overly detailed error messages when processing malformed, unexpected, or invalid user requests.
Instead of returning generic error responses, the backend may expose internal implementation details, including database errors, filesystem paths, application framework information, internal service names, stack traces, or backend query details.
An unauthenticated or authenticated attacker may deliberately submit malformed input to trigger these error conditions and collect information about the application's internal architecture.
Although verbose error messages do not necessarily provide direct access to protected functionality, the disclosed information can assist attackers in identifying implementation weaknesses and developing more targeted attacks.
The issue becomes more significant when error responses expose sensitive internal paths, database structure, or other information that should not be available to external users.
2. Affected Component
Component: Backend API Error Handling HTTP Method: GET / POST / PUT / PATCH Affected Functionality: API request processing and exception handling Authentication Required: Depends on the affected endpoint
3. Steps to Reproduce
Prerequisites
- Burp Suite.
- Access to an application API endpoint.
- An authorized test environment.
Step 1 Identify an API endpoint
Select an API endpoint that accepts user-controlled parameters or JSON request data.
Example:
POST /api/v1/user/search HTTP/1.1
Host: <application-host>
Content-Type: application/json
{
"username": "testuser"
}POST /api/v1/user/search HTTP/1.1
Host: <application-host>
Content-Type: application/json
{
"username": "testuser"
}Step 2 Intercept the request
Capture the request using Burp Suite and send it to Repeater.
Step 3 Submit malformed input
Modify a parameter with an unexpected data type or invalid value.
Example:
{
"username": {"unexpected": "object"}
}{
"username": {"unexpected": "object"}
}Step 4 Analyze the response
Forward the modified request and inspect the server response.
Look for unintended disclosures, such as:
- Internal filesystem paths.
- Database table or column names.
- SQL query fragments.
- Application stack traces.
- Internal service names.
- Framework or library implementation details.
Step 5 Verify reproducibility
Repeat the test with other reasonable invalid inputs and determine whether the application consistently exposes internal implementation details.
Do not perform destructive database operations or attempt to access unrelated internal resources.
4. Security Impact
Internal Architecture Disclosure: Error messages may reveal backend components and application implementation details.
Database Structure Exposure: Database-related errors may disclose table names, column names, or query information.
Filesystem Information Disclosure: Internal paths may reveal application directory structures and deployment details.
Targeted Attack Development: Attackers may use the disclosed information to identify additional weaknesses and construct more precise attacks.
Reduced Security Through Information Exposure: Detailed errors may make subsequent exploitation easier when combined with other vulnerabilities.
5. Root Cause Analysis
The likely root cause is improper exception handling and insufficient sanitization of error responses.
The application may return raw backend exceptions directly to clients instead of handling them through a centralized error-management mechanism.
6. Remediation
- Implement centralized exception handling across API endpoints.
- Return generic error messages to external clients.
- Disable debug mode in production environments.
- Prevent stack traces and internal paths from being returned in API responses.
- Log detailed exceptions exclusively on the server side.
- Avoid exposing database queries, schema information, and internal service details.
- Assign unique error identifiers to help correlate client errors with server-side logs.
- Perform security testing of error-handling behavior across all API endpoints.
7. Classification
AttributeClassificationVulnerabilityVerbose API Error Information DisclosureSeverityP3 โ Medium (conditional)CWECWE-209, CWE-200OWASPA04 / A05, depending on root causeAttack VectorNetworkPrivileges RequiredDepends on endpointUser InteractionNoneStatusIllustrative โ Requires Validation