easymultiple choiceObjective-mapped

A login form sends user input directly into a database query. When a tester enters a single quote character, the application returns a database error. What attack is most likely?

Question 1easymultiple choice
Full question →

A login form sends user input directly into a database query. When a tester enters a single quote character, the application returns a database error. What attack is most likely?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Cross-site scripting

Cross-site scripting injects script code into content viewed in a browser. A database error from a single quote points to a backend query issue instead.

B

Best answer

SQL injection

This is SQL injection because the application appears to concatenate unsanitized input into a database query. A single quote often breaks query syntax and reveals that user input is being interpreted as part of the SQL command. That is a common sign the application is vulnerable to injection attacks.

C

Distractor review

Session hijacking

Session hijacking involves stealing or reusing a valid session token. The error shown here happens before session reuse and points to the database layer.

D

Distractor review

Insecure deserialization

Insecure deserialization involves unsafe handling of serialized objects, often leading to logic abuse or code execution. That is not what the login form behavior suggests.

Common exam trap

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Technical deep dive

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

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.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • 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.

Related practice questions

Related SY0-701 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this SY0-701 question test?

Read the scenario before looking for a memorised answer.

What is the correct answer to this question?

The correct answer is: SQL injection — The best answer is SQL injection because the application appears to build a database query directly from user input. A single quote often breaks the SQL syntax and causes a database error, which is a classic clue. This means the input is not being safely parameterized or validated before reaching the database layer. Why others are wrong: Cross-site scripting affects the browser through injected script, not a backend database query error. Session hijacking requires a stolen or reused session token, which is not present here. Insecure deserialization is about processing unsafe serialized data, which is unrelated to the login error described.

What should I do if I get this SY0-701 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.