CIS Logo
tagline: Confidence in the Connected World

Multiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

MS-ISAC ADVISORY NUMBER:

2018-113

DATE(S) ISSUED:

10/12/2018

OVERVIEW:

Multiple vulnerabilities have been discovered in PHP, the most severe of which could allow an attacker to execute arbitrary code. PHP is a programming language originally designed for use in web-based applications with HTML content. PHP supports a wide variety of platforms and is used by numerous web-based software applications. Successfully exploiting the most severe of these vulnerabilities could allow for arbitrary code execution in the context of the affected application. Depending on the privileges associated with the application, an attacker could install programs; view, change, or delete data; or create new accounts with full user rights. Failed exploitation could result in a denial-of-service condition.

THREAT INTELLIGENCE:

There are currently no reports of these vulnerabilities being exploited in the wild.

SYSTEMS AFFECTED:

  • PHP 7.2 prior to 7.2.11
  • PHP 7.1 prior to 7.1.23

RISK:

Government:
  • Large and medium government entities: HIGH
  • Small government entities: HIGH
Businesses:
  • Large and medium business entities: HIGH
  • Small business entities: HIGH
Home Users:
HIGH

TECHNICAL SUMMARY:

Multiple vulnerabilities have been discovered in PHP, the most severe of which could allow an attacker to execute arbitrary code. Details of these vulnerabilities are as below:

Version 7.2.11

  • Bug #76796 (Compile-time evaluation of disabled function in opcache causes segfault).
  • Bug #76800 (foreach inconsistent if array modified during loop).

Version 7.2.11 & Version 7.1.23

  • Bug #66828 (iconv_mime_encode Q-encoding longer than it should be).
  • Bug #73457 (Wrong error message when fopen FTP wrapped fails to open data connection).
  • Bug #74454 (Wrong exception being thrown when using ReflectionMethod).
  • Bug #74764 (Bindto IPv6 works with file_get_contents but fails with stream_socket_client).
  • Bug #75273 (php_zlib_inflate_filter() may not update bytes_consumed).
  • Bug #75533 (array_reduce is slow when $carry is large array).
  • Bug #75696 (posix_getgrnam fails to print details of group).
  • Bug #76480 (Use curl_multi_wait() so that timeouts are respected).
  • Bug #76832 (ZendOPcache.MemoryBase periodically deleted by the OS).
  • Bug #76846 (Segfault in shutdown function after memory limit error).
  • Bug #76901 (method_exists on SPL iterator passthrough method corrupts memory).

Successfully exploiting the most severe of these vulnerabilities could allow for arbitrary code execution in the context of the affected application. Depending on the privileges associated with the application, an attacker could install programs; view, change, or delete data; or create new accounts with full user rights. Failed exploitation could result in a denial-of-service condition.

RECOMENDATIONS:

We recommend the following actions be taken:

  • Upgrade to the latest version of PHP immediately, after appropriate testing.
  • Verify no unauthorized system modifications have occurred on system before applying patch.
  • Apply the principle of Least Privilege to all systems and services.
  • Remind users not to visit websites or follow links provided by unknown or untrusted sources.

REFERENCES:

Get Email Updates When Cyber Threats Like This Arise

Arrow Subscribe to Advisories

Protect Your Systems from Cyber Threats Like This

CIS Controls That Help Avoid This Issue Arrow CIS Control 3: Continuous Vulnerability Assessment and Remediation Arrow CIS Control 18: Application Software Security