网络安全 频道

CourierIMAPXMAILDIR远程Shell命令注入漏洞

    受影响系统:
    Double Precision Courier-IMAP 4.0.1

    不受影响系统:
    Double Precision Courier-IMAP 4.0.6-r2

    描述:
    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命令。

    厂商补丁:
    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/

0
相关文章