The fix is out: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP released them on 21 October at about 13:35 UTC (PHP’s advisory ). Ubuntu, Debian, Red Hat, Amazon Linux, Alpine and the big third-party repositories have fixed packages. Package status shows where you can get it.
This post shows how to install the fix on Ubuntu, Debian and Red Hat, what to restart, and how to check that the fix is running. After that, you can undo most of the early mitigation steps . See roll back the early mitigations .
Like the early mitigation post, most of this post was written with Claude and Codex. Every command was tested in containers, against the current packages.
Updates#
- 24 October, 09:35 UTC. packages.sury.org arm64 has more fixed builds: 8.2 and 8.3 on Debian 12, 8.5 on Ubuntu 24.04, and every old branch except 8.1 on Debian 13 and Ubuntu 22.04. Ubuntu 26.04 arm64 still has no fixed 8.5 there. Added why arm64 is slow . XAMPP, NativePHP and cPanel now have the fix. See package status .
- 23 October, 08:40 UTC. Removed outdated status from both posts. Ubuntu 22.04, Red Hat, Amazon Linux and CloudLinux have the fix now; the only Red Hat stream without one is
php:8.4on RHEL 9. See which PHP your distribution ships . - 23 October, 08:19 UTC. More packages.sury.org arm64 builds: 8.4.27 on Ubuntu 26.04, and patched 7.3, 7.4, 8.0 and 8.1 on more Debian and Ubuntu releases. CloudLinux says its fixed alt-php is in stable on CloudLinux 7, 8 and 9. See package status .
- 23 October, 02:55 UTC. More packages.sury.org arm64 builds: 8.4.27 on Ubuntu 22.04, patched 7.4 on Debian 13 and Ubuntu 22.04, patched 8.0 on Ubuntu 24.04. See package status .
- 22 October, 20:55 UTC. Laragon 8.8.0 ships PHP 8.3.36. packages.sury.org arm64 has 8.5.12 on Debian 12 and the patched 7.4 on Ubuntu 24.04. See package status .
- 22 October, 14:49 UTC. No patched build for your old PHP? Added a third-party extension as a stopgap. PHP did not review it. See PHP 8.1 or older .
- 22 October, 12:21 UTC. packages.sury.org has the patched PHP 8.1 on Ubuntu 24.04 arm64. See PHP 8.1 and older .
- 22 October, 11:53 UTC. Plesk patched its PHP 7.4, 8.0 and 8.1, but not 5.6 or 7.0 to 7.3. Plesk did not announce it; I checked the binaries. See PHP 8.1 and older .
- 22 October, 11:22 UTC. packages.sury.org has the patched PHP 7.4 on Debian 12 arm64. See PHP 8.1 and older .
- 22 October, 10:51 UTC. The separate bug that “still works on 8.5.12” can be triggered remotely, says its finder. No fix yet. See is the fix incomplete? .
- 22 October, 09:23 UTC. The packages.sury.org rows now include Ubuntu 26.04: fixed on amd64, arm64 is still building. See package status .
- 22 October, 09:12 UTC. New table: PHP 8.1 and older , with every repository that patched the end-of-life branches.
- 22 October, 08:59 UTC. Ondřej’s repositories have the fix for PHP 5.6 to 8.1 too. I checked the patch in each package. See notes .
- 22 October, 07:23 UTC. The first arm64 build is on packages.sury.org: 8.2.35 for Ubuntu 22.04. The table now shows the sury arm64 rows per release. See package status .
- 22 October, 05:49 UTC. Claims that the fix is incomplete trace back to a separate, older bug. Added known problems after the upgrade : three new bugs in 8.4.27 and 8.5.12.
- 21 October, 21:22 UTC. Ondřej’s PPA now has all four branches on arm64 too. Alpine edge has the fix on aarch64. See package status .
- 21 October, 20:47 UTC. Alpine edge has the fix on x86_64; aarch64 is still building. The Alpine rows now show each architecture. See package status .
- 21 October, 20:09 UTC. Alpine 3.24 has the fix for 8.3, 8.4 and 8.5. An Alpine developer told me older Alpine releases will not get one. Laravel Herd has all four, says its developer Marcel Pociot . Ondřej’s PPA has 8.4 on arm64 too. See package status .
- 21 October, 19:50 UTC. Added software that ships its own copy of PHP, such as FrankenPHP, Bref, Heroku, Plesk, MAMP, Laragon and NativePHP. Several of them do not have the fix yet. See PHP built into other software .
- 21 October, 19:20 UTC. Remi’s repository has the fix for 8.2 to 8.5 on RHEL 8, 9 and 10, contrary to the earlier advice. Thanks to Dave for the tip. See package status .
- 21 October, 18:46 UTC. Ondřej’s PPA has the fixed packages on amd64, and 8.2 and 8.3 on arm64. Its download server fails now and then; if
apt updateerrors, packages.sury.org has the same amd64 builds. FrankenPHP 1.13.2 ships the fixed PHP. See package status . - 21 October, 18:10 UTC. Homebrew has 8.5.12. See package status .
- 21 October, 17:40 UTC. All official Docker images are fixed. Homebrew has 8.2.35 too. See package status .
- 21 October, 17:10 UTC. The official Docker images are out for amd64, and for arm64 except 8.2. Homebrew has 8.3.36 and 8.4.27. See package status .
- 21 October, 16:40 UTC. The first official Docker image with the fix is out (
php:8.2.35-fpm, amd64). Ubuntu Pro’s fixes for older releases are in USN-8948-2. See package status . - 21 October, 16:13 UTC. Debian 12 is fixed. Ubuntu Pro has fixes for 18.04 and 20.04. The Docker tags exist but are still empty. See package status .
- 21 October, 15:38 UTC. Debian 12’s fix is announced (DLA-4848-1), but not installable with
aptyet. Added Alpine. See package status . - 21 October, 15:25 UTC. Zend says its LTS builds of PHP 7.2 to 8.1 are patched. See which PHP versions get a fix .
- 21 October, 15:04 UTC. The fixes for PHP 7.4, 8.0 and 8.1 are a smaller “minimal mitigation” that also turns off upload progress. See which PHP versions get a fix . The PPA’s fixed packages are still building.
- 21 October, 14:55 UTC. Added what the new hard memory limit does by default. See after the upgrade .
- 21 October, 14:50 UTC. Ubuntu’s fix now installs with
apton amd64 too. Removed the Launchpad workaround. See package status . - 21 October, 14:40 UTC. New package status
table, per architecture. Ubuntu’s fix is installable with
apton arm64 but not yet on amd64. A Launchpad workaround for amd64 was added, and removed again at 14:50 UTC. - 21 October, 14:15 UTC. Ubuntu published USN-8948-1
, but
aptcannot see the packages yet. Debian 12 is building. Added Docker, Gentoo and a note for PPA users. See package status . - 21 October, 13:55 UTC. The researchers published php2shell.com . Added what they add: the bugs can also leak memory, and the fixed PHP has a new hard memory limit. See what the bugs are .
- 21 October, 13:50 UTC. Fixed packages are out on packages.sury.org (amd64), in Debian 13’s security archive (
php8.4), and for Ubuntu 24.04 on Launchpad. See package status . - 21 October, 13:45 UTC. PHP released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 and published both advisories. Added the fixed versions and what the bugs are . Distribution packages are not out yet.
- 21 October, 10:25 UTC. Published before the release, so you can prepare. The fixed version numbers get added here after 14:00 UTC.
Package status#
Which sources have the fixed PHP. Every cell comes from the repository’s own package index, the same file apt, brew or pacman reads.
Last checked at 09:30 UTC on 24 October.
- ✔Fixed
- 8.4.26Vulnerable, shows the version it has
- —Branch not shipped
- ?Could not check
PHP’s own versions#
These sources ship PHP’s own version numbers. The fixed version for each branch is in the column header.
| Source | 8.2fix 8.2.35 | 8.3fix 8.3.36 | 8.4fix 8.4.27 | 8.5fix 8.5.12 |
|---|---|---|---|---|
| Debian and Ubuntu | ||||
| packages. | ✔ | ✔ | ✔ | ✔ |
| packages. | ✔ | ✔ | 8.4.26 | ✔ |
| packages. | 8.2.34 | 8.3.35 | 8.4.26 | 8.5.11 |
| packages. | ✔ | 8.3.35 | ✔ | 8.5.11 |
| packages. | 8.2.34 | 8.3.35 | 8.4.26 | ✔ |
| packages. | 8.2.34 | 8.3.35 | ✔ | 8.5.11 |
| ppa:ondrej/ | ✔ | ✔ | ✔ | ✔ |
| ppa:ondrej/ | ✔ | ✔ | ✔ | ✔ |
| Containers | ||||
Docker php imageamd64Debian | ✔ | ✔ | ✔ | ✔ |
Docker php imagearm64Debian | ✔ | ✔ | ✔ | ✔ |
| macOS and Windows | ||||
| Homebrew | ✔ | ✔ | ✔ | ✔ |
| windows. | ✔ | ✔ | ✔ | ✔ |
| Other Linux | ||||
Arch Linux extra | — | ✔ | — | ✔ |
| Alpine 3.24x86_64 | — | ✔ | ✔ | ✔ |
| Alpine 3.24aarch64 | — | ✔ | ✔ | ✔ |
| Alpine edgex86_64 | — | ✔ | ✔ | ✔ |
| Alpine edgeaarch64 | — | ✔ | ✔ | ✔ |
| Gentoo | ✔ | ✔ | ✔ | ✔ |
| RHEL and clones | ||||
| Remix86_64RHEL 8, 9, 10 and clones | ✔ | ✔ | ✔ | ✔ |
| Remiaarch64RHEL 8, 9, 10 and clones | ✔ | ✔ | ✔ | ✔ |
| Source | ||||
| php.net | ✔ | ✔ | ✔ | ✔ |
Distribution packages#
Ubuntu and Debian put the fix into the PHP version they already ship. So their version numbers differ from PHP’s. These are the package versions with the fix.
| Distribution | Fixed version | amd64 | arm64 |
|---|---|---|---|
| Ubuntu | |||
| Ubuntu 22.04php8.1 | 8.1.2-1ubuntu2.28 | ✔ | ✔ |
| Ubuntu 24.04php8.3 | 8.3.6-0ubuntu0.24.04.13 | ✔ | ✔ |
| Ubuntu 26.04php8.5 | 8.5.4-0ubuntu1.5 | ✔ | ✔ |
| Debian | |||
| Debian 12php8.2 | 8.2.35-1~deb12u1 | ✔ | ✔ |
| Debian 13php8.4 | 8.4.27-1~deb13u1 | ✔ | ✔ |
PHP 8.1 and older#
PHP no longer releases these branches. Some repositories patched them with PHP’s minimal patch. It turns off upload progress completely and adds no hard memory limit. A ✔ here means patched, not supported: plan the move to 8.2 or newer.
| Source | 5.6–7.3 | 7.4 | 8.0 | 8.1 |
|---|---|---|---|---|
| Debian and Ubuntu | ||||
| packages. | ✔ | ✔ | ✔ | ✔ |
| packages. | ✔ | ✔ | ✔ | ✔ |
| packages. | ✔ | ✔ | ✔ | no fix |
| packages. | ✔ | ✔ | ✔ | no fix |
| packages. | ✔ | ✔ | ✔ | ✔ |
| packages. | ✔ | ✔ | ✔ | ✔ |
| ppa:ondrej/ | ✔ | ✔ | ✔ | ✔ |
| ppa:ondrej/ | ✔ | ✔ | ✔ | ✔ |
| Ubuntu Pro (ESM)7.0 on 16.04, 7.2 on 18.04, 7.4 on 20.04 (USN-8948-2) | ✔ | ✔ | — | — |
| Freexian ELTS7.0 on Debian 9, 7.3 on Debian 10, 7.4 on Debian 11 (ELA-1853 to 1855) | ✔ | ✔ | — | — |
| RHEL and clones | ||||
| Red Hatphp:7.4 on RHEL 8, php 8.0 on RHEL 9 (Red Hat VEX) | — | ✔ | ✔ | — |
| RemiRHEL 8 and 9. 7.2 and 7.3 exist only for RHEL 8, and have no fix (changelog) | no fix | ✔ | ✔ | ✔ |
| CloudLinux alt-phpCloudLinux 7, 8, 9 (CloudLinux status page) | ✔ | ✔ | ✔ | ✔ |
| Hosting control panels | ||||
| Pleskplesk-php packages, checked in the binaries | no fix | ✔ | ✔ | ✔ |
| cPanel EasyApache 4ea-php packages. 5.4 to 7.3 have no fix (changelog) | no fix | ✔ | ✔ | ✔ |
PHP built into other software#
Some software ships its own copy of PHP. apt, dnf or brew does not update that copy. You need a new release of the software itself. Each tile shows the PHP version in its newest release.
| Software | 8.2fix 8.2.35 | 8.3fix 8.3.36 | 8.4fix 8.4.27 | 8.5fix 8.5.12 |
|---|---|---|---|---|
| App servers | ||||
| FrankenPHPrelease v1.13.2 | ✔ | ✔ | ✔ | ✔ |
| swoole-clirelease v6.2.2.2 | — | — | 8.4.25 | — |
| Serverless and hosting platforms | ||||
| BrefAWS Lambda layers | ✔ | ✔ | ✔ | ✔ |
| HerokuPHP buildpack, heroku-24 | ✔ | ✔ | ✔ | ✔ |
| Hosting control panels | ||||
| Pleskplesk-php packages | ✔ | ✔ | ✔ | ✔ |
| cPanel EasyApache 4ea-php packages in the EA4 repository | ✔ | ✔ | ✔ | ✔ |
| CloudLinux alt-phpCloudLinux 7, 8, 9. Source: CloudLinux's status page, 23 October | ✔ | ✔ | ✔ | ✔ |
| Local development | ||||
| Laravel HerdUpdate in Herd's PHP settings. Source: its developer, Marcel Pociot, 21 October | ✔ | ✔ | ✔ | ✔ |
| ServBaymacOS (v1) packages | ✔ | ✔ | ✔ | ✔ |
| ServBayWindows (v1) packages | ✔ | ✔ | ✔ | ✔ |
| ServBaymacOS (v2) packages | 8.2.30 | 8.3.30 | 8.4.18 | 8.5.3 |
| MAMPmacOS, release 7.4.4 of 2026-10-01 | — | 8.3.28 | 8.4.15 | 8.5.0 |
| LaragonWindows, release 8.8.0 | — | ✔ | — | — |
| XAMPPWindows, releases of 23 October. No new 8.2 release | 8.2.12 | ✔ | ✔ | ✔ |
| Static binaries and desktop apps | ||||
| static-php-cliprebuilt binaries on dl.static-php.dev | 8.2.32 | 8.3.32 | 8.4.23 | 8.5.8 |
| NativePHPdesktop apps, binaries on bin.nativephp.com | — | ✔ | ✔ | ✔ |
Notes#
Docker: the official php:8.x.y images contain the fix for every branch, on amd64 and arm64. Pull the new tag, rebuild your own images with docker build --pull, and recreate the containers. Chainguard
’s PHP images have had the fix since 07:41 UTC, according to the PHP Foundation
. The update was merged in docker-library/php#1694
. The 8.5.12RC1 and 8.4.27RC1 images do not contain the fix. Debian 13’s fix is DSA-6574-1
. Debian 12’s fix is DLA-4848-1
.
packages.sury.org on arm64 is still building, three days after the release. Ondřej builds the arm64 packages in an emulator (qemu) on amd64 hardware, which is slow. One arm64 build takes about five hours. His build tool cannot spread builds over several machines, so he cannot simply add native arm64 builders. He says money is not the problem. He has ordered two Raspberry Pi 5 builders for the next release.
From 23 October, a temporary repository at packages.sury.org/freexian/ had Freexian’s arm64 builds of the same sources. Ondřej removed it
on 24 October at 04:18 UTC, because the arm64 packages were “almost done”. If you used it, the cells above that are not ✔ are the packages it no longer gives you.
Until then on arm64:
- Ubuntu 22.04 and 24.04: the Launchpad PPA (
ppa:ondrej/php) has every branch. - Ubuntu 26.04 and Debian: use your distribution’s own PHP (see distribution packages ), the official Docker images, or wait.
Amazon Linux has the fix since 22 October: php8.2 to php8.5 on Amazon Linux 2023, and the php8.2 extra on Amazon Linux 2. php8.1 on Amazon Linux 2023 and the core php on Amazon Linux 2 get no fix (CVE-2026-109618
, CVE-2026-109619
). AWS’s bulletin
covers its other services:
- Elastic Beanstalk: new PHP platform versions for 8.2 to 8.5 have PHP’s fix. With managed platform updates on, they arrive in your next maintenance window. Otherwise, update the platform version yourself.
- Lightsail: new blueprints are out in all regions. Running instances are not updated, so create new instances from the new blueprints.
- WorkMail: runs PHP 8.3.36. No action needed.
I checked the fix in these changelogs:
- packages.sury.org and the
ppa:ondrej/phpPPA have the fix for every end-of-life branch, PHP 5.6 to 8.1. The new packages (php5.6-104,php7.0-92,php7.1-80,php7.2-66,php7.3-35,php7.4-31,php8.0-25,php8.1-9) were built on 21 October. Each one carries the patchAvoid-state-corruption-via-bailoutby PHP core developer Arnaud Le Blanc, as Ondřej said . It is the same minimal patch PHP published for 7.4, 8.0 and 8.1: it turns off upload progress completely, and it adds no hard memory limit. On 22 October, Ondřej rebuilt 5.6, 7.0 and 7.1 (-105,-93,-81) with an older multipart fix (CVE-2023-0662) on top. A normalapt upgradeinstalls them. The 21 October builds already fix the two new CVEs. - Ubuntu
8.3.6-0ubuntu0.24.04.13says “SECURITY UPDATE: Remote RCE via state corruption issue”, with the patchCVE-2026-109618_109619.patch(Launchpad ).
Laravel Octane with FrankenPHP has its own binary. When Octane downloads FrankenPHP, it saves it in your project folder as frankenphp. Octane accepts any version from 1.13.0 up (source
). So an unfixed 1.13.0 or 1.13.1 still passes. Delete that file and start Octane again. If it finds no other FrankenPHP, it offers to download the newest one.
Swoole and RoadRunner use your installed PHP. Swoole is a PHP extension. RoadRunner starts your php binary for its workers. So upgrading PHP fixes them; restart them afterwards. swoole-cli is different: it ships its own PHP, so it is in the table above.
GitHub Actions with setup-php: a PHP version that is already on the runner is not updated to the newest patch release by default (README
). Add update: true to the step.
The release tags are genuine. On GitHub, the php-8.x.y tags point at commits that are not on any branch, which worried some people
. The tags are signed by PHP’s release managers, and GitHub marks the signatures as verified.
The short version#
- Find out where your PHP comes from: your distribution, a third-party repository, Docker or FrankenPHP.
- Install the fixed PHP from that same source.
- Restart every process that runs PHP.
- Check that no process still runs the old PHP.
- Roll back the early mitigations you no longer need.
Which PHP versions get a fix#
Every version before the fixed ones is affected (GHSA-w8hw-w9fx-j79w , GHSA-6wmf-4rv5-p3rp ). The PHP project only releases fixes for the versions it still supports (supported versions ):
| Branch | Fixed in | Security support ends |
|---|---|---|
| 8.5 | 8.5.12 | 31 Dec 2029 |
| 8.4 | 8.4.27 | 31 Dec 2028 |
| 8.3 | 8.3.36 | 31 Dec 2027 |
| 8.2 | 8.2.35 | 31 Dec 2026 |
| 8.1 and older | No release. PHP published source patches for 7.4, 8.0 and 8.1 | Already ended |
Distributions can still patch older versions themselves. Ubuntu fixed every release it supports, including PHP 8.1 on 22.04, and with Ubuntu Pro also 14.04 to 20.04 (USN-8948-1
, USN-8948-2
). Red Hat fixed RHEL 8, 9 and 10, except the php:8.4 stream on RHEL 9. Check their trackers for the current status:
- Ubuntu: CVE-2026-109618 , CVE-2026-109619
- Debian: CVE-2026-109618 , CVE-2026-109619
- Red Hat: CVE-2026-109618 , CVE-2026-109619
For PHP 7.4, 8.0 and 8.1, the PHP security team published small source patches. They are for people who build PHP themselves, or who have no vendor that backports fixes (PHP’s advisory
). PHP calls them a “minimal mitigation for EOL version” (7.4
, 8.0
, 8.1
). They are much smaller than the fix for the supported versions, and they switch session upload progress off completely, whatever your php.ini says. php -i and ini_get() can still show session.upload_progress.enabled as on, so a scanner that reads that setting flags a patched server by mistake. Ondřej’s PHP 7.4 package on packages.sury.org carries this same patch. If your app shows upload progress bars on these versions, they stop working. Zend says its commercial LTS builds of PHP 7.2, 7.3, 7.4 and 8.1 had the fix at release time (Matthew Weier O’Phinney, Zend
).
What the bugs are#
PHP published the details with the release. In short:
- CVE-2026-109618, “RCE via OOM corruption” (GHSA-w8hw-w9fx-j79w ). When PHP runs out of memory, it can stop in the middle of setting up a request. The cleanup that runs afterwards then trusts data that was never fully set up. The confirmed ways to run out of memory are in multipart request parsing.
- CVE-2026-109619, “RCE via stale global state” (GHSA-6wmf-4rv5-p3rp
). Some state from one request can survive after its memory is freed. A later request on the same PHP worker can then use it. The confirmed cases are the session upload-progress feature, and on PHP 8.5 the
fatal_error_backtracessetting.
Who is at risk, according to PHP: every PHP that serves web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers the risk highest for mod_php. There, a single anonymous request can trigger the attack before any of your code runs. For PHP-FPM, PHP confirmed remote code execution through the upload-progress path, when the application does something that triggers a fatal error at the right moment. For the out-of-memory bug it has not shown a complete FPM exploit, but its own code review says FPM is affected.
The researchers who found the bugs, from Wiz, OpenAI and Calif, published php2shell.com and a technical write-up . They add two things:
- The bugs can also leak memory, without running any code. An attacker can read parts of the PHP worker’s memory, which can hold passwords, tokens, API keys and certificates from other requests. They showed this works against any PHP application.
- They reported the bugs to PHP on 24 August 2026. They showed remote code execution against WordPress, Drupal and Joomla, but say even a “Hello World” script on an affected PHP is vulnerable.
One detail differs between the sources. The table in Wiz’s blog lists the upload-progress bug under CVE-2026-109618. PHP’s advisory and php2shell.com list it under CVE-2026-109619. This post follows PHP. Both CVEs are fixed by the same update, so it does not change what you have to do.
The fix is one commit, 31c0ea7d7f (“Avoid state corruption via bailout”). PHP no longer jumps out of a request when memory runs out. It stops the request at a safe point instead, and it resets the leftover state before the next request starts.
After the upgrade: PHP now has a hard memory limit#
The fix adds a second, higher memory limit. When a process reaches it, PHP stops the process straight away, and shutdown functions do not run (php2shell.com
, GHSA-w8hw-w9fx-j79w
). If you set memory_limit = -1 as a mitigation, set it back to a real limit after you patch.
The new setting is memory_hard_limit_percent. By default, the hard limit is twice your memory_limit when that is 1G or less, so 256M with the usual 128M. Above 1G, it is memory_limit plus 1G. A process that reaches it exits with code 137, so look for that in your PHP-FPM log after the upgrade. I checked these values in the PHP 8.5.12 source (Zend/zend_alloc.c). What PHP-FPM logs when a worker hits the hard limit, and what else changes for production, is in PHP’s new memory_hard_limit_percent setting
.
PHP core developer Alexandre Daubois adds that a patched PHP still stops a worker that runs out of memory, only without the memory corruption. If your app accepts uploads, he suggests limiting the number of multipart parts and headers per part at the web server.
Is the fix incomplete?#
Not as far as anyone has shown. On 21 October some posts on X and Hacker News said 8.5.12 is “still vulnerable”. They all go back to one researcher, elise , who found a memory bug that still works on 8.5.12. She says it is a “different vuln, been around for a while”, so not a hole in this fix. PHP says its security team is aware of her report. PHP has not said how serious it is.
On 22 October she added that it does not need a malicious script. Malicious user input during a normal operation on a normal server can trigger it. She says turning it into remote code execution is possible in the right circumstances, but “really non-trivial”. Security researcher Hanno Böck had first called it local-only, and now agrees it can be triggered remotely. There is no fix for it yet, and no CVE. Install the 21 October releases anyway: they fix the two bugs that are already being exploited.
As of 23 October, 08:30 UTC, there is no new advisory, no new PHP release, and no published bypass. One researcher who first wrote that 8.5.12 “may still be vulnerable” took that back .
Known problems after the upgrade#
These bugs are new in the 21 October releases. None has a fixed release yet:
- Crash with
zend_mm_heap corruptedon 8.4.27 and 8.5.12. It happens when the garbage collector cleans up SimpleXML objects. It comes from a normal bugfix in this release, not from the security fix. 8.3.36 and 8.2.35 contain only the security fix, so they do not have it. PHP fixed it in its source code on 22 October, so the next 8.4 and 8.5 releases will include the fix (#24488 ). - Some out-of-memory errors now stop the worker with exit code 137.
sprintf(),pack(),bin2hex()andext/xmlbuilt with Expat can go past the new hard memory limit. 8.5.11 gave a normal “Allowed memory size exhausted” error for the same code (#24492 ). It was reported on 8.5.12 and 8.4.27, but the hard limit is in all four releases. - Upload progress can wipe a session. This happens when a stored object has a property named
__PHP_Incomplete_Class_Nameor similar. Users get logged out (#24493 ). Rare.
None of these is a reason to stay on the old version. The old version can be broken into; these only crash or log out.
Running PHP 8.1 or older? Plan the move to 8.4 or 8.5#
A backported fix from your distribution fixes this bug. It does not protect an old PHP version against the next bug. PHP itself no longer reviews or fixes that branch. Install the fix that is available today. Then move to PHP 8.4 or 8.5. PHP 8.2 loses security support on 31 December 2026. Skip it.
On Ubuntu, the easiest way is often a release upgrade. 24.04 ships PHP 8.3 and 26.04 ships PHP 8.5. See how to upgrade Ubuntu LTS .
If your distribution will not patch your PHP version:
- Keep the early mitigations in place.
- A third-party stopgap is hp_uploadprogress_guard . It is an open-source PHP extension that copies the official fix into an unpatched PHP 5.4 to 8.5, without rebuilding PHP. PHP did not write or review it, and I have not tested it.
- Move to a supported PHP version as fast as you can.
- Until then, taking the site offline is the only safe option.
Which PHP your distribution ships#
Checked in containers on 21 October 2026.
| Distribution | PHP | Who ships the fix |
|---|---|---|
| Ubuntu 26.04 and 26.10 | 8.5 | Ubuntu, free updates |
| Ubuntu 24.04 | 8.3 | Ubuntu, free updates |
| Ubuntu 22.04 | 8.1 | Ubuntu, free updates. Fixed in 8.1.2-1ubuntu2.28 |
| Ubuntu 20.04, 18.04, 16.04 and 14.04 | 7.4, 7.2, 7.0 and 5.5 | Ubuntu Pro. Fixed in 7.4.3-4ubuntu2.29+esm5, 7.2.24-0ubuntu0.18.04.17+esm14, 7.0.33-0ubuntu0.16.04.16+esm22 and 5.5.9+dfsg-1ubuntu4.29+esm18 (Ubuntu
) |
| Ubuntu 25.04 and 25.10 | 8.4 | Nobody, these releases are end of life |
| Debian 13 trixie | 8.4 | Debian security team (DSA) |
| Debian 12 bookworm | 8.2 | Debian LTS team (DLA) |
| Debian 11 bullseye | 7.4 | Only Freexian’s paid ELTS, Debian LTS ended 31 August 2026 |
| RHEL 10 | 8.3, 8.4 | Red Hat. Fixed |
| RHEL 9 | 8.0 (default), 8.2, 8.3 and 8.4 (modules) | Red Hat. Fixed, except the php:8.4 stream |
| RHEL 8 | 7.4, 8.2 (modules) | Red Hat. Fixed |
Watch out for these:
- On RHEL 8, a plain
dnf install phpinstalls PHP 7.2. That module stream is still the default. It has been retired since 2021. It gets no fixes. The same goes for the 7.3 and 8.0 streams on RHEL 8 and the 8.1 stream on RHEL 9 (lifecycle ). - Ubuntu and Red Hat often backport fixes into the old version number. Ubuntu 24.04 still calls its PHP
8.3.6. The package version changes, the PHP version does not. So check the package version, notphp -v. - Debian ships the new upstream release instead. On bookworm, expect a new
8.2.xand on trixie a new8.4.x.
Many servers that run a recent PHP use a third-party repository. These ship the upstream release:
- Ubuntu 22.04 and 24.04: Ondřej Surý’s ppa:ondrej/php .
- Ubuntu 26.04, Debian 11, 12 and 13: Ondřej’s packages.sury.org . The PPA is moving there.
- RHEL, AlmaLinux and Rocky 8, 9 and 10: Remi’s repository .
Remi’s repository has 8.2.35, 8.3.36, 8.4.27 and 8.5.12 for RHEL 8, 9 and 10, on x86_64 and aarch64, in the modular and the SCL-style repositories. It also patched 7.4, 8.0 and 8.1, but not 7.2 and 7.3. Some Remi mirrors lag behind. If dnf does not offer the fix, run sudo dnf clean metadata and try again.
Ondřej’s packages (packages.sury.org and the ppa:ondrej/php PPA) have the fix for every PHP version they ship, from 5.6 up (his tracking issue
). Some arm64 builds on packages.sury.org are still missing; see package status
.
CloudLinux has fixed alt-php, ea-php and native PHP packages in stable on CloudLinux 7, 8 and 9 (CloudLinux ).
Ubuntu and Debian#
The steps are the same for Ubuntu’s own packages, Debian’s own packages, the ondrej PPA and packages.sury.org. Replace 8.3 with your PHP version.
See which PHP packages you have, and their versions:
$ dpkg -l 'php*' | awk '/^ii/{print $2, $3}'
php-common 2:93ubuntu2
php8.3-cli 8.3.6-0ubuntu0.24.04.12
php8.3-common 8.3.6-0ubuntu0.24.04.12
php8.3-fpm 8.3.6-0ubuntu0.24.04.12
php8.3-opcache 8.3.6-0ubuntu0.24.04.12
php8.3-readline 8.3.6-0ubuntu0.24.04.12
Fetch the package lists and see which PHP updates are waiting:
$ sudo apt-get update
$ apt list --upgradable 2>/dev/null | grep php
Upgrade only the PHP packages. This never installs a package you did not have. Keep the quotes, so your shell does not expand the *:
$ sudo apt-get install --only-upgrade 'php8.3*' libapache2-mod-php8.3
libapache2-mod-php8.3 is for Apache with mod_php. If it is not installed, apt skips it. Run this once for every PHP version on the server.
Check that the fix is installed. On Ubuntu, the package changelog lists the CVE:
$ zgrep -E 'CVE-2026-10961[89]' /usr/share/doc/php8.3-fpm/changelog.Debian.gz
On Debian, the PPA and packages.sury.org, the changelog may only say “New upstream version”. Compare the version from dpkg -l with the fixed version in the table above
.
Notes:
- Use
zgrepon the local file, notapt changelog. On Ubuntu,apt changelog php8.3-fpmreturned a 404 for packages in universe.php8.3-fpmis in universe. - Ubuntu 18.04 and 20.04 need Ubuntu Pro with ESM Infra turned on.
sudo pro fix CVE-2026-109618shows whether a fix is available for your system. On an end-of-life release such as 25.10,pro fixwrongly reports “does not affect your system”. - Some mirrors of the ondrej PPA lag behind. If
apt-cache policy php8.3-fpmdoes not show the new version, point your sources atppa.launchpadcontent.net. - The
php8.3-fpmpackage restarts PHP-FPM itself after the upgrade. Restart it anyway, see what to restart .
Red Hat, AlmaLinux and Rocky Linux#
The steps are the same for Red Hat’s own packages and for Remi’s modular repository.
See which PHP packages you have, and which module stream is active (RHEL 8 and 9 only, RHEL 10 has no modules):
$ rpm -qa 'php*' | sort
$ dnf module list --enabled php
php 8.2 [e] common [d], devel, minimal PHP scripting language
Upgrade only the PHP packages:
$ sudo dnf upgrade 'php*'
Check that the fix is installed:
$ dnf updateinfo list --security | grep php
$ rpm -q --changelog php-fpm | head -5
Notes:
- The changelog is not always useful. On the 8.2 and 8.3 streams it only says “rebase to 8.2.33”, without CVE numbers. Then compare the version with the table above
. On the 8.0 default stream of RHEL 9,
rpm -q --changelog php-fpm | grep CVEdoes list the CVE numbers. - Red Hat fixed every stream except
php:8.4on RHEL 9. That stream is listed as affected, with no fix yet (Red Hat ). Remi’s repository has a fixed 8.4 for RHEL 9. - Remi’s SCL-style packages have their own names, such as
php84-php-fpm. Upgrade them withsudo dnf upgrade 'php84-*'and restartphp84-php-fpm. dnf updateinfoneeds security metadata. AlmaLinux and RHEL have it. I could not test it on Rocky.
To move to a newer module stream on RHEL 8 or 9, for example from 7.4 to 8.2, reset the module first. Without the reset, dnf refuses to switch streams:
$ sudo dnf module reset -y php
$ sudo dnf module enable -y php:8.2
$ sudo dnf distro-sync -y
What to restart#
A running process keeps the old PHP in memory until it restarts.
| How PHP runs | What to do after the upgrade |
|---|---|
PHP-FPM, behind nginx, Caddy or Apache (proxy_fcgi) | sudo systemctl restart php8.3-fpm (Debian/Ubuntu) or sudo systemctl restart php-fpm (RHEL). A reload also loads the new PHP. Nothing to do on the web server. |
| Apache with mod_php | sudo systemctl restart apache2 (Debian/Ubuntu) or sudo systemctl restart httpd (RHEL). A reload or apachectl graceful is not enough. |
| LiteSpeed and OpenLiteSpeed | Upgrade the lsphpXY packages from LiteSpeed’s repository. Then run sudo pkill lsphp. PHP runs as separate processes. Restarting LiteSpeed does not restart them. |
| FrankenPHP | Install the new FrankenPHP release or Docker image. PHP is built into FrankenPHP, so apt and dnf do not fix it. |
Docker php: images | Pull the new image, rebuild your own images with docker build --pull, then recreate the containers. |
| Queue workers, Laravel Octane, Supervisor jobs | Restart them. For Laravel queues, run php artisan queue:restart. For Octane, restart the server process. octane:reload reloads your code, not PHP. |
I tested the PHP-FPM and Apache rows. I replaced the PHP files on disk, then checked what each process ran. After an FPM reload, the master and every worker ran the new binary. After apachectl graceful and after apachectl -k restart, Apache still ran the old libphp8.3.so. Only a full stop and start loaded the new one.
Check the version FrankenPHP runs:
$ frankenphp version
FrankenPHP v1.13.1 PHP 8.4.26 Caddy v2.11.7
Check that nothing runs the old PHP#
The upgrade replaces the PHP files on disk. A process that still runs the old PHP shows the old file as (deleted). This command lists every such process. Empty output means everything runs the new PHP:
$ sudo grep -lE ' /(usr|lib|opt).*\(deleted\)$' /proc/[0-9]*/maps
The pattern only matches files under /usr, /lib and /opt on purpose. OPcache keeps a deleted /dev/zero mapping in every PHP-FPM process. A broader pattern would flag every PHP-FPM process, even before the upgrade.
On Ubuntu and Debian, needrestart does the same check:
$ sudo needrestart -b -r l
NEEDRESTART-SVC: php8.3-fpm
On Ubuntu 24.04 servers, needrestart is installed and restarts these services after every apt run (Ubuntu Discourse ).
Roll back the early mitigations#
Patch first. Check that nothing runs the old PHP. Only then roll back:
| Early mitigation | After patching |
|---|---|
| Block multipart requests at the web server | Remove it. It breaks file uploads. |
| Cloudflare custom rule | Remove it. It also blocks real uploads. Cloudflare’s own managed rules can stay. |
session.upload_progress.enabled = 0 | Keep it, unless your app shows upload progress bars with this PHP feature. Few apps do. |
session.use_strict_mode = 1 | Keep it. PHP recommends it for every site. |
fatal_error_backtraces = 0 | You can turn it back on. The fix resets the state it left behind. |
Settings moved out of .htaccess or PHP_VALUE | Keep them in php.ini or the FPM pool. |
pm.max_requests = 1 | Set it back to your old value. It slows PHP down. |
memory_limit = -1 | Set a real limit again. Without one, a single request can use all of the server’s memory. |
Lower post_max_size and input limits | Keep them if your app still works. |
| Site taken offline | Bring it back online. You weren’t alone: at the peak, 18.8% of the sites Oh Dear monitors were down . |
| Site made read-only | Remove the rule. It blocks every form and login. |
| AppArmor or SELinux limits on PHP | Keep them if your app still works. |
Running PHP 8.1 or older without a fix from your distribution? Keep every mitigation in place until you have moved to a supported PHP version.