CIS Logo
tagline: Confidence in the Connected World
HomeResourcesAdvisoriesMultiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

Multiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

MS-ISAC ADVISORY NUMBER:

2018-071

DATE(S) ISSUED:

06/26/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.7
  • PHP 7.1 prior to 7.1.19

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:
LOW

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.7

  • Bug #76174 (openssl extension fails to build with LibreSSL 2.7).
  • Bug #76296 (openssl_pkey_get_public does not respect open_basedir).
  • Bug #76333 (PHP built-in server does not find files if root path contains special characters).
  • Bug #76335 ("link(): Bad file descriptor" with non-ASCII path).
  • Bug #76337 (segfault when opcache enabled + extension use zend_register_class_alias).
  • Bug #76367 (NoRewindIterator segfault 11).
  • Bug #76410 (SIGV in zend_mm_alloc_small).

Version 7.1.19

  • Bug #76174 (openssl extension fails to build with LibreSSL 2.7).
  • Bug #76296 (openssl_pkey_get_public does not respect open_basedir).
  • Bug #76333 (PHP built-in server does not find files if root path contains special characters).
  • Bug #76335 ("link(): Bad file descriptor" with non-ASCII path).
  • Bug #76367 (NoRewindIterator segfault 11).
  • Bug #76383 (array_map on $GLOBALS returns IS_INDIRECT).

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.

NOTE: Visiting these links may trigger an IDS signature match for a Possible Encrypted Webshell Download. This is a false positive alert that is matching content on the pages below.

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

Information Hub : Advisories