PT0-002 Vulnerability Discovery and Analysis Practice Question
During code review, a penetration tester identifies the following line in a PHP web application: $sql = "SELECT * FROM users WHERE username='" . $_GET['user'] . "'"; Which type of vulnerability is most likely present?
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
✓
SQL injection
Direct concatenation of user input into an SQL query without sanitization results in SQL injection vulnerability.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
SQL injection
Why this is correct
Correct. Input is directly concatenated into an SQL query.
- ✗
Insecure deserialization
Why it's wrong here
Insecure deserialization is related to object serialization, not SQL.
- ✗
Command injection
Why it's wrong here
Command injection involves executing OS commands, not SQL.
- ✗
Cross-site scripting (XSS)
Why it's wrong here
XSS involves injecting client-side scripts, not SQL.
Go deeper
Related to this question
About these practice questions
One of 185 original PT0-003 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PT0-003 practice question is part of Courseiva's free CompTIA 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 PT0-003 exam.