How To

Patch PHP CVE-2026-115560 on Ubuntu 26.04 / 24.04 / 22.04

On 19 November 2026 PHP fixed CVE-2026-115560, a session serializer mismatch, and CVE-2026-129289, a PHP-FPM request smuggling flaw. Ubuntu’s own php packages still carry both. PHP scores both 9.2, Critical, while Canonical’s own priority is Medium, because each needs a particular setup. Today an Ubuntu server is fixed only if its PHP comes from Ondřej Surý’s builds, meaning ppa:ondrej/php on 24.04 and 22.04 or packages.sury.org on 26.04.

Original content from computingforgeeks.com - post 192227

This guide gives the fixed package per release, shows how to check the PHP-FPM build that actually serves your sites, patches it from the Sury repositories and moves a 26.04 host off the PPA onto packages.sury.org. For servers that must stay on the Ubuntu archive until Canonical ships a USN, it covers the upload progress mitigation and the nginx and Apache connection reuse checks. All of it was tested in November 2026 on fresh Ubuntu 26.04, 24.04 and 22.04 VMs, each starting from the archive’s vulnerable php-fpm behind nginx. The PHP CVE-2026-115560 and CVE-2026-129289 overview covers both bugs, every package source and the other platforms.

Fixed PHP Packages for CVE-2026-115560 on Ubuntu

Upstream fixed both CVEs in PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, released together on 19 November (php.net news archive). On Ubuntu the fix reaches you through Sury’s packages, while Canonical’s tracker still lists every archive php package as “Needs evaluation”. A package release lower than the one in the “Fixed build” column is exposed:

Ubuntu releasePHP sourceVulnerable build we started fromFixed buildStatus on 20 Nov 2026
26.04 LTSpackages.sury.org (php8.5)8.5.4-0ubuntu1.5 (archive)8.5.13-2+0~deb.sury.org.1+ubuntu26.04Fixed
26.04 LTSppa:ondrej/phpn/anone, the PPA has no resolute buildsUse packages.sury.org
24.04 LTSppa:ondrej/php (php8.3)8.3.6-0ubuntu0.24.04.13 (archive)8.3.37-2+ubuntu24.04.1+deb.sury.org+1Fixed
22.04 LTSppa:ondrej/php (php8.3)n/a8.3.37-2+ubuntu22.04.1+deb.sury.org+1Fixed
22.04 LTSppa:ondrej/php (php8.1)8.1.2-1ubuntu2.28 (archive)8.1.34-14+ubuntu22.04.1+deb.sury.org+1 (Sury backport)Fixed
26.04 / 24.04 / 22.04Ubuntu archive php8.5 / php8.3 / php8.1current archive buildno fix yetNeeds evaluation, no USN

The archive row comes from Canonical’s pages for CVE-2026-115560 and CVE-2026-129289, read on 20 November. Every other row is what our lab VMs installed, apart from the 22.04 php8.3 row and the 26.04 PPA row, which come from apt-cache policy on those VMs. Re-check the Canonical page before you decide to wait: once a USN lands, the archive packages become the simpler fix and this table changes.

No exploitation of CVE-2026-115560 in the wild had been reported as of 20 November, according to watchTowr’s CVE-2026-115560 FAQ, and we found no report for CVE-2026-129289 either. FIRST had no EPSS score for either yet, and NVD still lists both as awaiting analysis. That is no reason to wait. PHP already published an informational advisory about session upload progress on 23 October, and both GitHub advisories now spell out the conditions below, so anyone looking for exposed servers knows what to check. The PHP2Shell check and patch guide from October covers the earlier PHP cluster, and our PHP2Shell patch for Ubuntu is the archive build in the table’s “started from” column.

The Setups Both CVEs Need

PHP’s own pre-release notice rated the critical issues as needing “either non-default configuration or uncommon setups”, and that wording matters for how fast you move. The session bug is the more common of the two, because Ubuntu’s PHP has session upload progress switched on by default. The line in php.ini is commented out, and the compiled default is on. The CVE-2026-115560 advisory says a runtime ini_set() switch is not required. Separate apps, FPM pools, vhosts or CLI jobs that use different session.serialize_handler values but share one session store already qualify, and separate pools do not get separate session storage by default.

