CVE-2026-115560

Deserialization of Untrusted Data
Affects
PHP (php-src)
in
PHP
No items found.
Versions
>=5.4.0 <8.2.36, >=8.3.0 <8.3.37, >=8.4.0 <8.4.28, >=8.5.0 <8.5.13

Patch Available.

Exclamation circle icon
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. PHP sessions are stored in one of several serialization formats, selected by session.serialize_handler. The session upload progress feature writes the progress of multipart uploads into the session, and was enabled by default before this fix.

A Deserialization of Untrusted Data vulnerability (CVE-2026-115560) has been identified in the session upload progress feature, which allows an attacker to have data written to a session in one serialization format and read back in another, so that part of a session key is interpreted as serialized object data. With a suitable object gadget chain in the reading application, this can lead to code execution with the privileges of the PHP worker. The PHP project tracks this issue as GHSA-658j-r8rw-q6mx.

Per MITRE CWE-502: The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

This issue affects PHP 5.4.0 and later 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. The advisory lists the supported branches and notes that session upload progress was introduced in PHP 5.4.0, so the End-of-Life release lines PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1, which also enable the feature by default, may be affected as well.

Details

Module Info

Vulnerability Info

This Critical-severity vulnerability is found in the session extension of PHP 5.4.0 and later 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. The PHP project scores it 9.2 under CVSS 4.0 (CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N). The PHP project classifies it as CWE-20 and CWE-502, and treats it as separate from the stale global state issue in CVE-2026-109619.

During multipart processing, PHP appends the submitted upload progress name to a session key and stores it. The php format separates each key from its serialized value with a | character, while php_binary and php_serialize represent keys differently. If data written with one of those two formats is later read with the php format, a delimiter supplied by the attacker can cause bytes inside the key to be passed to PHP's unserialization code. Objects may be created, and their deserialization or destruction callbacks invoked, before trailing data makes the decoder reject the record.

Before the fix, the feature was on by default. In PHP 8.5.12, the INI definition reads:

/* Upload progress */
STD_PHP_INI_BOOLEAN("session.upload_progress.enabled",
                                                "1",     ZEND_INI_PERDIR, OnUpdateBool,        rfc1867_enabled, php_ps_globals, ps_globals)
STD_PHP_INI_BOOLEAN("session.upload_progress.cleanup",
                                                "1",     ZEND_INI_PERDIR, OnUpdateBool,        rfc1867_cleanup, php_ps_globals, ps_globals)

The affected setup needs upload progress enabled where an attacker can submit a multipart upload to a context that uses php_binary or php_serialize, and a later or concurrent operation that reads the same stored session, with the same session ID, using the php serializer. Code execution also needs a suitable gadget chain in the reading application. The mismatch can arise when an application changes session.serialize_handler to php before calling session_start(), or between separate applications, pools, virtual hosts or command-line processes with different fixed settings that share session storage. Separate FPM pools do not automatically have separate session storage. Workers that all use the same serializer do not create the mismatch.

The advisory reports command execution with a Guzzle object gadget on PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and with a Monolog 2.11.1 gadget. Other possible outcomes are file modification, session corruption and denial of service. An application that never changes its serializer at runtime can still be affected if another application or process writes incompatible data into the same session store.

The fix disables session upload progress by default and rejects runtime changes to session settings, including session.serialize_handler, while upload progress is enabled:

#define SESSION_CHECK_UPLOAD_PROGRESS_STATE \
if (PS(rfc1867_enabled) && stage == ZEND_INI_STAGE_RUNTIME) { \
    zend_throw_error(NULL, "Session ini settings cannot be changed at runtime when session.upload_progress.enabled is On"); \
    return FAILURE;                                                 \
}

The fix does not enforce matching serializers across separate configurations, and an explicit setting that enables upload progress overrides the new default.

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, set session.upload_progress.enabled=0 in every configuration that can write to the affected session store. Set it administratively, before request input is processed; calling ini_set() from the application is too late. Where the feature is needed, make sure every reader and writer of the session data uses the same session.serialize_handler, and isolate session storage for applications that need different formats.

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

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Critical
ID
CVE-2026-115560
PROJECT Affected
PHP (php-src)
Versions Affected
>=5.4.0 <8.2.36, >=8.3.0 <8.3.37, >=8.4.0 <8.4.28, >=8.5.0 <8.5.13
NES Versions Affected
Published date
November 19, 2026
≈ Fix date
November 19, 2026
Fixed in
Category
Deserialization of Untrusted Data
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
PHP
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.