Courseiva
hardMultiple ChoiceObjective-mapped

CISSP Practice Question: A company develops a web application using…

A company develops a web application using microservices architecture deployed on Kubernetes. The security team identifies that the application is vulnerable to injection attacks because user input is concatenated into SQL queries. The development team wants to implement a fix quickly. They propose using parameterized queries, but the database access layer currently uses stored procedures. The team considers modifying the stored procedures to accept parameters and using prepared statements in the code. However, the operations team is concerned about performance impact. Which of the following is the BEST course of action?

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

Implement both parameterized queries and modify stored procedures to use parameters, and then monitor performance.

The best because it implements a defense-in-depth approach: parameterized queries in the application code combined with parameterized stored procedures provide robust protection against SQL injection, and monitoring performance addresses the operations team's concern. Option A is incorrect because parameterized queries alone do not protect if the stored procedures still concatenate input. Option C is incorrect because dynamic SQL within stored procedures, even with input validation, can still be vulnerable to injection (e.g., via second-order attacks). Option D is incorrect because input validation alone is insufficient, and stored procedures without parameterization can still be vulnerable to injection.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use parameterized queries immediately without modifying stored procedures.

    Why it's wrong here

    Simply using parameterized queries at the application layer is insufficient if the underlying stored procedures themselves concatenate user input into SQL statements. This creates a secondary injection vector within the database logic, bypassing the initial parameterization. The stored procedures must also be refactored to accept and use parameters securely, preventing internal string concatenation vulnerabilities.

  • Implement both parameterized queries and modify stored procedures to use parameters, and then monitor performance.

    Why this is correct

    Implementing parameterized queries at the application layer combined with modifying existing stored procedures to properly utilize parameters creates a robust, defense-in-depth strategy against SQL injection. This approach eliminates injection vulnerabilities at both the application and database levels. Monitoring performance post-implementation is crucial to identify any potential bottlenecks introduced by the changes before a full production rollout, ensuring system stability and efficiency.

  • Modify stored procedures to use dynamic SQL with input validation.

    Why it's wrong here

    Relying on dynamic SQL within stored procedures, even with input validation, introduces significant security risks due to the inherent complexity and potential for bypasses. Dynamic SQL constructs can be difficult to secure completely, as subtle coding errors or misconfigurations in validation logic can still lead to injection vulnerabilities. This method is generally discouraged for sensitive operations because it increases the attack surface and maintenance burden compared to static parameterized queries.

  • Use input validation only, as stored procedures inherently prevent injection.

    Why it's wrong here

    Assuming stored procedures inherently prevent injection is a dangerous misconception, especially if they internally construct SQL using concatenated strings or dynamic SQL. While input validation is a critical first line of defense, it is never a complete solution on its own against sophisticated injection attacks. Attackers can often craft inputs that bypass validation rules, making robust server-side controls like parameterized queries essential for true protection.

About these practice questions

One of 747 original CISSP practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.