WordPress最新DOM XSS漏洞

作者:hack1990 时间:15-05-11 阅读数:979人阅读

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目录下所有包含1.7.2/jquery.min.js的example.html,如: 

/wp-content/themes/twentyfifteen/genericons/example.html 

<=1.8.3都应该删掉,不想删就把jQuery替换为新版本。


评论列表

  •  
    an9
    发布于 2015-05-22 20:58:40  回复
  • 安全很重要。不过,一般个人小博客也没必要太担心。

发表评论