mediumMultiple ChoiceObjective-mapped
SSCP Practice Question: A database administrator notices unusual queries…
A database administrator notices unusual queries that seem to be trying to extract data via SQL injection. The application uses parameterized queries for most queries, but some dynamic queries are built using string concatenation. What is the BEST remediation?
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
✓
Rewrite all dynamic queries to use parameterized queries
Rewriting all dynamic queries to use parameterized queries separates SQL code from user data, effectively preventing SQL injection. Option A (restricting permissions) reduces damage but does not stop injection. Option B (input validation) is helpful but can be bypassed if concatenation remains. Option C (WAF) is a detection/blocking measure, not a code-level fix.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Restrict database user permissions to only necessary tables
Why it's wrong here
Least privilege limits damage but does not prevent injection.
- ✗
Implement strict input validation for all user inputs
Why it's wrong here
Input validation can reduce risk but can be bypassed; parameterization is the definitive fix.
- ✗
Deploy a web application firewall (WAF) in front of the application
Why it's wrong here
WAF is a compensating control, not a code fix.
- ✓
Rewrite all dynamic queries to use parameterized queries
Why this is correct
Parameterized queries prevent interpretation of user input as SQL code.
Go deeper
Related to this question
About these practice questions
One of 920 original SSCP 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 →
Same concept, more angles
1 more way this is tested on SSCP
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A security administrator discovers that a web application is vulnerable to SQL injection. Which of the following is the most effective mitigation to implement at the application layer?
medium- A.Implement input validation using a blacklist of SQL keywords.
- B.Encrypt the database connection using TLS.
- ✓ C.Use parameterized queries or prepared statements.
- D.Encode all output sent to the browser.
- E.Deploy a web application firewall (WAF) in front of the server.
Why C: (parameterized queries or prepared statements) is the most effective mitigation at the application layer because it ensures user input is treated as data, not executable SQL code, thus preventing SQL injection. Option A (input validation via blacklist) can be bypassed by attackers using encoding or alternative characters. Option B (encrypting the database connection with TLS) protects data in transit but does not prevent SQL injection. Option D (output encoding) addresses cross-site scripting (XSS), not SQL injection. Option E (deploying a WAF) operates at the network layer and can be circumvented; it is not an application-layer control.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SSCP 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 SSCP exam.