CVE-2026–115560: Another PHP Session-Handler RCE — Astra Security Blog
PHP disclosed a code execution issue in its session upload progress feature that can be reached when an application switches the session serialisation handler at runtime. An attacker could potentially achieve remote code execution, though PHP describes the configuration as narrow and unlikely.
Published on medium.com
Cve
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
On 23 October 2026, two days after PHP shipped emergency fixes for PHP2Shell (CVE-2026-109618 and CVE-2026-109619), the project disclosed a second code execution path: CVE-2026-115560. PHP itself describes this one as "unlikely", and the fix is expected on the regular release train rather than as an emergency patch.
The vulnerable surface is session.upload_progress, the built-in PHP feature that writes upload progress data into $_SESSION so that an application can render a progress bar without a separate backend. It is enabled by default. The advisory frames the issue as code execution reachable only through a specific sequence of session-handling moves, and PHP has not published the technical root cause, only that there is a chance for RCE.
Setup
The bug requires all of the following to line up in the same request path:
session.serialize_handleris set tophp_binaryorphp_serializeinphp.inior an equivalent config layer.- The application then calls
ini_set('session.serialize_handler', 'php')at runtime, flipping the handler to the legacy format. - That
ini_set()call happens beforesession_start(). session.upload_progress.enabledis still1.
No specific PHP version, SAPI or application is named in the advisory. The configuration above is the whole precondition set as published.
Finding it
The advisory does not describe a testing process or a reproduction. What it documents is the advisory's own framing: a code execution issue that only becomes reachable when a runtime change to the serialisation handler is combined with the upload progress feature. The interesting part for defenders is the third precondition. Because the handler is switched with ini_set() inside application code, the vulnerable state is created by the application itself, not by the default configuration alone.
Exploitation
The report does not publish a proof of concept, request or payload, and PHP has not published the root cause. What can be stated is the sequence the advisory requires, in order:
Step 1: start from a non-default handler
session.serialize_handler is configured as php_binary or php_serialize in php.ini or an equivalent config layer.
Step 2: switch to the legacy handler at runtime
The application executes the following before the session is started:
ini_set('session.serialize_handler', 'php')
This moves the handler to the legacy format for the request.
Step 3: keep upload progress enabled
session.upload_progress.enabled remains at its default of 1, so upload progress data is written into $_SESSION.
Step 4: start the session
session_start() runs after the ini_set() call, so the session is opened under the legacy handler while upload progress is still active. This combination is what the advisory ties to code execution.
Root cause
PHP has not published the technical root cause. What the advisory makes clear is the shape of the problem: the serialisation format used for session data can be changed at runtime by application code, and the upload progress feature writes progress data into the session. The interaction between a handler change made immediately before session_start() and the progress data written under it is where the issue lives. Whether CVE-2026-115560 shares a root cause with CVE-2026-109619 is not confirmed.
Impact
Where the preconditions hold, the advisory states there is a chance for remote code execution. The preconditions are narrow: a non-default serialisation handler, an application that overrides it at runtime before starting the session, and upload progress left enabled. PHP has not published affected version ranges or a CVSS score, and the report notes that CVE-2026-115560 is not being exploited in the wild, unlike the PHP2Shell CVEs.
Fix
PHP shared the same mitigation as the 21 October advisory for CVE-2026-109619:
session.upload_progress.enabled = 0
Set it administratively, as the advisory asks. In FPM, use the following in the pool config:
php_admin_flag[session.upload_progress.enabled] = off
In Apache with mod_php:
php_admin_flag session.upload_progress.enabled off
The administrative flag matters because application code cannot override php_admin_* with ini_set(), and ini_set() is exactly how this bug is reached.
Restart every worker after the change rather than reloading, then verify on the SAPI that actually serves the site, not the CLI. php -i reads the CLI configuration and will mislead you. Use:
php-fpm -i | grep session.upload_progress
or open a phpinfo() page through the web server to confirm the setting is live where it counts.
Nothing in a typical web application depends on this feature. It only matters if you are actively rendering an upload progress UI from $_SESSION. If you are, swap to a client-side progress indicator until the routine fix ships; the browser already emits progress events on XMLHttpRequest and fetch uploads. If you applied this mitigation for PHP2Shell and never rolled it back, you are already covered and no second action is needed.
PHP has not confirmed which branches are affected or whether the fix will be backported across all supported lines. Keep the INI mitigation in place until the next routine release lands and you have verified the fix on your version.
For checking which binary is actually serving traffic, Astra published php2shell-triage, a free Claude skill and plugin. Its read-only assessor walks /proc to find the real binary behind every running PHP-FPM, Apache and CLI worker, flags workers still running an old binary after an upgrade, and distinguishes distro-backported fixes from vulnerable builds. It runs only on hosts you own and contains no exploit code.
Variants to test
- Grep the codebase and every config layer for runtime
ini_setcalls againstsession.serialize_handler. If you find any such call, you are the narrow case. - Check the effective value of
session.serialize_handlerper SAPI. - Confirm
session.upload_progress.enabledthrough the web server rather than the CLI. - Watch php.net and the php-src security advisories page for the full CVE-2026-115560 write-up.
What to do before the weekend
- If you have not patched PHP2Shell yet, that remains the higher priority: those CVEs are being exploited in the wild, CVE-2026-115560 is not.
- Set
session.upload_progress.enabled = 0everywhere and leave it set until the next routine PHP release lands and you verify the fix. - Grep for runtime
ini_setcalls againstsession.serialize_handler; if you find any, you are the narrow case. - Watch php.net and the php-src security advisories page for the full write-up.
As of 23 October 2026, PHP has not published affected version ranges, a CVSS score, a target release for the fix, or confirmation of whether CVE-2026-115560 shares a root cause with CVE-2026-109619.
What happened, in plain words
On 23 October 2026, the team that maintains PHP, the programming language that runs a very large share of the world's websites, published a security notice. It described a way in which an attacker might be able to make a PHP server run code of the attacker's choosing. That kind of attack is called remote code execution, usually shortened to RCE. The notice was given the identifier CVE-2026-115560. A CVE is simply a public catalogue number for a known security flaw, so that everyone talking about the same bug can be sure they mean the same thing.
This was the second such notice in a week. Two days earlier, on 21 October 2026, PHP had shipped emergency fixes for two other flaws, CVE-2026-109618 and CVE-2026-109619, which together are nicknamed PHP2Shell. Those two were serious enough to be patched in a hurry. The new one, CVE-2026-115560, is different in tone: PHP itself calls it "unlikely". Because of that, they are not rushing out an emergency patch. The fix will arrive with the normal, scheduled releases of PHP, which the notice calls the regular release train.
The good news is that the protection is a single line of configuration. If you already applied that line after the 21 October advisory, you are already covered and do not need to do anything else for this bug.
The feature at the centre of it
To understand the bug, you need to know about two PHP features: sessions and upload progress.
A session is how a website remembers who you are between one page load and the next. When you log in, the server creates a small record for you, gives your browser a label for that record, and your browser sends the label back with every following request. The server-side record is stored in a place PHP calls $_SESSION, which is simply a named storage area that belongs to your visit. Think of it as a coat check: you hand over your coat, you get a ticket, and later you show the ticket to get the same coat back.
Upload progress is a built-in PHP feature that writes information about an in-progress file upload into that same $_SESSION storage, so that a website can show you a progress bar while a big file is being sent. Without it, the website would need a separate piece of software to track uploads. The feature is switched on by default in PHP, which matters later.
The setting that controls it is called session.upload_progress.enabled. A value of 1 means on, 0 means off.
The other concept involved is serialisation. When PHP stores data in a session, it has to turn that data into a flat string of text so it can be saved, and later turn the string back into data. The rules for doing that conversion are called a serialisation handler. PHP offers several handlers, and the one in use is chosen by a setting called session.serialize_handler. Different handlers write the same data in different formats. The names you will see are php (the old, legacy format), php_binary and php_serialize.
What the flaw actually is
PHP's advisory describes CVE-2026-115560 as a code execution issue that can only be reached through a specific sequence of moves involving sessions. PHP has not published the technical root cause, that is, the exact line of code where things go wrong. What it has said is that there is a chance for RCE.
The bug only fires when all of the following are true in the same request path. A request path just means the journey a single web request takes through the server, from arriving to being answered.
session.serialize_handleris set tophp_binaryorphp_serializeinphp.inior an equivalent config layer.php.iniis PHP's main settings file; a config layer is any other place settings can come from, such as a web server's own configuration.- The application then calls
ini_set('session.serialize_handler', 'php')at runtime, flipping the handler to the legacy format.ini_set()is a PHP function that changes a setting while the program is running, rather than in the settings file. - That
ini_set()call happens beforesession_start().session_start()is the function that opens the session for the current visitor. session.upload_progress.enabledis still1, that is, upload progress is still switched on.
That is the whole list of preconditions as published. No specific PHP version, no specific web server interface and no specific application is named in the advisory.
Why the third condition is the interesting one
There is no published testing process or reproduction for this bug, so there is nothing to walk through step by step from a researcher's point of view. What the advisory does make clear is the shape of the problem, and for anyone defending a server the third condition is the one to notice.
Because the handler is switched with ini_set() inside the application's own code, the dangerous state is created by the application itself. It is not something that exists just because of the default settings. In other words, a server is only in the narrow vulnerable case if somebody wrote code that changes the session format at runtime, right before opening the session.
The sequence the advisory requires
No proof of concept, request or payload has been published, and the root cause is not public. What can be stated is the order of events the advisory requires.
Step 1: start from a non-default handler
The server is configured with session.serialize_handler set to php_binary or php_serialize, in php.ini or an equivalent config layer.
Step 2: switch to the legacy handler at runtime
The application runs the following line before the session is started:
ini_set('session.serialize_handler', 'php')
Line by line: ini_set is the PHP function for changing a setting while the program runs. The first argument, 'session.serialize_handler', names the setting to change. The second argument, 'php', is the new value, the legacy serialisation format. The effect is that, for this request, session data will be written and read using the old format instead of the one configured on the server.
Step 3: keep upload progress enabled
session.upload_progress.enabled stays at its default of 1. That means upload progress information is written into $_SESSION during the request.
Step 4: start the session
session_start() runs after the ini_set() call. The session is therefore opened under the legacy handler while upload progress is still active. It is this combination that the advisory ties to code execution.
Root cause
The technical root cause has not been published. What the advisory does make clear is the shape of the problem: the format used to store session data can be changed at runtime by application code, and the upload progress feature writes progress data into the session. The issue lives in the interaction between a handler change made immediately before session_start() and the progress data written under it. Whether CVE-2026-115560 shares a root cause with CVE-2026-109619 is not confirmed.
Impact
Where the preconditions hold, the advisory states there is a chance for remote code execution. The preconditions are narrow: a non-default serialisation handler, an application that overrides it at runtime before starting the session, and upload progress left enabled. PHP has not published affected version ranges or a CVSS score. A CVSS score is a standard number from 0 to 10 that rates how severe a vulnerability is; here there is no number to look at. The report also notes that CVE-2026-115560 is not being exploited in the wild, unlike the PHP2Shell CVEs. "Exploited in the wild" means real attackers are already using it against real targets.
The fix
PHP shared the same mitigation as the 21 October advisory for CVE-2026-109619. A mitigation is a change that removes the danger even before an official patch exists.
session.upload_progress.enabled = 0
This is one line in a settings file. session.upload_progress.enabled is the name of the setting, and 0 means off. With upload progress switched off, the feature that writes data into the session during an upload is no longer active.
Set it administratively, as the advisory asks. In FPM, which is the common way PHP runs behind web servers such as Nginx, use the following in the pool config. A pool is a group of PHP worker processes with its own settings.
php_admin_flag[session.upload_progress.enabled] = off
Here php_admin_flag is a special kind of setting that application code is not allowed to change. The square brackets contain the name of the setting being forced, and off is the value. The word admin is the important part.
In Apache with mod_php, which is another common way of running PHP, the line looks like this:
php_admin_flag session.upload_progress.enabled off
Same idea, different syntax: php_admin_flag followed by the setting name and the value off.
The administrative flag matters because application code cannot override php_admin_* settings with ini_set(), and ini_set() is exactly how this bug is reached. Using the admin flag closes that door.
Restart every worker after the change rather than reloading. A worker is one of the processes that actually handles requests; a reload may leave old processes running with the old settings. Then verify on the SAPI that actually serves the site, not the CLI. SAPI stands for Server Application Programming Interface, which is just the way PHP is plugged into whatever is serving your pages; CLI is the command-line version of PHP, which is a different program with its own settings. php -i reads the CLI configuration and will mislead you, because it shows what the command-line PHP thinks, not what the web-facing PHP does. Use:
php-fpm -i | grep session.upload_progress
Line by line: php-fpm -i asks the FPM version of PHP to print its configuration information. The vertical bar, |, takes that output and hands it to the next command. grep session.upload_progress filters the output down to only the lines containing that text, so you can see the current value without scrolling through pages of settings.
Alternatively, open a phpinfo() page through the web server to confirm the setting is live where it counts. phpinfo() is a built-in PHP function that prints a long page of configuration details; viewing it through the browser shows the settings of the PHP that is actually answering web requests.
Nothing in a typical web application depends on this feature. It only matters if you are actively rendering an upload progress UI from $_SESSION. If you are, swap to a client-side progress indicator until the routine fix ships. Client-side means the work happens in the visitor's browser rather than on the server. The browser already emits progress events on XMLHttpRequest and fetch uploads, which are the standard ways a web page sends data to a server, so the replacement is straightforward.
If you applied this mitigation for PHP2Shell and never rolled it back, you are already covered and no second action is needed.
PHP has not confirmed which branches are affected or whether the fix will be backported across all supported lines. A branch is one line of development of the software, for example an older major version that still receives fixes; backporting means taking a fix written for the newest version and applying it to an older one. Keep the INI mitigation in place until the next routine release lands and you have verified the fix on your version.
For checking which binary is actually serving traffic, Astra published php2shell-triage, a free Claude skill and plugin. A binary here means the actual PHP program file on disk; it is easy to upgrade one copy and leave another running. Its read-only assessor walks /proc to find the real binary behind every running PHP-FPM, Apache and CLI worker. /proc is a special folder on Linux that the operating system uses to expose information about running programs. Read-only means the tool looks but does not change anything. It flags workers still running an old binary after an upgrade, and distinguishes distro-backported fixes from vulnerable builds. A distro is a Linux distribution, such as the operating system package a server runs, and a distro-backported fix is a patch the distribution applied to its own build of PHP. It runs only on hosts you own and contains no exploit code. Exploit code is code that actually carries out an attack; the tool deliberately does not include any.
Things to check on your own systems
- Search the codebase and every config layer for runtime
ini_setcalls againstsession.serialize_handler. If you find any such call, you are the narrow case. - Check the effective value of
session.serialize_handlerper SAPI. - Confirm
session.upload_progress.enabledthrough the web server rather than the CLI. - Watch php.net and the php-src security advisories page for the full CVE-2026-115560 write-up.
What to do before the weekend
- If you have not patched PHP2Shell yet, that remains the higher priority: those CVEs are being exploited in the wild, CVE-2026-115560 is not.
- Set
session.upload_progress.enabled = 0everywhere and leave it set until the next routine PHP release lands and you verify the fix. - Search for runtime
ini_setcalls againstsession.serialize_handler; if you find any, you are the narrow case. - Watch php.net and the php-src security advisories page for the full write-up.
As of 23 October 2026, PHP has not published affected version ranges, a CVSS score, a target release for the fix, or confirmation of whether CVE-2026-115560 shares a root cause with CVE-2026-109619.
Glossary
- PHP: a programming language widely used to build websites; the software that runs PHP pages on a server.
- RCE (remote code execution): an attack in which someone makes a server run code of their choosing, from a distance.
- CVE: a public catalogue number for a known security flaw, so everyone can refer to the same bug unambiguously.
- PHP2Shell: the nickname for the two earlier flaws, CVE-2026-109618 and CVE-2026-109619, fixed on 21 October 2026.
- Release train: the normal, scheduled cycle of software releases, as opposed to an emergency patch.
- Session: the server-side record that lets a website remember who you are between page loads.
$_SESSION: the PHP storage area that holds the data for the current visitor's session.- Upload progress: a built-in PHP feature that writes information about an in-progress file upload into the session, so a site can show a progress bar.
session.upload_progress.enabled: the setting that switches upload progress on (1) or off (0).- Serialisation: turning data into a flat string so it can be stored, and back again.
- Serialisation handler: the set of rules PHP uses for that conversion; chosen by
session.serialize_handler. session.serialize_handler: the setting naming which serialisation handler is in use, for examplephp,php_binaryorphp_serialize.php.ini: PHP's main settings file.- Config layer: any other place settings can come from, such as a web server's configuration.
ini_set(): a PHP function that changes a setting while the program is running.session_start(): the PHP function that opens the session for the current visitor.- Request path: the journey a single web request takes through the server.
- Precondition: something that must be true before a bug can be triggered.
- Root cause: the exact technical reason, in the code, why a bug happens.
- Proof of concept: a demonstration that actually triggers a bug.
- Payload: the data an attacker sends to try to trigger a bug.
- CVSS score: a standard 0 to 10 rating of how severe a vulnerability is.
- Exploited in the wild: real attackers are already using the flaw against real targets.
- Mitigation: a change that removes the danger even before an official patch exists.
- FPM: a common way of running PHP behind web servers such as Nginx.
- Pool: a group of PHP worker processes with its own settings.
php_admin_flag: a special setting that application code is not allowed to override.- Worker: one of the processes that actually handles web requests.
- SAPI: Server Application Programming Interface, the way PHP is plugged into whatever is serving your pages.
- CLI: the command-line version of PHP, a separate program with its own settings.
php -i: a command that prints the configuration of the command-line PHP.php-fpm -i: a command that prints the configuration of the FPM version of PHP.grep: a command that filters text down to lines containing a given word.phpinfo(): a built-in PHP function that prints a long page of configuration details.- Client-side: work that happens in the visitor's browser rather than on the server.
XMLHttpRequestandfetch: the standard ways a web page sends data to a server.- Branch: one line of development of the software, such as an older major version that still receives fixes.
- Backporting: applying a fix written for the newest version to an older one.
- Binary: the actual program file on disk.
/proc: a special Linux folder that exposes information about running programs.- Read-only: looks but does not change anything.
- Distro: a Linux distribution, the operating system package a server runs.
- Distro-backported fix: a patch a distribution applied to its own build of PHP.
- Exploit code: code that actually carries out an attack.