scanrub
Information Exposure Through an Error Messagemedium prioritypartial coverage

Information Disclosure (Error Message)

3 min read 26 reports analyzed ScanRub Research
Share

Summary

This is the error-triggered instance of information disclosure: sending malformed, oversized, or otherwise unexpected input causes the application to fail in a way that reveals more than a generic error should. A "Whitelabel Error Page" or default 500 response is meant to hide implementation detail from the user, but many frameworks, when not explicitly configured for production, instead render a full stack trace, source file paths, the exact framework and version in use, or in the more severe cases (Werkzeug's interactive debugger, ASP.NET's Yellow Screen of Death) an interactive console with live code execution. Unlike information exposure through debug information, which is a standing endpoint reachable at any time, this category specifically requires triggering the error first: the leak only happens as a side effect of the application failing to handle unexpected input gracefully.

◈ flow diagram
Normal RequestError Condit…Verbose Resp…Internal Det…Attack Surfa…
◈ chart
Critical
2
High
7
Medium
11
Low
7

Top Affected Components / Targets

  • Default framework error pages left unconfigured for production (Whitelabel Error Page, Werkzeug debugger, ASP.NET Yellow Screen of Death, Express stack traces)
  • API endpoints that pass unexpected input types directly into internal logic without a validation layer catching it first
  • Database-backed endpoints where a malformed query parameter surfaces a raw SQL error instead of a generic failure message

Common Attack Vectors

  • Submit malformed input across content types and parameters (invalid JSON, oversized strings, wrong data types, malformed UUIDs, unexpected null values) and inspect whichever error response comes back for stack traces, file paths, or version banners
  • Submit input specifically designed to trigger a database-layer error (an unescaped quote, a type mismatch) to check whether the raw database error message reaches the response instead of being caught and replaced with a generic one

Common Payloads

  • Malformed JSON bodies, oversized strings well beyond expected field lengths, invalid UUIDs, and other special characters in fields with narrow expected formats
  • A single unescaped quote character in a parameter that reaches a database query, to check for a raw SQL error leak

Detection Strategy

Systematically send malformed variants of every input type (wrong data type, oversized value, invalid format, unexpected special characters) to every discovered parameter and endpoint, then parse each error response for stack-trace patterns, file system paths, framework and version banners, or raw database error text. This is a deterministic, low-noise check: a production application should never leak this level of detail regardless of what garbage input it's handed, so any instance found is a real, actionable configuration gap rather than a borderline judgment call.

Tip: Testing tools that run these checks in parallel across every discovered endpoint can cut the time required substantially compared to fully manual testing, as long as they confirm findings with more than one signal to keep the false-positive rate down.

False-Positive Notes

Some frameworks include a generic, non-identifying error code or reference number in their production error pages by design, which is not itself a leak; the finding requires the response to include genuinely internal detail (file paths, stack frames, framework internals, raw query text) rather than an opaque reference a support team could look up separately.

How to Test

Manual Testing Methodology

Here is a systematic approach to identifying Information Disclosure (Error Message) vulnerabilities in a target application.

Step 1: Reconnaissance and Surface Mapping

Before testing, map all input vectors that could be affected. Identify parameters, headers, cookies, and request bodies that interact with the vulnerable component. A proxy such as Burp Suite or OWASP ZAP, paired with normal browsing of the target, is usually enough to build this list.

Step 2: Baseline Request

Send a legitimate request and record the normal response: status code, content length, response time, and any identifying tokens. This baseline matters because it's what you'll compare later responses against once payloads are involved.

Step 3: Payload Injection

Inject test payloads into each identified input vector one at a time. Start with benign detection payloads before escalating to anything that could actually trigger the vulnerability. For Information Disclosure (Error Message) specifically, trigger error conditions deliberately (malformed input, missing parameters, invalid content types) across every endpoint, and diff full API responses against what the client UI actually uses to spot over-fetched fields.

Step 4: Response Analysis

Compare the response against your baseline, looking specifically for stack traces, internal paths, query fragments, or extra object fields appearing in a response that a production client was never meant to receive.

Step 5: Confirmation

Once a potential vulnerability is detected, confirm it with at least a few independent test cases to rule out coincidence. Document the exact request and response as proof. For Information Disclosure (Error Message), a confirmed finding typically means showing that attacker-controlled input changes the application's behavior in a way that matters for security, not just that a payload was reflected somewhere harmless.

Real-World Impact

Real-World Impact

Information disclosure covers a wide range of severity on its own — a verbose error message, a debug endpoint left enabled in production, or an API response that returns more fields than the client needs can each range from a minor hygiene issue to a direct path toward a more serious exploit, depending on exactly what leaks.

Stack traces and debug output routinely reveal framework versions, internal file paths, and database query structure that meaningfully narrow down what an attacker needs to guess for a follow-on attack like SQL injection or a known-CVE exploit. API responses that over-fetch — returning an entire internal object instead of an explicit response schema — have repeatedly leaked fields like internal user IDs, other users' partial data, or feature flags that were never meant to be client-visible.

Because each individual disclosure often looks low-severity in isolation, this class is frequently under-triaged relative to its role as a reconnaissance and chaining primitive in a larger attack.

Prevention & Remediation

Prevention and Secure Coding

Preventing Information Disclosure (Error Message) takes a defense-in-depth approach — no single control below is sufficient alone, but together they close off both the primary path and the most common bypasses.

Generic errors to the client, full detail server-side only. Return a generic error message and a correlation ID to the client; log the full stack trace and context server-side where the client can't reach it.

Disable debug/development modes in production. Framework debug modes, verbose stack traces, and admin/debug endpoints should be unreachable in a production deployment, enforced by configuration that's verified as part of the deploy process, not just documented.

Explicit response schemas. Define exactly which fields an API response returns rather than serializing an internal model object directly — this prevents new internal fields from becoming externally visible the moment someone adds them to the model.

Strip identifying metadata. Remove version banners, framework comments, and internal hostnames from responses and headers where they serve no client-facing purpose.

Frequently Asked Questions

What is Information Disclosure (Error Message)?
This is the error-triggered instance of information disclosure: sending malformed, oversized, or otherwise unexpected input causes the application to fail in a way that reveals more than a generic error should.
How common is Information Disclosure (Error Message) in bug bounty reports?
Scanrub's research corpus for this playbook is built from 26 disclosed HackerOne reports in this category, synthesized for detection and prevention guidance rather than reproduced verbatim.
How do I test for Information Disclosure (Error Message)?
Map every input vector, record a baseline response, then inject targeted test payloads one field at a time and compare the response for timing, length, error, or reflection differences from that baseline. The "How to Test" section above walks through the full methodology for this specific vulnerability class.
What is the single most effective fix for Information Disclosure (Error Message)?
Return generic errors to the client while logging full detail server-side only, and define explicit API response schemas instead of serializing internal objects directly.
Weekly security research

New vulnerability playbooks, tool updates, and bug bounty insights - delivered to your inbox. No spam.

Unsubscribe anytime. We respect your inbox.
Press ⌘K to search×