跳到正文

imap_open()允许通过mailbox参数运行任意shell命令

严重 已验证 漏洞情报武器化

漏洞描述

UNIX上的University of Washington IMAP Toolkit 2007f ,用于PHP和其他产品中的imap_open(),启动rsh命令(通过c-client / imap4r1.c中的imap_rimap函数和osdep/unix/tcp_unix.c中的tcp_aopen函数 )不阻止参数注入,如果IMAP服务器名称是不可信输入(例如,由Web应用程序的用户输入)并且rsh已被具有不同参数的程序替换,则可能允许远程攻击者执行任意OS命令语义。例如,如果rsh是指向ssh的链接(如Debian和Ubuntu系统上所示),则攻击可以使用包含“-oProxyCommand”参数的IMAP服务器名称。

解决建议

建议您更新当前系统或软件至最新版,完成漏洞的修复。

参考链接

http://www.securityfocus.com/bid/106018
http://www.securitytracker.com/id/1042157
https://antichat.com/threads/463395/#post-4254681
https://bugs.debian.org/913775
https://bugs.debian.org/913835
https://bugs.debian.org/913836
https://bugs.php.net/bug.php?id=76428
https://bugs.php.net/bug.php?id=77153
https://bugs.php.net/bug.php?id=77160
https://git.php.net/?p=php-src.git;a=commit;h=e5bfea64c81ae34816479bb05d17cdffe45adddb
https://github.com/Bo0oM/PHP_imap_open_exploit/blob/master/exploit.php
https://lists.debian.org/debian-lts-announce/2018/12/msg00006.html
https://lists.debian.org/debian-lts-announce/2019/03/msg00001.html
https://lists.debian.org/debian-lts-announce/2021/12/msg00031.html
https://security.gentoo.org/glsa/202003-57
https://security.netapp.com/advisory/ntap-20181221-0004/
https://usn.ubuntu.com/4160-1/
https://www.debian.org/security/2018/dsa-4353
https://www.exploit-db.com/exploits/45914/
https://www.openwall.com/lists/oss-security/2018/11/22/3