CVE-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.
What to do
Likely to be exploited: EPSS gives a 96% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | uw-imap | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | uw-imap | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | php7.2 | Fixed | 7.2.15-0ubuntu0.18.04.1 | UBUNTU-CVE-2018-19518 |
| Ubuntu 18.04 | uw-imap | Fixed | 8:2007f~dfsg-5ubuntu0.18.04.2 | UBUNTU-CVE-2018-19518 |
| Ubuntu 16.04 | php7.0 | Fixed | 7.0.33-0ubuntu0.16.04.1 | UBUNTU-CVE-2018-19518 |
| Ubuntu 16.04 | uw-imap | Fixed | 8:2007f~dfsg-4+deb8u1build0.16.04.1 | UBUNTU-CVE-2018-19518 |
| Ubuntu 14.04 | php-imap | Fixed | 5.4.6-0ubuntu5.1 | UBUNTU-CVE-2018-19518 |
| Ubuntu 14.04 | uw-imap | Fix pending | 8:2007f~dfsg-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2018-19518 |
| Debian 12 | uw-imap | Fixed | 8:2007f~dfsg-6 | DEBIAN-CVE-2018-19518 |
| Red Hat Enterprise Linux 8 | apcu-panel | Not affected | ||
| Red Hat Enterprise Linux 8 | libzip | Not affected | ||
| Red Hat Enterprise Linux 8 | libzip-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | libzip-tools | Not affected | ||
| Red Hat Enterprise Linux 8 | php | Not affected | ||
| Red Hat Enterprise Linux 8 | php-bcmath | Not affected | ||
| Red Hat Enterprise Linux 8 | php-cli | Not affected | ||
| Red Hat Enterprise Linux 8 | php-common | Not affected | ||
| Red Hat Enterprise Linux 8 | php-dba | Not affected | ||
| Red Hat Enterprise Linux 8 | php-dbg | Not affected | ||
| Red Hat Enterprise Linux 8 | php-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | php-embedded | Not affected | ||
| Red Hat Enterprise Linux 8 | php-enchant | Not affected | ||
| Red Hat Enterprise Linux 8 | php-ffi | Not affected | ||
| Red Hat Enterprise Linux 8 | php-fpm | Not affected | ||
| Red Hat Enterprise Linux 8 | php-gd | Not affected | ||
| Red Hat Enterprise Linux 8 | php-gmp | Not affected | ||
| Red Hat Enterprise Linux 8 | php-intl | Not affected | ||
| Red Hat Enterprise Linux 8 | php-json | Not affected | ||
| Red Hat Enterprise Linux 8 | php-ldap | Not affected | ||
| Red Hat Enterprise Linux 8 | php-mbstring | Not affected | ||
| Red Hat Enterprise Linux 8 | php-mysqlnd | Not affected | ||
| Red Hat Enterprise Linux 8 | php-odbc | Not affected | ||
| Red Hat Enterprise Linux 8 | php-opcache | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pdo | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pear | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pecl-apcu | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pecl-apcu-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pecl-rrd | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pecl-xdebug | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pecl-xdebug3 | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pecl-zip | Not affected | ||
| Red Hat Enterprise Linux 8 | php-pgsql | Not affected | ||
| Red Hat Enterprise Linux 8 | php-process | Not affected | ||
| Red Hat Enterprise Linux 8 | php-recode | Not affected | ||
| Red Hat Enterprise Linux 8 | php-snmp | Not affected | ||
| Red Hat Enterprise Linux 8 | php-soap | Not affected | ||
| Red Hat Enterprise Linux 8 | php-xml | Not affected | ||
| Red Hat Enterprise Linux 8 | php-xmlrpc | Not affected | ||
| Red Hat Enterprise Linux 7 | php | Not affected | ||
| Red Hat Enterprise Linux 7 | php-bcmath | Not affected | ||
| Red Hat Enterprise Linux 7 | php-cli | Not affected | ||
| Red Hat Enterprise Linux 7 | php-common | Not affected | ||
| Red Hat Enterprise Linux 7 | php-dba | Not affected | ||
| Red Hat Enterprise Linux 7 | php-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | php-embedded | Not affected | ||
| Red Hat Enterprise Linux 7 | php-enchant | Not affected | ||
| Red Hat Enterprise Linux 7 | php-fpm | Not affected | ||
| Red Hat Enterprise Linux 7 | php-gd | Not affected | ||
| Red Hat Enterprise Linux 7 | php-intl | Not affected | ||
| Red Hat Enterprise Linux 7 | php-ldap | Not affected | ||
| Red Hat Enterprise Linux 7 | php-mbstring | Not affected | ||
| Red Hat Enterprise Linux 7 | php-mysql | Not affected | ||
| Red Hat Enterprise Linux 7 | php-mysqlnd | Not affected | ||
| Red Hat Enterprise Linux 7 | php-odbc | Not affected | ||
| Red Hat Enterprise Linux 7 | php-pdo | Not affected | ||
| Red Hat Enterprise Linux 7 | php-pgsql | Not affected | ||
| Red Hat Enterprise Linux 7 | php-process | Not affected | ||
| Red Hat Enterprise Linux 7 | php-pspell | Not affected | ||
| Red Hat Enterprise Linux 7 | php-recode | Not affected | ||
| Red Hat Enterprise Linux 7 | php-snmp | Not affected | ||
| Red Hat Enterprise Linux 7 | php-soap | Not affected | ||
| Red Hat Enterprise Linux 7 | php-xml | Not affected | ||
| Red Hat Enterprise Linux 7 | php-xmlrpc | Not affected | ||
| Red Hat Enterprise Linux 6 | php | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-bcmath | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-cli | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-common | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-dba | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-embedded | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-enchant | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-fpm | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-gd | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-imap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-intl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-ldap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-mbstring | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-mysql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-odbc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-pdo | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-pgsql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-process | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-pspell | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-recode | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-soap | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-tidy | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-xml | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-xmlrpc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-zts | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | php | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | php53 | Will not fix Will not fix | ||
| Alpine Linux 3.7 | php7 | Fixed | 7.1.29-r0 | ALPINE-CVE-2018-19518 |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://www.debian.org/security/2018/dsa-4353 (vendor-advisory)
- https://usn.ubuntu.com/4160-1/ (vendor-advisory)
- https://security.gentoo.org/glsa/202003-57 (vendor-advisory)
References
- https://bugs.php.net/bug.php?id=77160
- https://www.exploit-db.com/exploits/45914/
- https://lists.debian.org/debian-lts-announce/2019/03/msg00001.html
- https://security.netapp.com/advisory/ntap-20181221-0004/
- http://www.securitytracker.com/id/1042157
- https://www.debian.org/security/2018/dsa-4353
- 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
- http://www.securityfocus.com/bid/106018
- 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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.