CEH Web Application and Injection Attacks Practice Question
During a penetration test, a tester finds a web application that reflects user input in the page without sanitization. Which TWO types of XSS are potentially exploitable in this scenario?
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
✓
DOM-based XSS
Reflected XSS occurs when input is immediately returned in the response. DOM-based XSS occurs when client-side scripts process input unsafely. Stored XSS requires persistence on the server, which is not indicated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
DOM-based XSS
Why this is correct
DOM-based Cross-Site Scripting (XSS) arises when a web application's client-side script processes user-controllable data from the Document Object Model (DOM) unsafely, without sending it back to the server. The vulnerability occurs entirely within the browser, where malicious input directly modifies the DOM environment via JavaScript, leading to script execution. This typically involves a "source" like document.URL and a "sink" like eval() or innerHTML, making it a client-side vulnerability that doesn't necessarily involve server-side reflection.
- ✗
Blind XSS
Why it's wrong here
Blind XSS is a specialized form of stored Cross-Site Scripting where the malicious payload is saved on the server but is not immediately reflected back to the attacker's browser. Instead, it is triggered much later by a different user or system, often within an internal application like an administrative panel, customer support interface, or logging system. The attacker "blinds" the payload, waiting for an unsuspecting victim to interact with the stored data, making detection more challenging.
- ✗
Self-XSS
Why it's wrong here
Self-XSS is a social engineering attack rather than a direct web application vulnerability, as it requires the victim to manually paste and execute malicious JavaScript code into their own browser's developer console. The application itself does not process or reflect the input unsafely; the user is tricked into executing the script locally. Therefore, it does not represent a flaw that an attacker can exploit against other users without their direct, misguided intervention, making it distinct from exploitable XSS types.
- ✗
Stored (persistent) XSS
Why it's wrong here
Stored, or persistent, Cross-Site Scripting occurs when a malicious script is permanently saved on the target server, typically within a database, and subsequently delivered to other users without proper sanitization. Once stored, the payload is served to every user who accesses the affected web page, making it a highly impactful vulnerability. Examples include comments sections, user profiles, or forum posts where input is saved and later retrieved, affecting multiple victims over time.
- ✓
Reflected XSS
Why this is correct
Reflected Cross-Site Scripting (XSS) occurs when a malicious script injected into an HTTP request is immediately and unsafely echoed back in the web server's response. This non-persistent attack requires the victim to click a specially crafted URL containing the payload, which is then executed by their browser. The server processes the input but fails to sanitize it before reflecting it back, making it a client-side vulnerability initiated by a server-side flaw that requires user interaction for exploitation.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CEH question from scratch — 870 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.