mediummultiple choiceObjective-mapped

A security analyst is reviewing the source code of a custom web application. The application receives JSON data from users, which includes a 'type' field. The application uses the 'type' field to determine which Java class to instantiate, and then calls a method on that object. The application does not validate or sanitize the 'type' field. An attacker sends a crafted JSON payload that causes the application to instantiate an unexpected class, leading to remote code execution. Which type of vulnerability does this example describe?

Question 1mediummultiple choice
Full question →

A security analyst is reviewing the source code of a custom web application. The application receives JSON data from users, which includes a 'type' field. The application uses the 'type' field to determine which Java class to instantiate, and then calls a method on that object. The application does not validate or sanitize the 'type' field. An attacker sends a crafted JSON payload that causes the application to instantiate an unexpected class, leading to remote code execution. Which type of vulnerability does this example describe?

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

SQL injection

SQL injection involves injecting malicious SQL code into queries via user input. The scenario does not involve any database interactions or SQL commands; it involves instantiating arbitrary classes from user-supplied data, which is characteristic of insecure deserialization, not SQL injection.

B

Distractor review

Cross-site scripting (XSS)

Cross-site scripting (XSS) is a client-side vulnerability where an attacker injects malicious scripts into web pages viewed by other users. This scenario involves server-side code execution through unsafe class instantiation, not injection of scripts into a web page, so XSS is not the correct classification.

C

Best answer

Insecure deserialization

Correct. Insecure deserialization occurs when an application deserializes untrusted data, allowing an attacker to control serialized objects or, as in this case, the class name to be instantiated. This can lead to remote code execution, denial of service, or privilege escalation.

D

Distractor review

Directory traversal

Directory traversal is an attack that exploits insufficient input validation to access files outside the web root directory. This scenario does not involve file path manipulation; it involves the insecure instantiation of arbitrary classes from untrusted data, which is a deserialization issue.

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: Insecure deserialization — This scenario describes an insecure deserialization vulnerability. Insecure deserialization occurs when an application deserializes data from an untrusted source without proper validation, allowing an attacker to manipulate serialized objects to execute arbitrary code, perform a denial-of-service attack, or bypass authentication. Here, the attacker controls the 'type' field, which is used to instantiate a class, leading to remote code execution. This is a classic example of insecure deserialization, often seen in applications that use polymorphic deserialization without restrictions.

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.