
PHP ships a critical security release today. Reports link it to a session flaw that one setting closes now. What the setting does, what you give up, and how to check.
*Update, 19 November: the release is out. It confirms the flaw and the mitigation, and shows the risk is wider than first reported; see "What the release confirmed" below.*
The PHP project announced a security release (opens in a new tab) for 19 November 2026, between 14:00 and 14:30 UTC, that fixes flaws in every supported version, with the highest rated critical. The announcement itself gives no technical details: those come with the release. Security news reports expect it to include CVE-2026-115560, a remote code execution flaw that only works under specific conditions, and they pass on a one-line mitigation you can apply today. For most sites it costs nothing you will miss. Here is what I looked at and what I would do.
What the flaw needs
The early reports named two conditions, and the advisory published with the release confirms them:
- A switched session serializer. The application sets
session.serialize_handlertophp_binaryorphp_serializein its configuration, and its code switches it back tophpwithini_set()before callingsession_start(). - Session upload progress enabled. That is PHP's default, so almost everyone has it on.
The first condition is rare inside one application. But the advisory is wider than the early reports: the same mismatch happens between two applications, PHP pools, virtual hosts or command-line scripts that use different serializer settings and share the same session folder. For code execution an attacker also needs a suitable class in the application to abuse, and common libraries such as Guzzle and Monolog qualify. So "I never switch the serializer" is not enough on its own: check what else writes to the same session storage.
The mitigation: one setting
Turn off session upload progress until the patched release is installed:
; e.g. a file of its own in the PHP conf.d folder for your web SAPI
session.upload_progress.enabled = 0
Then restart or reload the PHP workers. A changed ini file does nothing until the running processes read it again, which is the step people forget most.
What you lose
Session upload progress is the feature where PHP writes the progress of a file upload into $_SESSION, so a second request can poll it and draw a progress bar. With it off, that data simply never appears. Nothing else in sessions changes.
In practice few sites rely on it:
- Browsers can do it themselves. Upload progress events in
XMLHttpRequest(upload.onprogress) report progress on the client, with no server help. - Buffering proxies hide it anyway. If something in front of PHP buffers the whole request body before passing it on, PHP only sees the upload when it is complete, so the progress bar jumped from 0 to 100 regardless.
- Old upload widgets may notice. If you run an older library that polls a progress endpoint, its bar will stay empty. The upload itself still works.
Pros and cons
The pros: it closes this flaw today, and it removes a feature that lets an unauthenticated request write data into a session of its choosing. That same behaviour has been part of older attack chains, so it is worth having off even after the patch, if you do not use it.
The cons: the server-side progress bar is gone, and you have one more non-default setting to remember when you move or rebuild a server. Write it down next to the rest of your PHP configuration.
A few tips
- Check the right PHP. The command line and the web server often read different ini files.
php -itells you about the CLI, not about your site. - Ask the running site. A tiny temporary script shows what web requests really get. Delete it straight after.
- Search your own code for scripts that switch the serializer, to see whether the first condition applies to you at all.
- Harden sessions while you are there.
session.use_strict_mode = 1makes PHP refuse session IDs it did not create itself.
<?php // check.php: open once in the browser, then delete it
var_dump(ini_get('session.upload_progress.enabled'));
var_dump(ini_get('session.serialize_handler'));
grep -rn "serialize_handler" --include='*.php' /path/to/your/app
What the release confirmed
PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36 fix this flaw, rated critical (see the official advisory (opens in a new tab)). The fix turns session upload progress off by default and refuses runtime changes to session settings while it is on. An explicit session.upload_progress.enabled = 1 in your configuration overrides the new default, so look for one.
The same release fixes a second critical session flaw: an interrupted write can leave a session file holding parts of two sessions, which can again lead to code execution. Turning off upload progress removes one way in, but applications that keep large user-controlled strings in sessions stay exposed until PHP is updated. If you install PHP from your operating system's packages, the fix usually arrives a little later than the official release; the package changelog will name the CVE once it is in.
What to do first
- Check
session.upload_progress.enabledas your web server sees it. - If it is on and you do not use server-side upload progress, set it to
0and restart the PHP workers. - Check that no two applications, pools or scripts with different serializer settings share one session folder.
- Search your code for
serialize_handlerswitches. - Install the patched PHP release as soon as your package source has it, and confirm the CVE in its changelog.
Frequently asked questions
Am I vulnerable if I never change the session serializer?
Less likely, but not safe by default. Another application, pool or script that writes to the same session folder with a different serializer can create the same mismatch. Turning off upload progress closes this path either way.
Does turning off upload progress break file uploads?
No. Uploads work exactly as before. Only the progress data PHP would write into the session disappears.
Can I turn it back on after updating?
Yes, but the patched release turns it off by default, and while it is on PHP refuses runtime changes to session settings. If nothing on your site uses server-side upload progress, leave it off.
For more on how I work with PHP and on keeping sites safe, see the tag pages. For the release itself, read the official advisory (opens in a new tab); for the setting, the PHP session configuration reference (opens in a new tab).