Treat a server as exposed when any of these holds:

  • session.upload_progress.enabled reads On for the PHP that serves requests.
  • Two apps, pools or cron jobs write sessions into the same directory or Redis database.
  • nginx has fastcgi_keep_conn on in front of PHP-FPM.
  • Apache’s mod_proxy_fcgi backend carries enablereuse=on.
  • The PHP-FPM listener answers on a TCP port that something other than your web server can reach.

The smuggling bug, described in GHSA-qc49-hpvq-g2w6, needs a front end that reuses FastCGI connections and an app path that opens php://input without reading the body to the end. Connection reuse is off by default in nginx and in Apache, so a stock Ubuntu nginx and php-fpm pair is not exposed to it. HAProxy with kept FastCGI connections also qualifies. The advisory also tells you never to expose an FPM or LSAPI listener, which is why the last item in the list matters, especially on container hosts where FPM often listens on a TCP port.

The PHP Build That Serves Your Site

Check the FPM package and the FPM binary, not only php -v. The CLI and FPM are separate packages, a box that has been around for a few years often runs two PHP branches, and Ubuntu backports keep the old upstream version string. Start by listing every installed FPM package:

dpkg -l 'php*-fpm' | grep ^ii

The 24.04 VM had the archive’s php8.3 and nothing else:

ii  php8.3-fpm     8.3.6-0ubuntu0.24.04.13 amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)

Then ask the binary and the running pool. The FPM binary is versioned (php-fpm8.3, php-fpm8.5, php-fpm8.1), and a one-line test page shows what nginx actually hands requests to, including the effective upload progress setting. Put it in the document root of a vhost that already serves PHP; our lab VMs used the default site with a \.php$ location passing to the FPM socket, so /var/www/html and 127.0.0.1 worked. For a named vhost, use its root and add -H 'Host: example.com' to the curl:

php-fpm8.3 -v
echo '<?php echo PHP_VERSION, " ", PHP_SAPI, " upload_progress=", var_export(ini_get("session.upload_progress.enabled"), true), "\n";' | sudo tee /var/www/html/ver.php >/dev/null
curl -s http://127.0.0.1/ver.php

Before patching, the 24.04 box reported the vulnerable 8.3.6 build with upload progress on, which is the session bug’s precondition on a stock install:

Ubuntu 24.04 archive php8.3-fpm 8.3.6 vulnerable to CVE-2026-115560 with session upload progress enabled

If curl prints the PHP source instead of a version line, that vhost is not routing .php to FPM, and the stock Ubuntu nginx default site does not. Remove the page with sudo rm /var/www/html/ver.php once you have finished checking, because it tells anyone who finds it your exact PHP build. On 26.04 the same check returned 8.5.4 fpm-fcgi upload_progress='1', and on 22.04 it returned 8.1.2-1ubuntu2.28 fpm-fcgi upload_progress='1'. The jammy build appends the Ubuntu package release to 8.1.2, while the noble and resolute builds report the bare upstream version.

Patching PHP From ppa:ondrej/php on 24.04 and 22.04

The PPA is the fastest fix on 24.04 and 22.04, but adding it to a server that runs the archive’s PHP is a bigger change than a security update. The PPA’s builds outrank the archive’s, so from then on every PHP update for that branch comes from the PPA and not from Canonical, and the next plain apt upgrade moves any other PHP branch and php-common over as well. If you already run PHP from the PPA, as our PHP 8.3 on Ubuntu guide sets up, skip the first command. Add the repository:

sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update

Confirm the candidate before you upgrade anything. When we first ran this, the noble index still offered 8.3.36 while the jammy one already had 8.3.37, and the fixed noble build showed up about a quarter of an hour later. A candidate below the fixed build means the index has not caught up yet, so wait and run apt-get update again:

apt-cache policy php8.3-fpm

