Patching PHP2Shell: platform by platform
Upstream PHP shipped 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on 21 October. Most servers do not run upstream PHP: they run a distribution package, a control panel build, a container image or whatever a host provides, and each of those reaches you on its own schedule. This guide records where each one stood on the afternoon of 22 October (UTC), and the commands to update, restart and verify. Package status was changing by the hour, so check your vendor's notice before you rely on any line here.
Two traps before you start
- The version number may not move. Ubuntu, AlmaLinux, CloudLinux and others backport the fix into the version they already ship, and Red Hat does the same for its PHP 7.4 and 8.0 packages. Ubuntu 24.04's fixed package still reports PHP 8.3.6. Judge a distribution package by its package version against the vendor's advisory, not by
php -v; AlmaLinux says so in as many words. - The command line is not the web server. Several PHP versions are often installed side by side, and the one on your
PATHmay not be the one PHP-FPM or Apache uses. Check each PHP-FPM version, the Apache module, or a temporaryphpinfo()page that shows the "Server API" line, and delete it afterwards.
# which PHP builds are installed, and at what package version
dpkg -l 'php*' | awk '/^ii/ {print $2, $3}' # Debian, Ubuntu
rpm -q php-common php-fpm # RHEL, Alma, Rocky, Fedora
rpm -q php8.4-common # RHEL 10 family, PHP 8.4
# what the web server side reports
ls /etc/php # Debian, Ubuntu: one php-fpmX.Y per version
php-fpm8.3 -v
apache2ctl -M 2>/dev/null | grep -i php # Debian, Ubuntu with mod_php
httpd -M 2>/dev/null | grep -E 'mpm_|php' # RHEL family
Linux distributions
| Distribution | Status | Fixed package or notice |
|---|---|---|
| Debian 13 trixie | Fixed | DSA-6574-1, php8.4 8.4.27-1~deb13u1 |
| Debian 12 bookworm | Fixed | DLA-4848-1, php8.2 8.2.35-1~deb12u1 |
| Debian testing (forky) | Not yet | Unstable had the fixed php8.4 8.4.27-1; forky still had 8.4.26-1 |
| Debian 11 bullseye | Fixed in Freexian Extended LTS | Out of Debian LTS since 31 August 2026; ELA-1853-1, php7.4 7.4.33-1+deb11u14. Freexian also fixed Debian 9 and 10 |
| Ubuntu 22.04 to 26.10 | Fixed | USN-8948-1, for example 24.04 php8.3 8.3.6-0ubuntu0.24.04.13, 22.04 php8.1 8.1.2-1ubuntu2.28 |
| Ubuntu 14.04 to 20.04 | Fixed with Ubuntu Pro | USN-8948-2, through ESM |
| RHEL 8 | Fixed | php:7.4 stream RHSA-2026:87080; php:8.2 stream RHSA-2026:87073 |
| RHEL 9 | Fixed, except the php:8.4 stream | Default PHP RHSA-2026:87151, php 8.0.30-8.el9_8.1; php:8.2 RHSA-2026:87072; php:8.3 RHSA-2026:87079; Red Hat still lists php:8.4 as affected |
| RHEL 10 | Fixed | RHSA-2026:87070, php 8.3.36-1.el10_2; RHSA-2026:87071, php8.4 8.4.27-1.el10_2 |
| AlmaLinux 8, 9, 10 | Fixed | Every stream, including retired ones, in the production repositories since 21:15 UTC on 21 October. AlmaLinux's own builds keep the old version number, for example php-8.3.33-1.el10_2.alma.1; rebuilds of Red Hat's updates followed |
| Rocky Linux 8, 9, 10 | Fixed | Rebuilds of every Red Hat update above, for example RLSA-2026:87073 (Rocky 8, php:8.2) and RLSA-2026:87070 (Rocky 10) |
| Oracle Linux 8, 9, 10 | Fixed, except the php:8.4 stream on 9 | ELSA-2026-87080 and ELSA-2026-87073 (8, php:7.4 and php:8.2), ELSA-2026-87151, ELSA-2026-87072 and ELSA-2026-87079 (9, default PHP, php:8.2 and php:8.3), ELSA-2026-87070 and ELSA-2026-87071 (10) |
| CentOS Stream 9, 10 | Fixed for the default PHP | php 8.0.30-9.el9 and php 8.3.36-1.el10; php8.4 on Stream 10 not yet on the mirrors |
| Fedora 44 and 46 | Fixed | php 8.5.12; Fedora 43 and 45 in testing |
| SUSE Linux Enterprise 15, openSUSE Leap 15.6 | Fixed, except PHP 7 | SUSE-SU-2026:4844-1, php8 8.3.36 (SP7); SUSE-SU-2026:4843-1, php8 8.2.35 (SP6 and Leap 15.6); php8 8.0.30 for SP4 and SP5 LTSS; PHP 7 packages still in progress |
| SUSE Linux Enterprise 16, openSUSE Leap 16 | Not yet | SLES 16.0 php8 8.4.27 in QA; Leap 16.0 and 16.1 listed as affected |
| openSUSE Tumbleweed | Fixed | php8 8.5.12 |
| Alpine 3.23, 3.24, edge | Fixed | php83 8.3.36-r0, php84 8.4.27-r0 and php85 8.5.12-r0 on the mirrors |
| Alpine 3.21, 3.22 | Partly fixed | 3.22: php84 8.4.27-r0 published, php82 and php83 not yet; 3.21: php82 8.2.35-r0 and php83 8.3.36-r0 published, php84 not yet |
| Amazon Linux 2023 | Fixed | ALAS2023-2026-3301 to -3304, for example php8.4 8.4.27-1.amzn2023.0.1; php8.1: no fix planned |
| Amazon Linux 2 | Fixed for the php8.2 extra | ALAS2PHP8.2-2026-015, php 8.2.35-1.amzn2.0.1; php from the AL2 core repository: no fix planned |
| Arch Linux | Fixed | ASA-202610-1, php 8.5.12-1; ASA-202610-2, php-legacy 8.3.36-1 |
| Gentoo | Fixed | dev-lang/php 8.2.35 and 8.3.36 stable; 8.4.27 and 8.5.12 in testing |
# Debian, Ubuntu
sudo apt update && sudo apt upgrade
# RHEL, AlmaLinux, Rocky, Oracle, CentOS Stream, Fedora
sudo dnf upgrade --refresh 'php*'
# Amazon Linux 2023: a plain upgrade stays on the release the instance is locked to
sudo dnf upgrade --releasever=latest 'php*'
# Amazon Linux 2, php8.2 extra
sudo yum update --advisory ALAS2PHP8.2-2026-015
# SUSE, openSUSE
sudo zypper refresh && sudo zypper patch
Third-party repositories
- Ondřej Surý's packages (the
ppa:ondrej/phpPPA and packages.sury.org, used by many Debian and Ubuntu servers and by Laravel Forge): fixed builds for every branch from PHP 5.6 to 8.5 were published on 21 October, with the older branches carrying a backport of the fix. By the afternoon of 22 October the PPA had them on every architecture. packages.sury.org still served the old PHP 8.3, 8.4 and 8.5 builds on arm64, and its maintainer expected those to take about two days. Check the package version on each architecture. The 5.6 to 7.1 builds also lack the multipart body-parts limit that the upstream 7.4 backport includes; the maintainer has confirmed this and plans an update. - Remi's repository (rpms.remirepo.net, common on RHEL-family systems): the php.net advisory said it would have no updates on release day, but the repository's maintainer reported the builds already published at 14:21 UTC, and its metadata showed fixed builds for EL 8, 9 and 10 and Fedora 43 and 44, including backports for 7.4, 8.0 and 8.1. Users reported mirrors lagging behind. Enterprise Linux 7 will not be updated.
# Remi: confirm your mirror actually has the new build before you rely on it
sudo dnf clean all && sudo dnf upgrade --refresh 'php*'
rpm -q --changelog php-fpm | head
Containers
A container image does not update itself, and restarting a container does not change its image. The official Docker php images were rebuilt on 21 October with fixed tags such as 8.4.27-fpm and 8.3.36-apache, including Alpine variants, which compile PHP from source rather than using Alpine's packages.
- Pin the full version in your Dockerfile, for example
FROM php:8.4.27-fpm, rather than a floating tag. - Rebuild with
docker build --pullso the new base image is fetched, then recreate the containers. - At 13:30 UTC on 22 October the fixed tags still had no riscv64 build, so on riscv64 the floating tags such as
php:8.4still pointed at the old, vulnerable images. The ppc64le builds missing on 21 October have since been published. - PHP 8.1 and older official images were not rebuilt.
- FrankenPHP embeds PHP, so operating system packages do not fix it. Version 1.13.2 ships the fixed PHP releases; replace the binary or image and restart the process.
- Verify inside the running container:
docker exec <container> php-fpm -v.
Control panels
| Panel | Status | How to update |
|---|---|---|
| cPanel | EasyApache 4 25.91 fixes ea-php74 to ea-php85. On CloudLinux, CloudLinux's own builds fix ea-php52 to ea-php85 and keep the old version numbers | WHM EasyApache 4, or the package manager for ea-php*, then restart PHP-FPM and Apache. On CloudLinux, confirm with rpm -q --changelog ea-php84-php-cli | grep CVE-2026-109618 |
| Plesk for Linux | PHP 7.4 to 8.5 fixed; 7.4, 8.0 and 8.1 keep their version numbers, and builds dated 21 October 2026 carry the fix. Plesk's own interface PHP is fixed in Plesk Obsidian 18.0.80 Update 11 and 18.0.81 Update 4 | Install Plesk updates; check with /opt/plesk/php/8.3/bin/php -v for each version |
| Plesk for Windows | PHP 8.2 to 8.5 fixed; Plesk's own interface PHP fixed in 18.0.80 Update 11 and 18.0.81 Update 4 | Install Plesk updates |
| DirectAdmin | Fixed, including patches for 5.6 to 8.1 | da update then da build php; PHP is not rebuilt automatically unless the CustomBuild cron is enabled |
| CloudLinux alt-php | Fixed: alt-php 5.2 to 8.5 in the stable repositories since 00:07 UTC on 22 October; TuxCare ELS packages released | dnf upgrade 'alt-php*' (yum update on CloudLinux 7), then restart Apache, PHP-FPM or LSAPI; if nothing installs, update cloudlinux-release first |
Managed hosting and cloud platforms
If someone else runs PHP for you, the update is theirs to install, and yours to confirm. Ask for the version and the date, in writing.
| Platform | What it said |
|---|---|
| WordPress.com, WordPress VIP, WP Cloud, Pressable, Tumblr | Automattic: already protected, nothing for customers to do |
| Laravel Cloud | Every running application patched, no redeploy needed |
| Laravel Forge | Its automatic security updates do not patch PHP: run Update PHP for every installed version on each server, then restart queue workers, Horizon and Octane. Servers on Ubuntu 20.04 or older cannot be updated, and Forge offers no patch for PHP 8.0 or 8.1 |
| Kinsta | Patched PHP 7.4 to 8.5 rolled out across the platform; incident closed on the morning of 22 October; no customer action needed |
| Google App Engine standard, Cloud Run with automatic base image updates | Patched automatically for PHP 8.2 and newer. App Engine flexible, Cloud Run without automatic updates and GKE need a rebuild and redeploy. PHP 5.5, 7.2, 7.3, 7.4 and 8.1 runtimes remain vulnerable |
| AWS Elastic Beanstalk | Platform version 4.13.13 ships PHP 8.5.12 and 8.4.27 (21 October) and 8.3.36 and 8.2.35 (22 October), and turns session.upload_progress.enabled back on. Environments with managed platform updates get it in their next maintenance window; others must update the platform version |
| AWS Lightsail | Instances from Lightsail's own WordPress, LAMP and Nginx blueprints update with apt upgrade and a web server restart. Bitnami blueprints keep their own PHP in /opt/bitnami/php, which apt does not update; AWS recommends moving to a Lightsail blueprint |
| Azure App Service | On Linux, patched PHP 8.2 to 8.5 images reached the Latest and Standard release channels on 21 October; Extended gets them last. End-of-life PHP versions, custom containers and Alpine-based WordPress images are not patched. Microsoft's post does not cover Windows |
| Upsun | Every php runtime image from 7.4 to 8.5 patched and redeployed; PHP 7.3 and older get no fix |
| Heroku | New PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 runtimes, and PHP 8.1.34 rebuilt on Heroku-22; redeploy to pick them up |
| DigitalOcean | App Platform buildpack patched; redeploy to pick it up. Cloudways patched all active servers. Marketplace 1-Click droplets already running must be updated by their owners |
| GoDaddy | Managed WordPress, Web Hosting and Windows Hosting patched; VPS owners update PHP themselves |
| Hostinger | Fix installed for PHP 5.2 to 8.5 on all hosting except VPS; the version may not change, but a PHP build date of 21 October 2026 or later shows the fix |
Restart, so the new binary is the one running
Every source repeats this, because it is the step people skip: the PHP project says to restart every worker. A process that started before the update keeps the old code in memory.
| Setup | Restart | Note |
|---|---|---|
| PHP-FPM on Debian, Ubuntu | sudo systemctl restart php8.4-fpm, once per installed version | A plain restart is the unambiguous choice |
| PHP-FPM on RHEL, AlmaLinux | sudo systemctl restart php-fpm | Remi's parallel builds use names such as php84-php-fpm |
| Apache with mod_php | sudo systemctl restart apache2 or httpd | Use a full restart rather than a graceful reload, and then confirm no old process survived |
| LiteSpeed | sudo touch /usr/local/lsws/admin/tmp/.lsphp_restart.txt, or sudo killall lsphp | LiteSpeed runs PHP detached by default, so PHP processes survive a web server restart |
| Containers, Kubernetes | Pull or rebuild the fixed image and recreate the containers or pods | Restarting the old container keeps the old image |
| Queue workers, Horizon, Octane and other long-running PHP | Restart the process itself | They keep the old PHP until restarted; reloading application code is not enough |
# any process still mapped to a deleted (replaced) PHP binary or library?
sudo grep -lE ' /(usr|lib|opt).*\(deleted\)$' /proc/[0-9]*/maps 2>/dev/null
# when did each PHP process start?
ps -eo pid,lstart,cmd | grep -i '[p]hp'
Known issues after upgrading
The fixed releases change how PHP handles running out of memory, and a handful of regressions were reported in the php-src issue tracker within a day. None is a reason to stay on a vulnerable version; all are reasons to test before and watch after.
| Issue | What happens | Status |
|---|---|---|
| #24492 | Some functions, such as sprintf(), pack() and bin2hex(), hit the new hard memory limit and the process exits with code 137, where 8.5.11 raised the usual catchable out-of-memory error | Open; a related fix for ext/xml is in review |
| #24493 | On 8.5.12, the session upload progress handler destroys the whole session when a stored object has certain reserved property names | Open |
| #24488 | On 8.4.27 and 8.5.12, a garbage-collection double free with SimpleXML objects (zend_mm_heap corrupted) broke some test suites | Fixed in the source code on 22 October; not yet in a release |
memory_limit below 1 GB and to memory_limit plus 1 GB above it, and is set with the new memory_hard_limit_percent setting. A process killed at the hard limit runs no shutdown functions or destructors. As of 22 October there was no follow-up PHP release. Some platforms also switched mitigations off again when they shipped fixed PHP, as Elastic Beanstalk 4.13.13 did; if you set a mitigation yourself, decide whether to keep it.Then verify, from the outside in
- Compare the installed package version with your vendor's advisory for CVE-2026-109618 and CVE-2026-109619.
- Check the version the web server reports, through PHP-FPM, the Apache module or a temporary
phpinfo()page. - Confirm no PHP process started before the update is still running.
- Record what you did, on which hosts, and when. If a supervisor or customer asks, that record is your answer.
Sources
- sprintf()/pack()/bin2hex() _exit(137) at hard memory limit where 8.5.11 raised a catchable OOM The hard memory limit regression.
- Security advisory: Critical remote code execution vulnerabilities, update now
- CVE-2026-109618
- USN-8948-1: PHP vulnerabilities
- CVE-2026-109618
- php2shell (CVE-2026-109618, CVE-2026-109619): Patched PHP packages released
- RHSB-2026-013 Request handling memory corruption - php (CVE-2026-109618, CVE-2026-109619) - "php2shell"
- ELA-1853-1 php7.4 security update
- CVE-2026-109618
- Security update for php8 SUSE-SU-2026:4843-1
- CVE-2026-109618
- CVE-2026-109618
- Using Deterministic upgrades through versioned repositories
- Upcoming Critical PHP Security Release
- PPA for PHP
- PHP October 21 2026 security release and EL7 packages
- [security] Update to 8.5.12, 8.4.27, 8.3.36, 8.2.35
- Release v1.13.2
- EasyApache 4 Change Log 25
- Vulnerability CVE-2026-109618 and CVE-2026-109619: Remote code execution in PHP shipped with Plesk
- Critical PHP updates
- Critical PHP vulnerabilities CVE-2026-109618 / CVE-2026-109619 - release 21 October 2026, 14:00 UTC
- PHP critical vulnerability response updates
- Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619
- Elastic Beanstalk Amazon Linux 2023 PHP platform updates for PHP 8.5 and PHP 8.4 on October 21, 2026
- Elastic Beanstalk Amazon Linux 2023 PHP platform updates for PHP 8.3 and PHP 8.2 on October 22, 2026
- Update PHP on Lightsail instances to address CVE-2026-109618 and CVE-2026-109619
- Critical PHP Security Release: What It Means for Azure App Service on Linux
- Kinsta status
- Critical PHP security patches: Upsun rollout and what to check
- PHP updates - October 2026 (CVE-2026-109618 and CVE-2026-109619)
- Critical PHP RCE Vulnerabilities: Patch Now (CVE-2026-109618, CVE-2026-109619)
- Important PHP security update: What website owners need to do
- Hostinger deploys protections against php2shell PHP vulnerabilities
- LSPHP Modes
Questions
Related questions
Ubuntu 24.04 still says PHP 8.3.6 after updating. Did it work?
8.3.6-0ubuntu0.24.04.13. Compare the package version from dpkg -l with the Ubuntu notice, then restart PHP-FPM or Apache.Since updating to 8.4.27 or 8.5.12, some requests crash with "zend_mm_heap corrupted". Why?
We updated the package. Do we really need to restart?
Our vulnerability scanner still flags the patched server.
Keep reading
More guides
-
PHP2Shell on PHP 8.1, 8.0, 7.x and older
There is no official fixed release below PHP 8.2. What the PHP project provided for 7.4, 8.0 and 8.1, where distribution fixes come from, and what to do with anything older.
Read the guide -
PHP2Shell mitigations when you cannot patch yet
The configuration changes the PHP project published for systems that cannot be updated today, what each one blocks, what it breaks, and the two settings that make things worse.
Read the guide -
Was PHP2Shell used against you? Detection and response
Where to look, what each signal means and does not mean, and what to do if a server shows signs of compromise, including preserving evidence before you rebuild.
Read the guide