CISSP Software Development Security Practice Question
A security analyst is reviewing the error handling of an application. The application currently displays detailed stack traces to users when an exception occurs. Which of the following is the best practice for error handling in production?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Display generic error messages to users and log detailed errors for admins
Detailed error messages can leak sensitive information. Production systems should show generic messages to users and log detailed errors for administrators.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Display generic error messages to users and log detailed errors for admins
Why this is correct
Displaying generic error messages like 'An unexpected error occurred' to users is a critical security practice that prevents the inadvertent disclosure of sensitive system information, such as database schemas, server configurations, or internal file paths. Concurrently, logging detailed error messages, including stack traces and specific error codes, for administrators is essential for effective debugging, incident response, and proactive identification of application vulnerabilities. This balanced approach ensures operational efficiency and maintainability without compromising the application's security posture by exposing internal workings to potential attackers.
- ✗
Display detailed errors to users for troubleshooting
Why it's wrong here
Exposing detailed error messages directly to users, such as full stack traces, SQL error messages, or internal file system paths, provides attackers with invaluable reconnaissance data. This information can reveal the application's underlying technologies, database structure, and potential vulnerabilities, enabling them to craft more targeted and effective exploits. Such disclosures significantly increase the attack surface and can lead to serious security breaches, including data exfiltration, privilege escalation, or remote code execution by providing a roadmap to system internals.
- ✗
Disable all error reporting to eliminate information leakage
Why it's wrong here
Completely disabling all error reporting creates a dangerous blind spot, preventing administrators from detecting and diagnosing critical application failures or security vulnerabilities in a timely manner. While it might seem to eliminate information leakage, it merely hides problems, allowing silent failures to persist, potentially leading to data corruption, service outages, or unpatched security flaws that attackers could still discover and exploit through other means. This approach severely hampers incident response capabilities and overall system resilience, making it impossible to address issues proactively.
- ✗
Encrypt error messages before displaying to users
Why it's wrong here
Encrypting error messages before displaying them to users offers no practical security benefit against information leakage if the user, or an attacker impersonating a user, possesses the means to decrypt the message. The core problem of sensitive data disclosure remains unaddressed, as the information is merely obfuscated rather than truly protected from the intended recipient. This method introduces unnecessary computational overhead and complexity without mitigating the fundamental risk of exposing internal system details to anyone who can access and decrypt the message.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CISSP question from scratch — 747 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CISSP practice question is part of Courseiva's free ISC2 certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CISSP exam.