Once the index caught up, the 24.04 VM showed the PPA build as the candidate, one line above the archive’s installed 8.3.6 build:

php8.3-fpm:
  Installed: 8.3.6-0ubuntu0.24.04.13
  Candidate: 8.3.37-2+ubuntu24.04.1+deb.sury.org+1
  Version table:
     8.3.37-2+ubuntu24.04.1+deb.sury.org+1 500
        500 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble/main amd64 Packages
 *** 8.3.6-0ubuntu0.24.04.13 500
        500 http://europe-west1.gce.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     8.3.6-0maysync1 500
        500 http://europe-west1.gce.archive.ubuntu.com/ubuntu noble/universe amd64 Packages

Both sources have priority 500, so apt simply takes the higher version. List what the upgrade will touch, then upgrade only the PHP branch in question. The glob keeps the run to the installed php8.3-* packages instead of pulling in every pending update on the box:

apt list --upgradable 2>/dev/null | grep php
sudo apt-get install --only-upgrade 'php8.3-*'

apt prints a “Skipping … it is not installed” line for every PHP extension the PPA carries that you don’t have, then upgrades the installed ones: five packages on 24.04 (cli, common, fpm, opcache and readline). php-common stays at the archive version and pending, which is harmless. Untouched config files get replaced, which on 22.04 included /etc/php/8.1/fpm/pool.d/www.conf. If you edited php.ini or a pool file, for example with the mitigation further down, apt stops and asks; keep your local version. Restart FPM so the workers load the new binary:

sudo systemctl restart php8.3-fpm
dpkg -l 'php*-fpm' | grep ^ii
php-fpm8.3 -v
curl -s http://127.0.0.1/ver.php

The 24.04 VM moved from 8.3.6 to 8.3.37, and the test page reports the new build answering through nginx. It also shows upload_progress='0' although nobody touched php.ini in this run, which the 26.04 section below explains:

php8.3-fpm patched for CVE-2026-115560 and CVE-2026-129289 from ppa:ondrej/php on Ubuntu 24.04

The package changelog is the proof that does not depend on version strings. Sury lists each CVE the release fixes, so a count of 2 means both are in the build you installed:

zcat /usr/share/doc/php8.3-common/changelog.Debian.gz | grep -c -E 'CVE-2026-115560|CVE-2026-129289'

On the 24.04 VM it printed 2, and the matching lines name both bugs by their PHP titles:

php8.3-common changelog listing CVE-2026-115560 and CVE-2026-129289 after the ppa:ondrej/php upgrade on Ubuntu 24.04

A 0 here means apt installed an older build from a stale index, so run apt-get update and check the policy again before you restart anything.

PHP 8.1 on Ubuntu 22.04

Ubuntu 22.04 ships PHP 8.1, which upstream no longer patches, so 8.1.34 is not an upstream fixed release. Sury still builds php8.1 for jammy and backported both fixes from 8.2.36. The PPA candidate on our 22.04 VM was 8.1.34-14+ubuntu22.04.1+deb.sury.org+1, and after sudo apt-get install --only-upgrade 'php8.1-*' and sudo systemctl restart php8.1-fpm the changelog check on php8.1-common found both CVEs:

PHP 8.1 on Ubuntu 22.04 from ppa:ondrej/php with the CVE-2026-115560 and CVE-2026-129289 backports in the changelog

A backport keeps 8.1 alive, but it is one maintainer’s patch set on a branch nobody upstream tests any more. If your apps run on 8.3, the jammy PPA already has the fixed 8.3.37 and that is the better place to land. Our guide to end-of-life PHP 8.1, 8.0 and 7.4 covers the cases where moving off 8.1 is not possible yet.

Moving Ubuntu 26.04 Hosts to packages.sury.org

Adding ppa:ondrej/php on 26.04 does not fail, and that is the trap. add-apt-repository writes a resolute source, apt-get update fetches its index without an error, and apt-cache policy still offers only the archive’s vulnerable 8.5.4 build. The PPA description says so itself when you add it:

Description:
This repository is in process of being merged into https://packages.sury.org/php/;

