Multiple Vulnerabilities in PHP Allow for Arbitrary Code Execution

ITS Advisory Number: 
2016-056
Date(s) Issued: 
Thursday, April 7, 2016
Subject: 
Multiple Vulnerabilities in PHP Allow for Arbitrary Code Execution
Overview: 

Multiple vulnerabilities have been discovered in PHP which could allow an attacker to potentially 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 these issues may allow remote attackers to execute arbitrary code in the context of a webserver.

Systems Affected: 
  • PHP 7.0 prior to 7.0.4

  • PHP 5.6 prior to 5.6.19

  • PHP 5.5 prior to 5.5.33

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: 

Multiple vulnerabilities has been discovered in PHP, which could allow an attacker to execute remote code; PHP has released updates that addresses these vulnerabilities. These vulnerabilities include:

 

Prior to 7.0.4

  • Bug 71450 (An integer overflow in php_str_to_str_ex()).

  • Bug 71637 (Multiple Heap Overflow due to integer overflows in xml/filter_url/addcslashes).

 

Successful exploitation of these vulnerabilities may allow remote attackers to execute arbitrary code in the context of the webserver. Other bugs fixed in PHP for these versions may be found below:

  

  • Bug 71441 (Typehinted Generator with return in try/finally crashes).

  • Bug 71442 (forward_static_call crash).

  • Bug 71443 (Segfault using built-in webserver with intl using symfony).

  • Bug 71449 (An integer overflow in php_implode()).

  • Bug 71474 (Crash because of VM stack corruption on Magento2).

  • Bug 71485 (Return typehint on internal func causes Fatal error when it throws exception).

  • Bug 71529 (Variable references on array elements don't work when using count).

  • Bug 71601 (finally block not executed after yield from).

 

Prior to 5.6.19

  • Bug 62172 (FPM not working with Apache httpd 2.4 balancer/fcgi setup).

  • Bug 68078 (Datetime comparisons ignore microseconds).

  • Bug 70720 (strip_tags improper php code parsing).

  • Bug 71434 (finfo throws notice for specific python file).

  • Bug 71498 (Out-of-Bound Read in phar_parse_zipfile()).

  • Bug 71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_multi_exec).

  • Bug 71525 (Calls to date_modify will mutate timelib_rel_time, causing date_date_set issues).

  • Bug 71540 (NULL pointer dereference in xsl_ext_function_php()).

  • Bug 71559 (Built-in HTTP server, we can download file in web by Bug).

  • Bug 71561 (NULL pointer dereference in Zip::ExtractTo).

  • Bug 71584 (Possible use-after-free of ZCG(cwd) in Zend Opcache).

 

Prior to 5.5.33

  • Bug 71498 (Out-of-Band Read in phar_parse_zipfile())

Actions: 
  • After appropriate testing upgrade to the latest version of PHP

  • Apply the principle of Least Privilege to all systems and services

  • Verify no unauthorized system modifications have occurred on system before applying patch