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 causes the session cookie to be deleted
- B.It reveals internal details (table names, DB type, query structure) that help attackers craft injections
- C.It makes the page load slower
- D.It violates GDPR regulations
Why B 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.