XSS Payload Flashcards
(10 cards)
What is the basic payload structure for Reflected XSS?
<script> alert(1) </script>
What payload works well in an HTML context?
<img src=x onerror=alert(1)>
What payload works when injected into a JavaScript string?
’);alert(1);//
What payload can be used inside a link or URL context?
javascript:alert(1)
What payload is used in attribute injection (e.g., inside a tag)?
onmouseover=alert(1)
Which JavaScript sinks should raise red flags for XSS?
innerHTML, document.write(), eval(), setTimeout(), location.href
What tool can help generate and test XSS payloads?
Burp Suite (Intruder) or XSS cheat sheets
What should you do instead of memorizing every payload?
Understand context, maintain a personal payload bank
What GitHub resource provides common payloads for XSS?
PayloadAllTheThings
What mindset helps with building payloads on the fly?
Learn how browsers parse input and recognize injection contexts