A security scan identifies that a web server returns detailed stack traces in HTTP 500 error responses visible to clients. Why is this a security problem?
- A.Stack traces reveal exact SQL query text and bound parameter values, letting an attacker infer table names and column types without ever running a single injection probe
- B.Stack traces include the server's internal IP address and mounted volume paths, and a determined attacker can pivot that network layout into a targeted lateral movement plan
- C.Stack traces list the exact dependency versions loaded in memory and their load order, giving attackers a precise map of what third-party libraries to search for public exploits
- D.Stack traces expose internal code paths, framework versions, file paths, and variable names that attackers use to identify vulnerabilities and craft targeted exploits
Why D is correct
Detailed error pages (stack traces, SQL error messages, framework debug output) are a form of information disclosure. Attackers learn the exact framework version (for known CVEs), file system paths (for path traversal attempts), database schema (for SQL injection), and internal IP addresses. Production applications must return generic error messages to clients and log detailed errors server-side only.
Know someone studying for Web App Fundamentals? Send them this one.