For Ubuntu Resolute, https://packages.sury.org/php/ is the canonical way of getting PHP packages, for previous releases, I will provide a simple way how to migrate to the new repositories in upcoming weeks, you can still use this repository for Ubuntu Jammy and Ubuntu Noble.

We asked our 26.04 VM for four PHP branches with the PPA in place. Only php8.5 came back, and only as the archive’s 8.5.4 build, because the PPA’s resolute suite has nothing in it:

ppa:ondrej/php on Ubuntu 26.04 resolute leaving php8.5-fpm on the vulnerable archive build 8.5.4

That same command removed the PPA again, which is what you want too, so apt does not keep polling an empty index:

sudo add-apt-repository -y --remove ppa:ondrej/php

Then add packages.sury.org the way its README documents. The keyring comes as a small package, and the source line pins the repository to that keyring with signed-by, so Sury’s key is trusted for this repository only and not for every source on the box:

sudo apt-get update
sudo apt-get -y install lsb-release ca-certificates curl
sudo curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt-get update

The repository serves resolute next to noble, jammy, trixie and bookworm, so $(lsb_release -sc) expands to resolute on 26.04. The candidate now comes from packages.sury.org and carries the 8.5.13 fix. Its changelog entry still reads experimental and UNRELEASED, so test it on one host before you roll it across a fleet:

packages.sury.org repository added on Ubuntu 26.04 with php8.5-fpm 8.5.13 as the candidate

Upgrade the php8.5 packages and restart FPM. On our VM that was four packages (cli, common, fpm and readline), and needrestart reported nothing else to restart:

sudo apt-get install --only-upgrade 'php8.5-*'
sudo systemctl restart php8.5-fpm

Check the result the same way as on the older releases. The FPM binary, the test page and the changelog should all agree on 8.5.13 with both CVEs listed:

php8.5-fpm 8.5.13 from packages.sury.org on Ubuntu 26.04 with CVE-2026-115560 and CVE-2026-129289 in the changelog

Look at upload_progress='0' in that output. We did not touch php.ini on this VM, and its line still reads ;session.upload_progress.enabled = On as a comment, yet the patched build reports the setting off. That is the fix working as the advisory describes. Upload progress is now off unless you set it to 1 yourself, and while it is on, PHP rejects runtime changes to session settings. If your php.ini or a pool file sets it to 1 explicitly, it stays on after the update. If you are setting up the same release on a workstation as well, our lab-tested Ubuntu Desktop 26.04 guide covers that install and the Node.js, Java, Docker and KVM setup on top of it.

Mitigation for Hosts on the Ubuntu Archive PHP

A server that must keep Canonical’s php packages, for support contracts or because third-party repositories are not allowed, has no patched build to install yet. You can still remove the session bug’s precondition: turn upload progress off in the FPM php.ini or the pool config, then restart every worker. An ini_set() call in the application runs too late to help, and PHP’s 21 October advisory for the PHP2Shell bug CVE-2026-109619, which first recommended this setting, says not to rely on ini_set() or an FPM .user.ini for it. On the archive build of 24.04:

sudo sed -i 's/^;\?session.upload_progress.enabled.*/session.upload_progress.enabled = 0/' /etc/php/8.3/fpm/php.ini && grep -n 'session.upload_progress.enabled' /etc/php/8.3/fpm/php.ini
sudo systemctl restart php8.3-fpm; systemctl is-active php8.3-fpm
curl -s http://127.0.0.1/ver.php
php-fpm8.3 -i | grep upload_progress.enabled

The sed rewrites the commented default into an explicit 0, and the other two checks prove that the FPM binary and the running pool both picked it up:

session.upload_progress.enabled set to 0 in the PHP-FPM php.ini on Ubuntu 24.04 as a CVE-2026-115560 mitigation

