CIS Logo
tagline: Confidence in the Connected World

Multiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

MS-ISAC ADVISORY NUMBER:

2020-023

DATE(S) ISSUED:

02/20/2020

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.4 Prior to Version 7.4.3
  • PHP 7.3 Prior to Version 7.3.15
  • PHP 7.2 Prior to Version 7.2.28

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 for arbitrary code execution. Details of these vulnerabilities are as below:

Version 7.4.3

  • Bug #79146 (cscript can fail to run on some systems).
  • Bug #79155 (Property nullability lost when using multiple property definition).
  • Bug #78323 (Code 0 is returned on invalid options).
  • Bug #78989 (Delayed variance check involving trait segfaults).
  • Bug #79174 (cookie values with spaces fail to round-trip).
  • Bug #76047 (Use-after-free when accessing already destructed backtrace arguments).
  • Bug #79247 (Garbage collecting variant objects segfaults).
  • Bug #79078 (Hypothetical use-after-free in curl_multi_add_handle()).
  • Bug #79096 (FFI Struct Segfault).
  • Bug #79112 (IMAP extension can't find OpenSSL libraries at configure time).
  • Bug #79212 (NumberFormatter::format() may detect wrong type).
  • Bug #79191 (Error in SoapClient ctor disables DOMDocument::save()).
  • Bug #79149 (SEGV in mb_convert_encoding with non-string encodings).
  • Bug #78666 (Properties may emit a warning on var_dump()).
  • Bug #79084 (mysqlnd may fetch wrong column indexes with MYSQLI_BOTH).
  • Bug #79011 (MySQL caching_sha2_password Access denied for password with more than 20 chars).
  • Bug #79114 (Eval class during preload causes class to be only half available).
  • Bug #79128 (Preloading segfaults if preload_user is used).
  • Bug #79193 (Incorrect type inference for self::$field =& $field).
  • Bug #79145 (openssl memory leak).
  • Bug #79082 (Files added to tar with Phar::buildFromIterator have all-access permissions). (CVE-2020-7063)
  • Bug #79171 (heap-buffer-overflow in phar_extract_file). (CVE-2020-7061)
  • Bug #76584 (PharFileInfo::decompress not working).
  • Bug #79115 (ReflectionClass::isCloneable call reflected class __destruct).
  • Bug #79221 (Null Pointer Dereference in PHP Session Upload Progress). (CVE-2020-7062)
  • Bug #78902 (Memory leak when using stream_filter_append).
  • Bug #78969 (PASSWORD_DEFAULT should match PASSWORD_BCRYPT instead of being null).
  • Bug #78090 (bug45161.phpt takes forever to finish).
  • Bug #70078 (XSL callbacks with nodes as parameter leak memory).
  • Bug #73119 (Wrong return for ZipArchive::addEmptyDir Method).

Version 7.3.15

  • Bug #71876 (Memory corruption htmlspecialchars(): charset `*' not supported).
  • Bug #79146 (cscript can fail to run on some systems).
  • Bug #78323 (Code 0 is returned on invalid options).
  • Bug #76047 (Use-after-free when accessing already destructed backtrace arguments).
  • Bug #79078 (Hypothetical use-after-free in curl_multi_add_handle()).
  • Bug #79212 (NumberFormatter::format() may detect wrong type).
  • Bug #79191 (Error in SoapClient ctor disables DOMDocument::save()).
  • Bug #79154 (mb_convert_encoding() can modify $from_encoding).
  • Bug #79084 (mysqlnd may fetch wrong column indexes with MYSQLI_BOTH).
  • Bug #79145 (openssl memory leak).
  • Bug #79082 (Files added to tar with Phar::buildFromIterator have all-access permissions). (CVE-2020-7063)
  • Bug #79171 (heap-buffer-overflow in phar_extract_file). (CVE-2020-7061)
  • Bug #76584 (PharFileInfo::decompress not working).
  • Bug #79115 (ReflectionClass::isCloneable call reflected class __destruct).
  • Bug #79221 (Null Pointer Dereference in PHP Session Upload Progress). (CVE-2020-7062)
  • Bug #79151 (heap use after free caused by spl_dllist_it_helper_move_forward).
  • Bug #78902 (Memory leak when using stream_filter_append).
  • Bug #78090 (bug45161.phpt takes forever to finish).
  • Bug #70078 (XSL callbacks with nodes as parameter leak memory).

Version 7.2.28

  • Bug #77569: (Write Access Violation in DomImplementation).
  • Bug #79082 (Files added to tar with Phar::buildFromIterator have all-access permissions). (CVE-2020-7063)
  • Bug #79221 (Null Pointer Dereference in PHP Session Upload Progress). (CVE-2020-7062)

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.

RECOMMENDATIONS:

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.

REFERENCES:

Get Email Updates When Cyber Threats Like This Arise

Arrow Subscribe to Advisories

Related Resources



Arrow CIS Control 3: Continuous Vulnerability Assessment and Remediation

Information Hub : Advisories


CONTROL: 1 --- ADVISORY CONTROL: 0
CONTROL: 2 --- ADVISORY CONTROL: 0
CONTROL: 3 --- ADVISORY CONTROL: 0
CONTROL: 4 --- ADVISORY CONTROL: 0