PHP imap_open Exploit
Security researchers have discovered a zero-day vulnerability in PHP's imap_open command that could allow an authenticated attacker to achieve Remote Code Execution.
This content has been archived
This article no longer conforms to NHS Digital's standards for cyber alerts, and may contain outdated or inaccurate information. Use of this information contained in this page is at your own risk
Summary
Security researchers have discovered a zero-day vulnerability in PHP's imap_open command that could allow an authenticated attacker to achieve Remote Code Execution.
Affected platforms
The following platforms are known to be affected:
Threat details
When the imap_open command is called without the 'norsh' flag, it will attempt to authenticate an IMAP session. Debian-based operating systems map Remote Shell (RSH) to the Secure Shell (SSH) executable. SSH includes the ProxyCommand option, which provides a vector for arbitrary commands to be executed from imap_open. This bypasses any disabled exec commands in PHP.
Proof of concept code has been published that can be adapted to exploit this vulnerability with a variety of PHP applications.
Remediation steps
Last edited: 17 February 2020 1:01 pm