Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | uw-imap | 8:2007f~dfsg-6 | — |
| Debian 9 | php7.0 | 7.0.33-0+deb9u1 | DSA-4353-1 |
| Debian 9 | uw-imap | 8:2007f~dfsg-5+deb9u1 | DLA-2866-1 |
| Debian 8 | php5 | 5.6.39+dfsg-0+deb8u1 | DLA-1608-1 |
| Debian 8 | uw-imap | 8:2007f~dfsg-4+deb8u1 | DLA-1700-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | php7.2 | 7.2.15-0ubuntu0.18.04.1 | — |
| Ubuntu 18.04 LTS | uw-imap | 8:2007f~dfsg-5ubuntu0.18.04.2 | USN-4160-1 |
| Ubuntu 16.04 LTS | php7.0 | 7.0.33-0ubuntu0.16.04.1 | — |
| Ubuntu 16.04 LTS | uw-imap | 8:2007f~dfsg-4+deb8u1build0.16.04.1 | USN-4160-1 |
| Ubuntu 14.04 LTS | php-imap | 5.4.6-0ubuntu5.1 | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 14.04 LTS | uw-imap | 8:2007f~dfsg-2ubuntu0.1~esm1 | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP4 | php5 | 5.5.14-109.45.2 | SUSE-SU-2018:3995-1 |
| SLES 12 SP4 | php7 | 7.0.7-50.56.2 | SUSE-SU-2018:3988-1 |
| SLES 12 SP3 | php5 | 5.5.14-109.45.2 | SUSE-SU-2018:3995-1 |
| SLES 12 SP3 | php7 | 7.0.7-50.56.2 | SUSE-SU-2018:3988-1 |
| SLES 12 | php5 | 5.5.14-109.45.2 | SUSE-SU-2018:3995-1 |
| SLES 12 | php7 | 7.0.7-50.56.2 | SUSE-SU-2018:3988-1 |
| SLES 11 SP4 | php53 | 5.3.17-112.45.1 | SUSE-SU-2018:3986-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 11 SP4 | php53 | 5.3.17-112.45.1 | SUSE-SU-2018:3986-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.7 | php7 | 7.1.29-r0 | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | uw-imap | No fix yet | — |
| Azure Linux 2 (CBL-Mariner) | uw-imap | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
php imap_open Remote Code Execution
exploit/linux/http/php_imap_open_rce
Exploit-DB 1
- PHP imap_open - Remote Code Execution (Metasploit) EDB-45914 · remote · Nov 29, 2018 · verified
GitHub 2 repositories
-
houqe/EXP_CVE-2018-19518 ★ 4 · Apr 15, 2023
-
ensimag-security/CVE-2018-19518 ★ 0 · Dec 31, 2018
some works on CVE-2018-19518
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 12
- ICSA-26-239-02 All-Line Equipment Company Fuel-Boss CISA ICS & IT advisories · Aug 27, 2026
- USN-4160-1 uw-imap vulnerability Ubuntu Security Notices (USN) · Apr 22, 2026
- DSA-4353-1 php7.0 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1700-1 uw-imap - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-2866-1 uw-imap - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1608-1 php5 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2018:3986-1 Recommended update for php53 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:3995-1 Recommended update for php5 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:3988-1 Recommended update for php7 SUSE / openSUSE Security Updates · Feb 4, 2026
- FSA-202302 Festo: Several vulnerabilities in FactoryViews CERT@VDE · Feb 2, 2026
- ICSA-26-027-02 Festo Didactic SE MES PC CISA ICS & IT advisories · Jan 27, 2026
- FSA-202402 Several Vulnerabilities in MES PC (Windows 10) CERT@VDE · Dec 8, 2025
References
- https://bugs.php.net/bug.php?id=77160
- 45914 exploit
- [debian-lts-announce] 20190301 [SECURITY] [DLA 1700-1] uw-imap security update mailing-list
- https://security.netapp.com/advisory/ntap-20181221-0004/
- 1042157 vdb-entry
- DSA-4353 vendor-advisory
- https://github.com/Bo0oM/PHP_imap_open_exploit/blob/master/exploit.php
- https://bugs.debian.org/913835
- https://www.openwall.com/lists/oss-security/2018/11/22/3
- https://git.php.net/?p=php-src.git%3Ba=commit%3Bh=e5bfea64c81ae34816479bb05d17cdffe45adddb
- 106018 vdb-entry
- https://bugs.php.net/bug.php?id=76428
- https://bugs.debian.org/913775
- https://bugs.debian.org/913836
- https://antichat.com/threads/463395/#post-4254681
- https://bugs.php.net/bug.php?id=77153
- [debian-lts-announce] 20181217 [SECURITY] [DLA 1608-1] php5 security update mailing-list
- USN-4160-1 vendor-advisory
- GLSA-202003-57 vendor-advisory
- [debian-lts-announce] 20211229 [SECURITY] [DLA 2866-1] uw-imap security update mailing-list