The more of these documents that I have made I have realized that there is a pretty big difference between what you learn from PortSwigger and OWASP. I find that OWASP provides good foundational documentation of the vulnerabilities whereas PortSwigger shows you the practical side of the vulnerabilities. To start I am going to be looking at the threat agents and attack vectors as well as the impacts.
“Threat Agents/Attack Vectors: Automated tools can detect and exploit all three forms of XSS, and there are freely available exploitation frameworks.”
“Impacts: The impact of XSS is moderate for reflected and DOM XSS, and severe for stored XSS, with remote code execution on the victim’s browser, such as stealing credentials, sessions, or delivering malware to the victim.”
Now that we have a good base understanding we will look at how to tell if an application is vulnerable.
- Stored XSS: The application or API stores unsanitized user input that is viewed at a later time by another user or an administrator. Stored XSS is often considered a high or critical risk.
How does XSS work?
Types of XSS
- 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.