https://en.wikipedia.org/wiki/Cross-site_scripting
Definition
Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications.
XSS enables attackers to inject client-side scripts into web pages viewed by other users.
A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy.
Cross-site scripting carried out on websites accounted for roughly 84% of all security vulnerabilities documented by Symantec as of 2007.[1]
Bug bounty company HackerOne in 2017 reported that XSS is still a major threat vector.[2]
XSS effects vary in range from petty nuisance to significant security risk, depending on the sensitivity of the data handled by the vulnerable site and the nature of any security mitigation implemented by the site's owner.
Types
There is no single, standardized classification of cross-site scripting flaws, but most experts distinguish between at least two primary flavors of XSS flaws: non-persistent and persistent.
Some sources further divide these two groups into traditional (caused by server-side code flaws) and DOM-based (in client-side code).
Non-persistent (reflected)
Persistent (or stored)
Server-side versus DOM-based vulnerabilities
Self-XSS
Mutated XSS (mXSS)
Example
https://www.owasp.org/images/2/22/20110412-aspnet_viewstate_security-alexandre.pdf