Multiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

ITS Advisory Number: 
2017-079
Date(s) Issued: 
Thursday, August 31, 2017
Subject: 
Multiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution
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 remote attackers to execute arbitrary code in the context of the affected application. Failed exploitation could result in a denial-of-service condition.

Systems Affected: 
  • PHP 7.0 prior to 7.0.23
RISK
GOVERNMENT
Large and medium government entities: 
High
Small government entities: 
High
BUSINESS
Large and medium business entities: 
High
Small business entities: 
High
Home Users: 
Low
Description: 

PHP has released updates that address multiple vulnerabilities, the most severe of which could allow for arbitrary code execution. These vulnerabilities include:

  Prior to 7.0.23:

  • Fixed bug (Segfault in scanner on INF number).
  • Fixed bug (null deref and segfault in zend_generator_resume()).
  • Fixed bug (html_errors=1 breaks unhandled exceptions).
  • Fixed bug (Fixed finding CURL on systems with multiarch support).
  • Fixed bug (Null Pointer Dereference in timelib_time_clone).
  • Fixed bug (Wrong reflection on some locale_* functions).
  • Fixed bug (Segmentation fault mb_strcut with HTML-ENTITIES encoding).
  • Fixed bug (mb_convert_kana() does not convert iteration marks).
  • Fixed bug (Wrong reflection on mb_eregi_replace).
  • Fixed bug (PHP crashes when calling mysqli_result::fetch_object with an abstract class).
  • Fixed bug (include_path has a 4096 char limit in some cases).
  • Fixed bug (null pointer dereference in _function_string).
  • Fixed bug (SID constant created with wrong module number).
  • Fixed bug (nullpointer deref in simplexml_element_getDocNamespaces).
  • Fixed bug (spl_autoload_unregister can't handle spl_autoload_functions results).
  • Fixed bug (Unserialize ArrayIterator broken).
  • Fixed bug (Crash in recursive iterator destructors).
  • Fixed bug (unpack with X* causes infinity loop).
  • Fixed bug (heap-use-after-free when unserializing invalid array size).
  • Fixed bug (A Denial of Service Vulnerability was found when performing deserialization).
  • Fixed bug (WDDX uses wrong decimal separator).
  • Fixed bug (Incorrect xmlrpc serialization for classes with declared properties).

Successfully exploiting the most severe of these vulnerabilities could allow for remote attackers to execute arbitrary code in the context of the affected application. Failed exploitation could result in a denial-of-service condition.

Actions: 
  • After appropriate testing, immediately upgrade to the latest version of PHP.
  • 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: 

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.



PHP:

http://php.net/ChangeLog-7.php#7.0.23