WordPress最新DOM XSS漏洞

暗月博客 2019年11月21日22:04:17评论425 views字数 714阅读2分22秒阅读模式
摘要

测试poc:http://website/wp-content/themes/twentyfifteen/genericons/example.html#<img src=1 onerror=alert(1)>

from:evilcos.me/?p=516

WordPress 被爆 DOM XSS 漏洞,数百万站点受影响,危险等级为极高。

该漏洞存在于 WordPress 流行的 Genericons example.html 页面中,默认主题 Twenty Fifteen 及知名插件 Jetpack 都内置了该页面,由于 example.html 使用了老版本存在 DOM XSS 缺陷的 jQuery,且使用不当,导致出现 DOM XSS,这种攻击将无视浏览器的 XSS Filter 防御。

漏洞代码:
if ( window.location.hash ) {
    permalink = "genericon-" + window.location.hash.split('#')[1];
    attr = jQuery( '.' + permalink ).attr( 'alt' );
    cssclass = jQuery( '.' + permalink ).attr('class');
    displayGlyph( attr, cssclass );
  } else {
    pickRandomIcon();
  }

测试poc:http://website/wp-content/themes/twentyfifteen/genericons/example.html#<img src=1 onerror=alert(1)>

漏洞修复:

WordPress最新DOM XSS漏洞
删除WordPress目录下所有包含1.7.2/jquery.min.js的example.html,如:
/wp-content/themes/twentyfifteen/genericons/example.html
<=1.8.3都应该删掉,不想删就把jQuery替换为新版本。

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
暗月博客
  • 本文由 发表于 2019年11月21日22:04:17
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   WordPress最新DOM XSS漏洞http://cn-sec.com/archives/72560.html

发表评论

匿名网友 填写信息