The bug in two sentences
Thefiles session handler writes new session data over the existing file without clearing it first. If the write is interrupted, the file holds the start of the new session followed by the end of the old one: on the next session_start(), PHP unserializes that mix, and bytes from a plain string can turn into objects.
According to the PHP advisory, the attack needs three things:
- the attacker can influence session contents, for example through file upload progress tracking (
session.upload_progress) or through long strings the application stores in the session; - they can interrupt the write at the right moment, for example with a memory exhaustion that kills the process;
- a deserialization gadget chain is available.
multipart/form-data request that reaches PHP with upload progress enabled is enough as an entry point. They published a demonstration video, with no exploit code.
The payoff for the attacker: code execution with the PHP worker’s privileges. The flaw can also corrupt session data.
Affected versions:
- PHP before 8.2.36;
- PHP 8.3.0 through 8.3.36, fixed in 8.3.37;
- PHP 8.4.0 through 8.4.27, fixed in 8.4.28;
- PHP 8.5.0 through 8.5.12, fixed in 8.5.13.
AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N); NVD carries the same score. Red Hat rates it “Critical” with 8.1 in CVSS 3.1, Ubuntu medium priority. The full advisory is GHSA-fm2m-fjf5-v3cp.
According to CISA’s assessment, carried by NVD, no exploitation has been reported, but the attack is rated as automatable. The same PHP release fixes PHP-FPM (CVE-2026-129289) and PHP-FPM (CVE-2026-129291): one update covers all three.
Sizing your exposure
The question to ask: are your PHP sessions stored in files? That is the default, whichever way PHP runs (PHP-FPM, mod_php, CGI).
Check the session handler and upload progress in the loaded configuration:
session.save_handler => files means file sessions. session.upload_progress.enabled => On means the entry point described by the researchers is open.
The application can also pick its session store in its own code or configuration. If you are not sure which store is in use, treat it as file sessions and update.
Updating PHP, distro by distro
The real fix is a PHP package update followed by a restart of PHP-FPM and Apache: processes already running keep the old code. Take a snapshot of your VPS first.Debian
Ubuntu
Don’t rely on the version printed by
php -v alone. Debian and Ubuntu backport the fix: Ubuntu 24.04 still reports PHP 8.3.6 once patched. Only the full package version, compared with your distribution’s advisory, is the reference.RHEL and AlmaLinux
Red Hat lists RHEL 7, 8, 9 and 10 as affected. As of November 24, 2026, its bulletin RHSB-2026-020 says fixes are being expedited, with no erratum released yet: follow the Red Hat CVE page. For AlmaLinux, watch errata.almalinux.org.Containers
Red Hat recommends rebuilding images based on RHEL or UBI as soon as their base image is updated. The same goes for any image that ships PHP: rebuild it on a fixed version, then redeploy.Turning off session.upload_progress until you can update
The PHP team and Red Hat recommend turning off file upload progress tracking until the fixed package is installed. The setting must apply before the request is parsed: anini_set() in the application comes too late. Put it in a conf.d file loaded at startup, then restart every PHP process.
/etc/php/8.3/fpm/pool.d/www.conf):
This mitigation closes the file upload entry point. It does not protect an application that itself stores attacker-supplied data in the session: limit that data and update. A session store that replaces each record in one go is not hit by this write defect.
Checking the mitigation
session.upload_progress.enabled => Off. Red Hat reminds you to check every PHP-FPM pool, every virtual host and every application-level override: changing only the command-line PHP configuration is not enough.
Re-enabling upload progress after the update
The PHP advisory describes this as a temporary measure. Once PHP is fixed and restarted, you can bring upload progress back if an application uses it to show how far an upload has gone:What next?
Turning offsession.upload_progress is only a stopgap: the target remains your distribution’s fixed PHP package. The same update also fixes the PHP-FPM flaw CVE-2026-129289. Turn on automatic security updates to get the next fixes without waiting. For any technical question, open a ticket from your OnetSolutions customer area.
