CVE-2018-19518: High severity PHP PHP vulnerability
Fixed bug (imapopen allows to run arbitrary shell commands via mailbox parameter). (CVE-2018-19518)
Other sources
University of Washington IMAP Toolkit 2007f on UNIX, as used in imapopen() in PHP and other products, launches an rsh command (by means of the imaprimap function in c-client/imap4r1.c and the tcpaopen function in osdep/unix/tcpunix.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.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.0.33 - Upgrade
Upgrade
debian/uw-imapto a version that resolves this vulnerability.Fixed in 8:2007f~dfsg-7 - Upgrade
Upgrade
alpine/php7to a version that resolves this vulnerability.Fixed in 7.1.29-r0
Event History
Frequently Asked Questions
What is the severity of CVE-2018-19518?
CVE-2018-19518 has a high severity rating due to its ability to execute arbitrary shell commands.
How do I fix CVE-2018-19518?
To fix CVE-2018-19518, upgrade to the appropriate remedied versions of affected packages including PHP and UW-IMAP.
Which versions are affected by CVE-2018-19518?
Affected versions include various PHP versions before 5.6.39, 7.0.x before 7.0.33, and several other specified UW-IMAP versions.
What products are impacted by CVE-2018-19518?
CVE-2018-19518 impacts products such as PHP and UW-IMAP when using the imap_open function.
Is CVE-2018-19518 a remote code execution vulnerability?
Yes, CVE-2018-19518 allows remote attackers to execute arbitrary shell commands, constituting a remote code execution vulnerability.