GSD-2018-19518
University of Washington IMAP Toolkit 2007f on UNIX, as used in imap_open() in PHP and other products, launches an rsh command (by means of the imap_rimap function in c-client/imap4r1.c and the tcp_aopen function in osdep/unix/tcp_unix.c) without preventing argument injection, which might allow remote attackers to execute arbitrary OS commands if the IMAP server name is untrusted input (e.g., entered by a user of a web application) and if rsh has been replaced by a program with different argument semantics. For example, if rsh is a link to ssh (as seen on Debian and Ubuntu systems), then the attack can use an IMAP server name containing a "-oProxyCommand" argument.
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
Exploit Intelligence
- some works on CVE-2018-19518 (github-poc-repo)
- houqe/EXP_CVE-2018-19518 (github-poc)
- some works on CVE-2018-19518 (github-poc)
- https://bugs.debian.org/913775 (circl)
- [debian-lts-announce] 20181217 [SECURITY] [DLA 1608-1] php5 security update (circl)
- 106018 (circl)
- https://bugs.php.net/bug.php?id=76428 (circl)
- https://antichat.com/threads/463395/#post-4254681 (circl)
- https://bugs.php.net/bug.php?id=77153 (circl)
- 45914 (circl)
…and 20 more exploits
Timeline
- Nov 27, 2018 PoC Published
- Nov 29, 2018 PoC Published
- Feb 6, 2025 PoC Published
- Feb 23, 2025 PoC Published
- Jan 27, 2026 PoC Published
- Apr 20, 2026 Distribution Patch
- Apr 20, 2026 Security Advisory
- Apr 20, 2026 Security Advisory
- Apr 20, 2026 CVE Published
References
- https://bugs.php.net/bug.php?id=77160 url
- https://security.netapp.com/advisory/ntap-20181221-0004/ url
- 1042157 vdb
- https://www.openwall.com/lists/oss-security/2018/11/22/3 url
- https://git.php.net/?p=php-src.git%3Ba=commit%3Bh=e5bfea64c81ae34816479bb05d17cdffe45adddb url
- 106018 vdb
- https://bugs.php.net/bug.php?id=76428 url
- https://antichat.com/threads/463395/#post-4254681 url
- https://bugs.php.net/bug.php?id=77153 url
- 45914 exploit
- [debian-lts-announce] 20190301 [SECURITY] [DLA 1700-1] uw-imap security update advisory
- DSA-4353 advisory
- https://github.com/Bo0oM/PHP_imap_open_exploit/blob/master/exploit.php exploit
- https://bugs.debian.org/913835 advisory
- https://bugs.debian.org/913775 advisory
- https://bugs.debian.org/913836 advisory
- [debian-lts-announce] 20181217 [SECURITY] [DLA 1608-1] php5 security update advisory
- USN-4160-1 advisory
- GLSA-202003-57 advisory
- [debian-lts-announce] 20211229 [SECURITY] [DLA 2866-1] uw-imap security update advisory