Cloudanix VulnDB

CVE-2017-8923

Critical · 9.8

CVSS

9.8

EPSS

7.2%

Published

May 12, 2017

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in older PHP versions lets attackers crash web applications by feeding specially crafted long text into certain string operations, causing outages until the software is updated.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The zend_string_extend function fails to validate string length after modifications, permitting negative lengths via concatenation operations that corrupt memory structures and trigger crashes or undefined behavior.

Why it matters to the business

Web applications and services built on affected PHP versions can experience sudden crashes, service outages, or potential further compromise, disrupting operations for organizations relying on PHP workloads until patches are applied.

How an attack unfolds

An attacker supplies or triggers input that causes a PHP script to perform string concatenation with an excessively long value, invoking the vulnerable zend_string_extend path to produce a negative length and induce memory corruption; publicly available exploits facilitate this for denial of service or further impact.

How to fix it

Upgrade php/php-src to the commit 7d959d16546198e8012985109e5689abcae18b5f or later; upgrade syft (Chainguard) and syft (Wolfi) to 1.8.0-r1 or later; rebuild and redeploy affected PHP applications with the patched runtime.

How to confirm the fix worked

Confirm PHP version is newer than 7.1.5 and contains the listed fixed commits; test string concatenation paths with long inputs to verify no negative length or crash occurs; review application logs and memory sanitizer output for absence of related corruption.

Typical attack path

  1. Identify a PHP application or endpoint accepting user-controlled input used in string concatenation
  2. Craft a payload that forces .= operations with a long string to reach zend_string_extend
  3. Trigger the negative length condition to cause application crash or memory corruption
  4. Leverage the resulting state for denial of service or attempt escalation to other impacts

How to detect it

Review web server and PHP-FPM logs for repeated crashes or segmentation faults coinciding with long string inputs; inspect application code for .= usage on untrusted data; correlate with exploit patterns targeting PHP string extension functions.

What your security team should do

  • Prioritize patching PHP runtimes to the specified fixed versions across all environments within the next maintenance window
  • Scan container images and dependencies for vulnerable syft and php-src packages and rebuild with updated versions
  • Monitor for exploit attempts targeting PHP string handling and test applications for exposure to concatenation-based inputs
  • Review and update any custom PHP extensions or FPM configurations that may amplify memory corruption effects

The record

The zend_string_extend function in Zend/zend_string.h in PHP through 7.1.5 does not prevent changes to string objects that result in a negative length, which allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact by leveraging a script's use of .= with a long string.

Affected packages

Ecosystem Package Introduced Fixed
SUSE:Enterprise Storage 6 php7 0 7.2.5-4.89.4
SUSE:Enterprise Storage 6 php7 0 7.2.34-150000.4.103.1
SUSE:Enterprise Storage 7 php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise High Performance Computing 15-ESPOS php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise High Performance Computing 15-ESPOS php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise High Performance Computing 15-LTSS php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise High Performance Computing 15-LTSS php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise Module for Package Hub 15 SP3 php7 0 7.4.6-3.32.1
SUSE:Linux Enterprise Module for Package Hub 15 SP3 php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise Module for Web and Scripting 12 php72 0 7.2.5-1.75.1
SUSE:Linux Enterprise Module for Web and Scripting 12 php74 0 7.4.6-1.33.1
SUSE:Linux Enterprise Module for Web and Scripting 12 php74 0 7.4.33-1.47.2
SUSE:Linux Enterprise Module for Web and Scripting 15 SP3 php7 0 7.4.6-3.32.1
SUSE:Linux Enterprise Module for Web and Scripting 15 SP3 php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise Server 15 SP1-BCL php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise Server 15 SP1-BCL php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise Server 15 SP1-LTSS php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise Server 15 SP1-LTSS php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise Server 15 SP2-BCL php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise Server 15 SP2-LTSS php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise Server 15-LTSS php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise Server 15-LTSS php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise Server for SAP Applications 15 php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise Server for SAP Applications 15 php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 php7 0 7.2.5-4.89.4
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 php7 0 7.2.34-150000.4.103.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 php7 0 7.4.33-150200.3.46.2
SUSE:Linux Enterprise Software Development Kit 12 SP5 php72 0 7.2.5-1.75.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 php74 0 7.4.6-1.33.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 php74 0 7.4.33-1.47.2
SUSE:Manager Proxy 4.1 php7 0 7.4.33-150200.3.46.2
SUSE:Manager Retail Branch Server 4.1 php7 0 7.4.33-150200.3.46.2
SUSE:Manager Server 4.1 php7 0 7.4.33-150200.3.46.2
Ubuntu:18.04:LTS php7.2 0 7.2.24-0ubuntu0.18.04.11
Ubuntu:20.04:LTS php7.4 0 7.4.3-4ubuntu2.10
Ubuntu:22.04:LTS php8.1 0 8.1.0-1
Ubuntu:Pro:14.04:LTS php5 0 No fix
Ubuntu:Pro:16.04:LTS php7.0 0 7.0.33-0ubuntu0.16.04.16+esm3
openSUSE:Leap 15.3 php7 0 7.4.33-150200.3.46.2
openSUSE:Leap 15.3 php7 0 7.4.6-3.32.1
openSUSE:Leap 15.3 php7-test 0 7.4.33-150200.3.46.2
openSUSE:Leap 15.3 php7-test 0 7.4.6-3.32.1
openSUSE:Leap 15.4 php7 0 7.2.34-150000.4.103.1
openSUSE:Leap 15.4 php7 0 7.4.33-150200.3.46.2

Related vulnerabilities