Squirrelmail plugin.php PHP远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1110378 漏洞类型 输入验证
发布时间 2006-06-02 更新时间 2007-08-01
CVE编号 CVE-2006-2842 CNNVD-ID CNNVD-200606-129
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/27948
https://www.securityfocus.com/bid/18231
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200606-129
|漏洞详情
SquirrelMail是一个多功能的用PHP4实现的Webmail程序,可运行于Linux/Unix类操作系统下。Squirrelmail1.4.6版本的functions/plugin.php文件中存在文件包含漏洞。远程攻击者可借助插件数组参数中的URL执行任意PHP代码。相关代码如下:if(isset($plugins)&&is_array($plugins)){foreach($pluginsas$name){use_plugin($name);}...functionuse_plugin($name){if(file_exists(SM_PATH."plugins/$name/setup.php")){include_once(SM_PATH."plugins/$name/setup.php");$function="squirrelmail_plugin_init_$name";if(function_exists($function)){$function();}}}....如果打开了register_globals功能的话,攻击者就可以控制$name变量,导致执行任意代码。
|漏洞EXP
source: http://www.securityfocus.com/bid/18231/info

SquirrelMail is prone to a local file-include vulnerability because it fails to properly sanitize user-supplied input.

A successful exploit may allow unauthorized users to view files and to execute local scripts; other attacks are also possible.

http://www.example.com/[squirrelmail dir]/src/redirect.php?plugins[]=../../../../etc/passwd%00
|受影响的产品
SuSE SUSE Linux Enterprise Server 8 + Linux kernel 2.4.21 + Linux kernel 2.4.19 SuSE SUSE Linux Enterprise Server 10 SuSE S
|参考资料

来源:www.squirrelmail.org
链接:http://www.squirrelmail.org/security/issue/2006-06-01
来源:VUPEN
名称:ADV-2006-2101
链接:http://www.frsirt.com/english/advisories/2006/2101
来源:squirrelmail.cvs.sourceforge.net
链接:http://squirrelmail.cvs.sourceforge.net/squirrelmail/squirrelmail/functions/global.php?r1=1.27.2.16&r2=1.27.2.17&view=patch&pathrev=SM-1_4-STABLE
来源:SECUNIA
名称:20406
链接:http://secunia.com/advisories/20406
来源:BID
名称:18231
链接:http://www.securityfocus.com/bid/18231
来源:BUGTRAQ
名称:20060601Squirrelmaillocalfileinclusion
链接:http://www.securityfocus.com/archive/1/archive/1/435605/100/0/threaded
来源:SECTRACK
名称:1016209
链接:http://securitytracker.com/id?1016209
来源:BID
名称:25159
链接:http://www.securityfocus.com/bid/25159
来源:REDHAT
名称:RHSA-2006:0547
链接:http://www.redhat.com/support/errata/RHSA-2006-0547.html
来源:SUSE
名称:SUSE-SR:2006:017
链接:http://www.novell.com/linux/security/advisories/2006_17_sr.html
来源:MANDRIVA
名称:MDKSA-2006:101
链接:http://www.mandriva.com/security/advisories?name=MDKSA-2006:101
来源:VUPE