Courseiva
Web Application and Injection AttackseasyMultiple ChoiceObjective-mapped

CEH Web Application and Injection Attacks Practice Question

Which of the following describes the difference between reflected and stored (persistent) cross-site scripting (XSS)?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Reflected XSS is non-persistent and requires user interaction, while stored XSS is persistent and can affect multiple users

Reflected XSS is injected via the current request (e.g., URL parameter) and the script reflects immediately in the response. Stored XSS is saved on the server (e.g., in a database) and executed when other users view the affected page.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Reflected XSS is a server-side vulnerability, while stored XSS is a client-side vulnerability

    Why it's wrong here

    This statement is incorrect because both Reflected and Stored Cross-Site Scripting (XSS) are fundamentally client-side vulnerabilities. While the server plays a role in processing or storing the malicious payload, the actual exploitation and execution of the script occur within the victim's web browser. The vulnerability arises from the browser's trust in content received from the server, which then executes unvalidated or improperly encoded data as legitimate script.

  • Reflected XSS is non-persistent and requires user interaction, while stored XSS is persistent and can affect multiple users

    Why this is correct

    This statement accurately describes the core differences. Reflected XSS is non-persistent because the malicious payload is delivered via a crafted URL or form submission and is immediately reflected in the server's response, requiring the victim to click a specific link. In contrast, Stored XSS is persistent; the malicious script is permanently saved on the target server (e.g., in a database) and is then served to any user who accesses the vulnerable web page, affecting multiple users without individual interaction beyond visiting the compromised page.

  • Reflected XSS only works with HTTP POST requests, while stored XSS works with GET requests

    Why it's wrong here

    This option is incorrect as Reflected XSS is not limited to HTTP POST requests; it can equally occur when malicious input is passed via URL parameters in an HTTP GET request. The method depends on where the application reflects user-supplied data. Stored XSS, on the other hand, is entirely independent of the HTTP request method used by the victim to retrieve the page; the payload is already stored server-side and delivered regardless of whether the victim's browser uses GET or POST to access the vulnerable resource.

  • Reflected XSS is triggered by the server, while stored XSS is triggered by the client

    Why it's wrong here

    This statement is inaccurate because the execution of the malicious script for both Reflected and Stored XSS is always "triggered" by the client's web browser. The server's role is to either reflect the payload back (Reflected XSS) or serve the pre-stored payload (Stored XSS). The browser then interprets and executes the script within the context of the vulnerable website, making the client the point of execution for both types.

About these practice questions

One of 870 original CEH practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on CEH

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which TWO of the following are characteristics of stored (persistent) XSS?

easy
  • A.The attack requires the victim to click a crafted link
  • B.The payload is reflected immediately in the response
  • C.The malicious script is stored on the server (e.g., in a database)
  • D.The attack only works if the victim is logged in
  • E.The attack can affect multiple users without direct interaction

Why C: Stored XSS involves malicious script being permanently stored on the server (e.g., in a database) and executed whenever the stored content is accessed. It does not require a crafted link, and it can affect multiple users without direct interaction.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CEH practice question is part of Courseiva's free EC-Council 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 CEH exam.