mediumMultiple Choice
SSCP Practice Question: A company deploys a web application that…
A company deploys a web application that processes credit card payments. The development team uses parameterized queries for all database interactions. However, during a penetration test, the tester successfully injects malicious code into a search field and retrieves sensitive customer data. Which of the following is the most likely cause?
⚠ Common exam trap
SSCP often tests the assumption that 'we use parameterized queries' means the application is safe — candidates overlook that a single unparameterized code path (like a search field) reintroduces the vulnerability.
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
✓
The application uses dynamic SQL despite parameterized queries for some fields.
Parameterized queries prevent SQL injection only when they are actually used for the vulnerable input; if the search field is concatenated into a dynamic SQL string instead of being bound as a parameter, the injection succeeds despite parameterized queries being used elsewhere. The penetration test result — successful injection through the search field — points directly to that field bypassing parameterization.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The application uses dynamic SQL despite parameterized queries for some fields.
Why this is correct
Parameterised queries only protect the specific statements where they are applied. If the search field concatenates user input into dynamic SQL, that path bypasses parameterisation entirely, permitting injection. The stem's successful retrieval of sensitive data confirms an unprotected query path, not a failure of parameterisation itself.
- ✗
The web server is misconfigured to allow directory traversal.
Why it's wrong here
Directory traversal exposes filesystem paths outside the web root; it does not inject code through a search field and return database records. Traversal is the likely cause when URLs contain ../ sequences and configuration files leak, not when parameterised queries still yield customer data.
- ✗
The database server has weak permissions allowing direct query execution.
Why it's wrong here
Weak database permissions would let an attacker run queries directly, but the tester injected through the application's search field, so the flaw lies in how that input reaches the query. Permission hardening applies when attackers connect to the database directly, bypassing the application tier.
- ✗
The search field output is not sanitized, allowing stored XSS.
Why it's wrong here
Stored XSS executes script in a victim's browser; it does not let the tester retrieve sensitive customer data directly from the database. Output sanitisation is the fix when injected script persists and fires for other users, not when the injection returns query results.
Go deeper
Related to this question
About these practice questions
This SSCP question is part of Courseiva's 971-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official ISC2 exam blueprint
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.