An application returns a detailed database error message to the user: 'SQLSTATE[42000]: Syntax error near 'users' at line 1.' Why is this a security concern?
- A.It makes the page load slower
- B.It causes the session cookie to be deleted
- C.It violates GDPR regulations
- D.It reveals internal details (table names, DB type, query structure) that help attackers craft injections
Why D is correct
Verbose error messages disclose database structure, query syntax, and software versions. This is an OWASP 'Security Misconfiguration' issue (A05 in OWASP Top 10 2021). Production apps should display generic errors and log details server-side only.
Know someone studying for Web App Fundamentals? Send them this one.