Skip to content
OpenAdvisories
Unscored Public exploit CVE-2018-19518 EUVD-2018-11207GHSA-5qmr-54g6-4256

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…

Published Nov 25, 2018 · Updated Aug 5, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
Ubuntu Pro 14.04 LTS uw-imap 8:2007f~dfsg-2ubuntu0.1~esm1 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
SLES for SAP 11 SP4 php53 5.3.17-112.45.1 SUSE-SU-2018:3986-1
ReleasePackageFixed inAdvisory
Alpine v3.7 php7 7.1.29-r0 —

Azure Linux

ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Exploit-DB 1

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 12

References