Courier-IMAP XMAILDIR变量远程Shell命令注入漏洞
发布日期:2007-04-22
更新日期:2007-04-24
受影响系统:Double Precision Courier-IMAP 4.0.1
不受影响系统:Double Precision Courier-IMAP 4.0.6-r2
描述:
BUGTRAQ ID:
23589
Courier-IMAP是Courier邮件系统中的IMAP服务程序。
Courier-IMAP对变量数据的过滤上存在漏洞,远程攻击者可能利用此漏洞在服务器上执行任意指令。
Courier-IMAP的/usr/lib/courier-imap/courier-imapd.indirect和/usr/lib/courier-imap/courier-pop3d.indirect文件没有充分检查过滤${XMAILDIR}变量,可能导致远程命令执行。假设系统中存在名为user&name的用户(“&”符号在邮件地址中是有效的),用户的maildir扩展为/var/spool/mail/domain.com/user&name。当该用户通过IMAP或POP登录时日志中会记录以下内容:
pop3d: /usr/lib/courier-imap/courier-pop3d.indirect: line 3: name: command not
found
pop3d: chdir /var/spool/mail/domain.com/user: No such file or directory
可见“&”符号能导致进程试图运行name命令。
<*来源:CJ Kucera
链接:
http://bugs.gentoo.org/show_bug.cgi?format=multiple&id=168196
http://security.gentoo.org/glsa/glsa-200704-18.xml
*>
建议:
厂商补丁:
Gentoo
------
Gentoo已经为此发布了一个安全公告(GLSA-200704-18)以及相应补丁:
GLSA-200704-18:Courier-IMAP: Remote execution of arbitrary code
链接:
http://security.gentoo.org/glsa/glsa-200704-18.xml
所有Courier-IMAP用户都应升级到最新版本:
# emerge --sync
# emerge --ask --oneshot --verbose ">=net-mail/courier-imap-4.0.6-r2"
Double Precision
----------------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://www.courier-mta.org/imap/浏览次数:4108
严重程度:0(网友投票)