The correct answer is SQL injection, because the attacker is manipulating the database query with crafted input. This attack works by inserting malicious SQL syntax—like `id=1 OR 1=1`—into a URL parameter, which alters the query’s logic to return unintended data or cause a database error. On the Security+ SY0-701 exam, this scenario tests your ability to distinguish between server-side database attacks and client-side script attacks; a common trap is confusing SQL injection with XSS, but remember that XSS targets the browser by injecting scripts into web pages, not the database. A key memory tip: if the attack breaks the database (e.g., a 500 error), think SQL injection; if it breaks the page’s script execution, think XSS.
SY0-701 Threats, Vulnerabilities, and Mitigations Practice Question
This SY0-701 practice question tests your understanding of threats, vulnerabilities, and mitigations. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Web application log excerpt:
Request: GET /search?q=acme' OR '1'='1'-- HTTP/1.1
Response: 500 Internal Server Error
Database log: syntax error near "OR" at line 1
Developer note: the search feature appends user input directly into the SQL query string without parameterization.
Based on the exhibit, what type of web attack is most likely taking place?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Web application log excerpt:
Request: GET /search?q=acme' OR '1'='1'-- HTTP/1.1
Response: 500 Internal Server Error
Database log: syntax error near "OR" at line 1
Developer note: the search feature appends user input directly into the SQL query string without parameterization.
A
Cross-site scripting, because the input is visible in the URL and causes an error.
Why wrong: Cross-site scripting would involve injecting script content that runs in a browser context. The exhibit shows database syntax errors tied to SQL query construction, not script execution in the client.
B
SQL injection, because the attacker is manipulating the database query with crafted input.
This is SQL injection because the input includes SQL control characters and logic that alter the intended query. The database error and the developer note about string concatenation confirm that user-supplied data is being inserted directly into SQL without parameterization. That makes the application vulnerable to query manipulation.
C
Broken authentication, because the application returns a 500 error.
Why wrong: Broken authentication involves weaknesses in login, session handling, or credential verification. A server error after crafted search input does not indicate authentication failure, so this is not the best fit.
D
Insecure deserialization, because the application is parsing attacker-controlled data.
Why wrong: Insecure deserialization usually involves tampered serialized objects leading to code execution or logic abuse. The log here shows direct SQL syntax manipulation, which is a different attack pattern.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
SQL injection, because the attacker is manipulating the database query with crafted input.
Option B is correct because the exhibit shows a URL parameter (e.g., `id=1 OR 1=1`) that is being passed to a database query. The attacker is injecting SQL syntax to manipulate the query logic, which is the hallmark of SQL injection. The 500 error likely results from the database server crashing or returning an invalid result set, confirming that the injection is affecting the database.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
Cross-site scripting, because the input is visible in the URL and causes an error.
Why it's wrong here
Cross-site scripting would involve injecting script content that runs in a browser context. The exhibit shows database syntax errors tied to SQL query construction, not script execution in the client.
✓
SQL injection, because the attacker is manipulating the database query with crafted input.
Why this is correct
This is SQL injection because the input includes SQL control characters and logic that alter the intended query. The database error and the developer note about string concatenation confirm that user-supplied data is being inserted directly into SQL without parameterization. That makes the application vulnerable to query manipulation.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
Broken authentication, because the application returns a 500 error.
Why it's wrong here
Broken authentication involves weaknesses in login, session handling, or credential verification. A server error after crafted search input does not indicate authentication failure, so this is not the best fit.
✗
Insecure deserialization, because the application is parsing attacker-controlled data.
Why it's wrong here
Insecure deserialization usually involves tampered serialized objects leading to code execution or logic abuse. The log here shows direct SQL syntax manipulation, which is a different attack pattern.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates see the input in the URL and the error message and mistakenly associate them with cross-site scripting (XSS), failing to recognize that the error is a database server response, not a client-side script execution.
Trap categories for this question
Command / output trap
Cross-site scripting would involve injecting script content that runs in a browser context. The exhibit shows database syntax errors tied to SQL query construction, not script execution in the client.
Detailed technical explanation
How to think about this question
SQL injection exploits the lack of input sanitization in dynamically constructed SQL queries, allowing an attacker to break out of the intended query context (e.g., using a single quote or `OR` clause). The 500 error often occurs when the injected SQL causes a syntax error or returns multiple rows where one is expected, crashing the application. In real-world scenarios, tools like sqlmap automate the detection and exploitation of such vulnerabilities, and mitigation involves parameterized queries (prepared statements) and input validation.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A security analyst at a medium-sized enterprise encounters this scenario during an investigation or architecture review. The correct answer reflects best practice for the specific threat or control described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Security exam questions test whether you can match controls to threats in context — not just recall definitions.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this SY0-701 question in full detail.
Threats, Vulnerabilities, and Mitigations — This question tests Threats, Vulnerabilities, and Mitigations — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: SQL injection, because the attacker is manipulating the database query with crafted input. — Option B is correct because the exhibit shows a URL parameter (e.g., `id=1 OR 1=1`) that is being passed to a database query. The attacker is injecting SQL syntax to manipulate the query logic, which is the hallmark of SQL injection. The 500 error likely results from the database server crashing or returning an invalid result set, confirming that the injection is affecting the database.
What should I do if I get this SY0-701 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SY0-701 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 SY0-701 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.