CVE-2026-15353
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
PHP is a general-purpose scripting language used mostly for web development. It runs behind web servers through server APIs such as Apache mod_php and PHP-FPM, and powers content management systems and frameworks such as WordPress, Drupal, Moodle and Laravel. The SOAP extension implements SOAP clients and servers. It decodes SOAP-encoded arrays, whose dimensions are described by an arraySize attribute, into PHP arrays.
An Information Exposure vulnerability (CVE-2026-15353) has been identified in how the SOAP extension decodes arrays with an invalid arraySize value, which allows an attacker who supplies a crafted SOAP request or response to make PHP read a small amount of uninitialized heap memory and use it as an array key. The value reaches the attacker if the application returns or otherwise exposes the decoded array. The PHP project tracks this issue as GHSA-q23r-hr55-xmpg.
Per MITRE CWE-125: The product reads data past the end, or before the beginning, of the intended buffer.
This issue affects all versions of PHP before 8.2.36, PHP 8.3 before 8.3.37, PHP 8.4 before 8.4.28 and PHP 8.5 before 8.5.13, which includes the End-of-Life release lines PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 through their final releases.
Details
Module Info
- Product: PHP
- Affected packages: php-src (ext/soap)
- Affected versions: <8.2.36, >=8.3.0 <8.3.37, >=8.4.0 <8.4.28, >=8.5.0 <8.5.13
- GitHub repository: https://github.com/php/php-src
- Published packages: https://www.php.net/downloads
- Package manager: N/A
- Fixed in:
- OSS PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13
- NES for PHP
Vulnerability Info
This Medium-severity vulnerability is found in the soap extension of all versions of PHP before 8.2.36, PHP 8.3 before 8.3.37, PHP 8.4 before 8.4.28 and PHP 8.5 before 8.5.13, which includes the End-of-Life release lines PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 through their final releases. The PHP project scores it 6.3 under CVSS 4.0 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N). The PHP project classifies it as CWE-125 and CWE-908.
For a SOAP 1.2 encoded array, PHP counts the dimensions in arraySize with calc_dimension_12() and then allocates and fills a position array of that size with get_position_12(). In PHP 8.5.12, the decoder reads:
if ((attr = get_soap_enc_attribute(data->properties,"arraySize")) &&
attr->children && attr->children->content) {
dimension = calc_dimension_12((char*)attr->children->content);
dims = get_position_12(dimension, (char*)attr->children->content);
} else {
dims = emalloc(sizeof(int));
*dims = 0;
}
An empty, whitespace-only or non-numeric arraySize describes no dimensions, so the count is 0 and the position array has no elements. PHP still reads its first position. With PHP's default memory allocator, the read stays inside a small allocated block and can return four bytes of unrelated heap data, which then becomes an integer key in the decoded array. With the default allocator disabled, AddressSanitizer reports an out-of-bounds heap read.
An unauthenticated client can trigger the issue through a SOAP endpoint that accepts the crafted input, and a malicious or compromised SOAP server can send an affected response to SoapClient. The demonstrated impact is limited information disclosure, and only when the application exposes the decoded array. Accepting the request alone does not return the value to the attacker. The demonstrated case does not crash or corrupt memory with the default allocator, and code execution has not been demonstrated.
The advisory states that the behavior is present in all supported PHP branches. The same functions are present in the final releases of the End-of-Life PHP 5.6 through 8.1 lines.
The fix makes calc_dimension_12() treat a size with no dimensions as a one-dimensional array, which also covers array dimensions read from WSDL definitions:
}
str++;
}
return i != 0 ? i : 1;
}
Mitigation
The PHP project publishes security fixes only for its supported release lines. PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 are End-of-Life and will not receive any public updates to address this issue.
Until an upgrade is possible, restrict access to affected SOAP endpoints and use only trusted SOAP services and WSDL definitions. Where requests or responses can be validated before they reach the SOAP extension, reject encoded arrays whose arraySize contains no valid dimension, and avoid returning unvalidated decoded arrays to untrusted clients.
Users of the affected components should apply one of the following mitigations:
- Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, or later.
- Leverage a commercial support partner like HeroDevs (NES for PHP) for post-EOL security support.
Credits
- ExPatch-LLC (finder)
- Alexandre Daubois (remediation)