mediummultiple choiceObjective-mapped

A company portal lets employees save a short profile bio. One employee enters a string containing script code, and later other users who view that profile are redirected to a fake sign-in page. What vulnerability best explains this behavior?

Question 1mediummultiple choice
Full question →

A company portal lets employees save a short profile bio. One employee enters a string containing script code, and later other users who view that profile are redirected to a fake sign-in page. What vulnerability best explains this behavior?

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

Reflected cross-site scripting, because the payload only appears in the current request response.

Reflected XSS is returned immediately in the response, but this scenario affects later viewers after the content is saved.

B

Best answer

Stored cross-site scripting, because the malicious script is saved and served to other users later.

Stored XSS occurs when malicious script is persisted by the application, such as in a profile field, comment, or message. Every user who later loads the page receives the harmful content. The redirection to a fake sign-in page shows that the script is executing in other users’ browsers, which makes this a stored, not reflected, attack. Proper output encoding and input handling are needed to prevent it.

C

Distractor review

Command injection, because the script runs inside the web server process.

Command injection targets operating system commands on the server, not client-side script execution in another user’s browser.

D

Distractor review

Session fixation, because the attacker wants the victim to use an old session ID.

Session fixation involves controlling or reusing a session token, which is not what this profile-field script is doing.

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: Stored cross-site scripting, because the malicious script is saved and served to other users later. — This is stored cross-site scripting. The malicious script is saved in the application’s data store and later rendered to other users when they view the profile. Because the payload executes in their browsers, it can steal credentials, redirect users, or perform actions on their behalf. The key clue is persistence across page views and impact on multiple users rather than only on the original submission request. Why others are wrong: Reflected XSS appears only in the immediate response to a request, not later when someone else views saved content. Command injection would execute on the server, not in the browser. Session fixation involves controlling a session identifier and does not explain script execution from a stored profile field. The persistence and cross-user impact point directly to stored XSS.

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.