session.serialize_handler combined with PHP's default session.upload_progress mechanism can lead to unauthenticated PHP object injection and Remote Code Execution (RCE).
Because this flaw was first disclosed on 23 October 2026—just two days after the emergency PHP2Shell (CVE-2026-109618 and CVE-2026-109619) patches—and shares the exact same interim mitigation (session.upload_progress.enabled = 0), many operators assumed their October emergency patching already closed it. It did not.
1. Separate From CVE-2026-109619 (PHP2Shell): Why October Patches Do Not Cover This
8.2.35, 8.3.36, 8.4.27, and 8.5.12.
Even though both CVE-2026-109619 and CVE-2026-115560 abuse PHP's session.upload_progress feature as an entry vector, they are completely distinct vulnerabilities with different root causes, exploitation requirements, and patch timelines:
| Attribute | CVE-2026-109619 (PHP2Shell) | CVE-2026-115560 (GHSA-658j-r8rw-q6mx) |
|---|---|---|
| Advisory ID | GHSA-6wmf-4rv5-p3rp | GHSA-658j-r8rw-q6mx |
| Disclosure & Patch Date | Patched 21 October 2026 (emergency release) | Disclosed 23 October 2026; patched 19 November 2026 |
| Vulnerability Class | Use-After-Free (UAF) / stale internal global state in PHP core | Improper Input Validation (CWE-20) / Session Serializer Mismatch |
| Attack Mechanism | Reuses freed internal memory across requests on the same worker process | Injects a pipe (\ ) delimiter via upload progress written in php_serialize/php_binary, then decoded by the php handler |
| Application Gadget Required? | No — triggers memory corruption before app code runs | Yes — triggers PHP object injection; RCE depends on an exploitable gadget class (__destruct / __wakeup) in the app |
| Fixed Upstream Versions | 8.2.35, 8.3.36, 8.4.27, 8.5.12 | 8.2.36, 8.3.37, 8.4.28, 8.5.13, 8.6.0 |
| Status on PHP 8.4.27 / 8.5.12 | Patched | Still Vulnerable |
8.2.35, 8.3.36, 8.4.27, or 8.5.12 for PHP2Shell in late October, those binaries are still vulnerable to CVE-2026-115560 unless you either applied the session.upload_progress.enabled = 0 workaround or upgraded to the 19 November 2026 release.
2. Technical Root Cause: How the Serializer Mismatch Triggers RCE
php(default): Stores each session variable askey|serialized_valueusing the pipe character (|) as a delimiter.php_serialize: Serializes the entire$_SESSIONarray as a single standardserialize()string, where|has no special delimiter meaning.php_binary: Stores key length as a binary byte followed by the key and serialized value.
Preconditions for Exploitation
GHSA-658j-r8rw-q6mx and php-src analysis (ext/session/session.c and main/rfc1867.c), CVE-2026-115560 requires a specific combination of settings:
- Server-level serializer is
php_serializeorphp_binaryinphp.inior FPM pool configuration. - Runtime switch to
php— the application callsini_set('session.serialize_handler', 'php')beforesession_start()(or two separate FPM pools/endpoints share the same session storage directory while configured with mismatched serializers). session.upload_progress.enabled = 1— which was enabled by default in PHP prior to the 19 November 2026 patch.- An exploitable gadget chain exists in the application or its Composer dependencies to escalate object deserialization into arbitrary code execution, file modification, or session corruption.
Step-by-Step Exploit Flow
TEXT
Attacker Producer Request (Multipart POST with file + PHP_SESSION_UPLOAD_PROGRESS="|O:...")
|
v
Request Startup (RFC 1867 parsing — BEFORE application PHP code runs)
| php_session_rfc1867_callback() -> MULTIPART_EVENT_FILE_START -> php_rinit_session(0)
| PS(serializer) reads server php.ini (php_serialize / php_binary)
| php_session_rfc1867_update() -> php_session_flush(1)
v
Session File on Disk (written in php_serialize format with raw attacker key containing "|")
|
+------- Race Window (while upload is still in flight before cleanup) -------+
v v
Attacker Consumer Request (with matching PHPSESSID cookie) Upload finishes ->
| App executes: ini_set('session.serialize_handler', 'php') fileupload_done:
| OnUpdateSerializer repoints PS(serializer) to `php` deletes progress key
| App calls: session_start()
v
PS_SERIALIZER_DECODE_FUNC(php) splits at the injected "|" delimiter
| Unserializes attacker object -> PHP_VAR_UNSERIALIZE_DESTROY(var_hash)
v
Injected object's __destruct() fires -> Gadget Chain -> RCE- No session cookie needed on the producer request: The RFC 1867
MULTIPART_EVENT_FORMDATAhandler acceptsPHPSESSIDdirectly from the multipart POST body without checkingsession.use_only_cookies. Only the concurrent consumer request needs the cookie. - Cleanup does not prevent exploitation: With PHP's default
session.upload_progress.cleanup = 1,fileupload_done:inmain/rfc1867.cdeletes the progress key once the upload completes (even if the client aborts). Attackers bypass this by sending a large upload payload or throttling the upload stream to hold the session file open while firing concurrent consumer requests. - Exploitation succeeds even when session decoding fails: When the
phphandler parses the injected|O:...payload, trailing bytes from thephp_serializewrapper cause the overall decode to returnFAILURE, often logging:PHP Warning: session_start(): Failed to decode session object. Session has been destroyedHowever,PHP_VAR_UNSERIALIZE_DESTROY(var_hash)runs on both the success and failure paths, so the deserialized gadget's__destruct()method has already executed by the time that warning appears in your error log. - FPM pool isolation is not enough if storage is shared: Separate PHP-FPM pools do not isolate this bug if both pools read and write to the same
session.save_path(such as/var/lib/php/sessionor a shared Redis instance) with differentsession.serialize_handlerconfigurations.
3. Affected and Patched PHP Versions
session.serialize_handler.
| PHP Branch | Vulnerable Versions | Fixed Upstream Version | Support Status |
|---|---|---|---|
| PHP 8.6 | Pre-release builds | 8.6.0 | Current |
| PHP 8.5 | < 8.5.13 (including 8.5.12) | 8.5.13 | Active Support |
| PHP 8.4 | < 8.4.28 (including 8.4.27) | 8.4.28 | Active Support |
| PHP 8.3 | < 8.3.37 (including 8.3.36) | 8.3.37 | Security Support |
| PHP 8.2 | < 8.2.36 (including 8.2.35) | 8.2.36 | Security Support (EOL 31 Dec 2026) |
| PHP 8.1 and older | All unpatched builds | No upstream fix | End of Life (requires vendor ELS backport or upgrade) |
alt-php, cPanel ea-php, Debian/Ubuntu APT, or RHEL/AlmaLinux RPMs), always verify backported fixes via package changelogs (rpm -q --changelog or zgrep on changelog.Debian.gz) rather than trusting php -v alone.
4. Temporary Workaround: Applying session.upload_progress.enabled = 0 Correctly
INI
session.upload_progress.enabled = 0Critical Caveat: Never Use ini_set() for This Workaround
ini_set('session.upload_progress.enabled', '0') inside your PHP application does nothing to mitigate CVE-2026-115560. The RFC 1867 upload-progress handler executes during request startup before your PHP script ever begins running. The directive has PHP_INI_SYSTEM / PHP_INI_PERDIR timing requirements for upload parsing and must be set in php.ini, a conf.d drop-in, or the PHP-FPM pool config—followed by a full worker restart.
Applying the Workaround by Environment
1. Standard Linux / PHP-FPM (AlmaLinux, RHEL, Ubuntu, Debian)
php.d or conf.d directory for every installed PHP version:
BASH
# RHEL / AlmaLinux / Rocky (native or Remi)
echo "session.upload_progress.enabled = 0" | sudo tee /etc/php.d/99-cve-2026-115560.ini
sudo systemctl restart 'php*-fpm'
# Ubuntu / Debian (repeat for each version under /etc/php/)
for dir in /etc/php/*/fpm/conf.d /etc/php/*/apache2/conf.d; do
[ -d "$dir" ] && echo "session.upload_progress.enabled = 0" | sudo tee "$dir/99-cve-2026-115560.ini"
done
sudo systemctl restart 'php*-fpm'2. cPanel / WHM (EasyApache 4 ea-php)
ea-php branch and restart both Apache and PHP-FPM:
BASH
for ini_dir in /opt/cpanel/ea-php*/root/etc/php.d; do
[ -d "$ini_dir" ] && echo "session.upload_progress.enabled = 0" > "$ini_dir/99-cve-2026-115560.ini"
done
/scripts/restartsrv_apache_php_fpm
/scripts/restartsrv_httpd3. CloudLinux PHP Selector (alt-php)
alt-php version:
INI
; /etc/cl.selector/global_php.ini
session.upload_progress.enabled = OffBASH
cagefsctl --setup-cl-selector4. LiteSpeed Web Server (Detached lsphp)
lsws does not reload detached PHP workers. Force a clean worker reload after updating the .ini files:
BASH
# Immediate worker restart
pkill lsphp
# Or graceful reload on next request
touch /usr/local/lsws/admin/tmp/.lsphp_restart.txtVerify the Workaround and Audit Your Codebase
php-fpm -tt):
BASH
php -i | grep -E "session\.(upload_progress\.enabled|serialize_handler)"TEXT
session.serialize_handler => php => php
session.upload_progress.enabled => Off => OffBASH
grep -rn "session\.serialize_handler" /home/*/public_html /var/www/ 2>/dev/null5. Why You Still Need to Patch Beyond the Workaround
session.upload_progress.enabled = 0 completely neutralizes CVE-2026-115560, and breaking session-based upload progress bars is an acceptable trade-off for almost all modern applications (which use JavaScript XMLHttpRequest / Fetch upload progress events instead).
However, do not treat this workaround as a substitute for upgrading to PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, or 8.6.0. The same 19 November 2026 security release patches six other critical (CVSS 9.2) vulnerabilities, including:
- CVE-2026-126714 — A TOCTOU flaw in default file-based session storage where partially overwritten session files can lead to RCE.
- CVE-2026-129182, CVE-2026-129474, CVE-2026-129481, and CVE-2026-129496 — Multiple Use-After-Free (UAF) memory corruption flaws in PHP core and session cleanup that can crash reused workers or allow unauthenticated RCE.
session.upload_progress.enabled = 0 as your immediate 5-minute shield today, then schedule the full package upgrade and PHP worker restart across every ea-php, alt-php, and native PHP binary on your fleet.