Multiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

ITS Advisory Number: 
2019-118
Date(s) Issued: 
Monday, October 28, 2019
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 for arbitrary code execution. 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.1 Prior to Version 7.1.33

  • PHP 7.2 Prior to Version 7.2.24

  • PHP 7.3 Prior to Version 7.3.11

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 have been discovered in PHP, the most severe of which could allow for arbitrary code execution. Details of these vulnerabilities are as below:

 

Version 7.1.33:

  • Bug (env_path_info underflow in fpm_main.c can lead to RCE) 

Version 7.2.24:

  • Bug (auto_detect_line_endings value not parsed as bool)

  • Bug (Out of memory error)

  • Bug ('Illegal component' on exif_read_data since PHP7)

  • Bug (env_path_info underflow in fpm_main.c can lead to RCE)

  • Bug (mb_decode_numericentity: args number inconsistency)

  • Bug (mb_check_encoding()

  • Bug (SSL settings aren't respected when persistent connections are used)

  • Bug (Regression caused by "SP call yields additional empty result set")

  • Bug (session_gc return value for user defined session handlers)

  • Bug (file_get_contents waits twice specified timeout)

  • Bug (strtr leaks memory when integer keys are used and the subject string shorter)

  • Bug (stream_get_line skips data if used with data-generating filter)

  • Bug (addGlob can modify given remove_path value) 

Version 7.3.11:

  • Bug (auto_detect_line_endings value not parsed as bool)

  • Bug (Out of memory error)

  • Bug ('Illegal component' on exif_read_data since PHP7)

  • Bug (env_path_info underflow in fpm_main.c can lead to RCE)

  • Bug (request_terminate_timeout does not take effect after fastcgi_finish_request)

  • Bug (Heap buffer overflow (read)

  • Bug (mb_decode_numericentity: args number inconsistency)

  • Bug (mb_check_encoding()

  • Bug (SSL settings aren't respected when persistent connections are used)

  • Bug (Memory leak in pdo when reusing native prepared statements)

  • Bug (calling preg_match()

  • Bug (Regression caused by "SP call yields additional empty result set")

  • Bug (session_gc return value for user defined session handlers)

  • Bug (file_get_contents waits twice specified timeout)

  • Bug (strtr leaks memory when integer keys are used and the subject string shorter)

  • Bug (stream_get_line skips data if used with data-generating filter)

  • Bug (addGlob can modify given remove_path value) 

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. 

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

  • After appropriate testing, immediately apply the latest upgraded version of PHP.

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