What's the difference between stored and reflected XSS?
James Olson
Updated on April 15, 2026
Also question is, what is the difference between reflected and stored XSS vulnerabilities?
Stored XSS means that some persistant data (typically stored in a database) are not sanitized in a page, which implies that everyone can be affected by the vulnerability. Reflected XSS, on the contrary, means that non-persistent data (generally data provided by the client through form submission) are not escaped.
Subsequently, question is, what may an attacker achieve using reflected XSS? Impact of reflected XSS attacks
Amongst other things, the attacker can: Perform any action within the application that the user can perform. View any information that the user is able to view. Modify any information that the user is able to modify.
Secondly, what is a reflected XSS?
Reflected XSS attacks, also known as non-persistent attacks, occur when a malicious script is reflected off of a web application to the victim's browser. The script is activated through a link, which sends a request to a website with a vulnerability that enables execution of malicious scripts.
What are the common defenses against XSS?
5 Answers
- Specifying a charset.
- HTML escaping.
- Other types of escaping.
- Validating URLs and CSS values.
- Not allowing user-provided HTML.
- Preventing DOM-based XSS.
Related Question Answers
What are stored XSS attacks?
Stored XSS, also known as persistent XSS, is the more damaging of the two. It occurs when a malicious script is injected directly into a vulnerable web application. Reflected XSS involves the reflecting of a malicious script off of a web application, onto a user's browser.What are two primary types of XSS vulnerabilities?
What are the types of XSS attacks?- Reflected XSS, where the malicious script comes from the current HTTP request.
- Stored XSS, where the malicious script comes from the website's database.
- DOM-based XSS, where the vulnerability exists in client-side code rather than server-side code.
Is Reflected XSS dangerous?
Reflected XSS attacks are less dangerous than stored XSS attacks, which cause a persistent problem when users visit a particular page, but are much more common. Any page that takes a parameter from a GET or POST request and displays that parameter back to the user in some fashion is potentially at risk.Which is called second level XSS?
2.3 Type 2Known as the persistent, stored, or second-order XSS vulnerability, it occurs when user-provided data is stored on a web server and then later displayed to other users without being encoded using HTML entities.