夜睡不着,翻SF的maillist,刚好看到有人发了条jquery导致的xss
挺有意思的.貌似作者是日本人. http://ma.la/jquery_xss/
作者给出了一个demo很简单.
1
2
3
4
5
<script type= "text/javascript" > // <![CDATA[
$( function (){
try { $(location.hash) } catch (e) {}
})
// ]]></script>
访问 http://ma.la/jquery_xss/#<img src=/ onerror=alert(1)> 就会触发xss 漏洞原因也很简单,官方已经修复.
1
$("#id") is css selector, $("<img>") is createElement, and $("#<img>") is createElement too.
亮点在最后作者给出了example,第一次看到有人这样给example: Google Code Search
from:87年 blog
查看更多关于XSS with $(location.hash) - 网站安全 - 自学php的详细内容...