Change 8.3 to 8.5 on 26.04 and to 8.1 on 22.04, and repeat it for every PHP branch that has an FPM pool. A pool file that sets php_admin_value[session.upload_progress.enabled] overrides php.ini, so grep /etc/php/*/fpm/pool.d/ for it too. The only thing you give up is the upload progress bar on forms that use it. This setting does nothing for CVE-2026-129289 or the other sixteen CVEs in the 8.5.13 release, so treat it as a holding measure until a patched package exists.

FastCGI connection reuse in nginx and Apache

The smuggling bug needs connection reuse, so prove it is off. nginx -T prints the full merged configuration, includes and all, which catches a fastcgi_keep_conn buried in a snippet file:

sudo nginx -T 2>/dev/null | grep -c fastcgi_keep_conn

All three VMs printed 0, the stock state, because nginx defaults fastcgi_keep_conn to off. Any other number means a vhost turned it on, usually next to an upstream block with keepalive set for performance, and that line should go until PHP is patched. On Apache with PHP-FPM, search the site configs for enablereuse and its inverse, disablereuse, because disablereuse=Off turns reuse on too:

sudo grep -rnE 'enablereuse|disablereuse' /etc/apache2/

No output is the safe answer, because mod_proxy_fcgi leaves reuse off unless a ProxyPass or BalancerMember line asks for enablereuse=on or disablereuse=Off. The PHP-FPM listener is the other half of this check. Ubuntu’s pool file listens on a Unix socket, which nothing outside the box can reach:

grep -E '^listen' /etc/php/8.3/fpm/pool.d/www.conf
sudo ss -ltnp | grep -E 'php|9000'

On the 24.04 VM the pool showed listen = /run/php/php8.3-fpm.sock, owned by www-data, and ss found no TCP listener. A pool changed to listen = 9000 or 0.0.0.0:9000 lets any host that reaches the port talk FastCGI to PHP directly, so bind it to 127.0.0.1 or a socket and close the port in the firewall. If nginx and PHP run on separate hosts or containers, put FPM on a private network that only the web tier can reach. The PHP2Shell mitigation guide for PHP-FPM, nginx and Cloudflare has more on locking that path down.

Audit Checklist After Patching PHP on Ubuntu

Patching one branch and restarting one service leaves gaps on servers with several sites. Work through these in order on every PHP host and don’t stop at the first one that passes:

  1. dpkg -l 'php*-fpm' shows a fixed build from the table for every installed branch.
  2. The changelog grep returns 2 for each branch’s -common package.
  3. Every php*-fpm service has restarted since the upgrade, and needrestart lists no PHP process.
  4. A test page served through the web server reports the patched version, then gets deleted.
  5. session.upload_progress.enabled is off unless an app needs it, and then every app sharing the session store uses the same serializer.
  6. fastcgi_keep_conn on, enablereuse=on and disablereuse=Off are absent from the web server configuration.
  7. No PHP-FPM pool listens on a TCP port reachable from outside the host or its private network.
  8. Hosts on the archive PHP have a reminder to check the Ubuntu CVE page for a USN.

Item 5 matters most on shared hosts, because the session bug lives in the session store two apps share, and the next PHP update will not fix an explicit session.upload_progress.enabled = 1 in a pool file. Container images need the same audit: the official php image on Docker Hub published its 8.5.13 tags on 19 November, but a running container keeps its old PHP until you pull the new tag and recreate it. For the nginx side of the stack, our nginx HTTP/2 CVE-2026-123007 patch guide from the same week is worth running on these hosts while you are logged in. Running the same PHP on Red Hat family servers? Follow the RHEL, Rocky Linux and AlmaLinux version of this patch.

Keep reading

Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Security Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) Ubuntu Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 GL.iNet Security Notice: Check Your Router for Malware and Update Networking GL.iNet Security Notice: Check Your Router for Malware and Update Flatpak 1.18.6 Sandbox Escape CVEs: Check Version and Patch Security Flatpak 1.18.6 Sandbox Escape CVEs: Check Version and Patch Install and Configure PostgreSQL 17 on Ubuntu 24.04 / Debian 13 Databases Install and Configure PostgreSQL 17 on Ubuntu 24.04 / Debian 13

Leave a Comment

Press ESC to close