Multiple Vulnerabilities in PHP Could Allow Arbitrary Code Execution

ITS Advisory Number: 
2015-104
Date(s) Issued: 
Tuesday, September 8, 2015
Subject: 
Multiple Vulnerabilities in PHP Could Allow 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 5.4 prior to 5.4.45
  • PHP 5.5 prior to 5.5.29
  • PHP 5.6 prior to 5.6.13
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 that could allow for arbitrary code execution. These vulnerabilities include:

  • Bug 70172 - A vulnerability exists in the unserialize() function when trying to deference memory that has already been freed.
  • Bug 70219 - A vulnerability exists in the php_var_unserialize() function when trying to deference memory that has already been freed.
  • Bug 70345 - A vulnerability exists in the PCRE functions with regard to start and end offsets for subject strings.
  • Bug 70365 - A vulnerability exists in the unserialize() function with SplObjectStorage when trying to deference memory that has already been freed.
  • Bug 70366 - A vulnerability exists in the unserialize() function with SplDoublyLinkedList when trying to deference memory that has already been freed.
  • Bug 70388 - A vulnerability exists in the SOAP serialize_function_call() function when trying to validate the input.

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

Version 5.6.13

  • Bug 69487 - Corrupted data as a result of SAPI failing to write POST data.
  • Bug 69900 - fgets() function calls take 100ms.
  • Bug 70198 - The Syscall recv doesn't set the errno value on success leading to failed if conditions.
Actions: 
  • After appropriate testing, upgrade to the latest version of PHP immediately,.
  • 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.
  • Do not open email attachments from unknown or untrusted sources.
  • Limit user account privileges to only those required.