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替换为新版本。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论