CVE-2018-19518: High severity PHP PHP vulnerability

Published Nov 25, 2018
·
Updated

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

13 affected componentsFixes available
PHP PHP<7.0.33
7.0.33
PHP PHP>=5.6.0<=5.6.38
PHP PHP>=7.0.0<=7.0.32
PHP PHP>=7.1.0<=7.1.24
PHP PHP>=7.2.0<=7.2.12
Debian Debian Linux=8.0
Debian Debian Linux=9.0
Uw-imap Project Uw-imap=2007f
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=19.04
debian/uw-imap
8:2007f~dfsg-7
alpine/php7<7.1.29-r0
7.1.29-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 7.0.33
  2. Upgrade

    Upgrade debian/uw-imap to a version that resolves this vulnerability.

    Fixed in 8:2007f~dfsg-7
  3. Upgrade

    Upgrade alpine/php7 to a version that resolves this vulnerability.

    Fixed in 7.1.29-r0

Event History

Nov 25, 2018
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·10:00 AM
Data Sourced
via MITRE·10:00 AM
Description
Data Sourced
via NVD·10:29 AM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·10:29 AM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203