CIS Logo
tagline: Confidence in the Connected World
HomeResourcesAdvisoriesMultiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

Multiple Vulnerabilities in PHP Could Allow for Arbitrary Code Execution

MS-ISAC ADVISORY NUMBER:

2017-093

DATE(S) ISSUED:

09/29/2017

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 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.0 prior to 7.0.24
  • PHP 7.1 prior to 7.1.10

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 an attacker to execute arbitrary code. Details of these vulnerabilities are as below:

Prior to 7.0.24

  • Fixed bug #75042 (run-tests.php issues with EXTENSION block).
  • Fixed bug #44995 (bcpowmod() fails if scale != 0).
  • Fixed bug #46781 (BC math handles minus zero incorrectly).
  • Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1).
  • Fixed bug #75178 (bcpowmod() misbehaves for non-integer base or modulus).
  • Fixed bug #70470 (Built-in server truncates headers spanning over TCP packets).
  • Fixed bug #75093 (OpenSSL support not detected).
  • Fixed bug #75124 (gdImageGrayScale() may produce colors).
  • Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?).
  • Fixed bug #73730 (textdomain(null) throws in strict mode).
  • Fixed bug #75090 (IntlGregorianCalendar doesn't have constants from parent class).
  • Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized before PHP-FPM sets it up).
  • Fixed bug #75173 (incorrect behavior of AppendIterator::append in foreach loop).
  • Fixed bug #75097 (gethostname fails if your host name is 64 chars long).

Prior to 7.1.10

  • Fixed bug #75042 (run-tests.php issues with EXTENSION block).
  • Fixed bug #44995 (bcpowmod() fails if scale != 0).
  • Fixed bug #46781 (BC math handles minus zero incorrectly).
  • Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1).
  • Fixed bug #75178 (bcpowmod() misbehaves for non-integer base or modulus).
  • Fixed bug #70470 (Built-in server truncates headers spanning over TCP packets).
  • Fixed bug #75093 (OpenSSL support not detected).
  • Fixed bug #75124 (gdImageGrayScale() may produce colors).
  • Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?).
  • Fixed bug #73730 (textdomain(null) throws in strict mode).
  • Fixed bug #75090 (IntlGregorianCalendar doesn't have constants from parent class).
  • Fixed bug #75193 (segfault in collator_convert_object_to_string).
  • Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized before PHP-FPM sets it up).
  • Fixed bug #75155 (AppendIterator::append() is broken when appending another AppendIterator).
  • Fixed bug #75173 (incorrect behavior of AppendIterator::append in foreach loop).
  • Fixed bug #75152 (signed integer overflow in parse_iv).
  • Fixed bug #75097 (gethostname fails if your host name is 64 chars long).

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.

RECOMENDATIONS:

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.

Get Email Updates When Cyber Threats Like This Arise

Arrow Subscribe to Advisories

Protect Your Systems from Cyber Threats Like This

CIS Controls That Help Avoid This Issue Arrow CIS Control 3: Continuous Vulnerability Assessment and Remediation Arrow CIS Control 18: Application Software Security