WordPress NextGEN Gallery插件mode参数跨站脚本漏洞

受影响系统:

WordPress NextGEN Gallery 1.5.1
WordPress NextGEN Gallery 1.5.0

不受影响系统:

WordPress NextGEN Gallery 1.5.2

描述:
WordPress是一款免费的论坛Blog系统。

WordPress所使用的NextGEN Gallery图形库插件没有正确地转义提交给media-rss.php脚本的mode参数:

/—–
$mode = $_GET["mode"];
– —–/

如果没有选择正确的mode,该参数就被返回给用户:

/—–
} else {
    header(‘content-type:text/plain;charset=utf-8’);
    echo sprintf(__("Invalid MediaRSS command (%s).","nggallery"), $mode);
    exit;
}
– —–/

尽管插件安全的选择了Content-Type,但还不足以防范代码注入,因为一些浏览器(如Internet Explorer)通过解析web-server所返回的内容来选择内容类型,而不是遵循正确的头。

<*来源:Alejandro Rodriguez
  
  链接:
http://secunia.com/advisories/39341/
        http://marc.info/?l=bugtraq&m=127065288432427&w=2
*>

测试方法:
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

 

http://localhost/wordpress/wp-content/plugins/nextgen-gallery/xml/media-rss.php?mode=%3Cscript%3Ealert(1)%3C/script%3E

建议:

厂商补丁:

WordPress
———
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://wordpress.org/extend/plugins/nextgen-gallery/changelog/

发表评论?

0 条评论。

发表评论