CVE-2017-8923
Critical · 9.8CVSS
9.8
EPSS
7.2%
Published
May 12, 2017
CISA due date
—
Cloudanix analysis
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.
- 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
- Identify a PHP application or endpoint accepting user-controlled input used in string concatenation
- Craft a payload that forces .= operations with a long string to reach zend_string_extend
- Trigger the negative length condition to cause application crash or memory corruption
- 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
- CVE-2015-9253 An issue was discovered in PHP 7.3.x before 7.3.0alpha3, 7.2.x before 7.2.8, and before… Also affects php7
- CVE-2024-8926 In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, when using… Also affects php7.4
- CVE-2017-12933 The finish_nested_data function in ext/standard/var_unserializer.re in PHP before 5.6.31… Also affects php5
- CVE-2017-5630 PECL in the download utility class in the Installer in PEAR Base System v1.10.1 does not… Also affects php5
- CVE-2026-111497 A buffer overflow vulnerability in the Brotli decoder (c/dec/decode.c) in Google Brotli… CWE-787
- CVE-2026-112397 Pillow is a Python imaging library. CWE-787
- CVE-2026-112059 libLAS through 1.8.1 contains a heap out-of-bounds write vulnerability in the point… CWE-787
- CVE-2026-89088 A flaw was found in parted. CWE-787