Patching PHP2Shell: platform by platform

Updated 9 min read php2shell.eu

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 PATH may not be the one PHP-FPM or Apache uses. Check each PHP-FPM version, the Apache module, or a temporary phpinfo() 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, afternoon of 22 October 2026
DistributionStatusFixed package or notice
Debian 13 trixieFixedDSA-6574-1, php8.4 8.4.27-1~deb13u1
Debian 12 bookwormFixedDLA-4848-1, php8.2 8.2.35-1~deb12u1
Debian testing (forky)Not yetUnstable had the fixed php8.4 8.4.27-1; forky still had 8.4.26-1
Debian 11 bullseyeFixed in Freexian Extended LTSOut 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.10FixedUSN-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.04Fixed with Ubuntu ProUSN-8948-2, through ESM
RHEL 8Fixedphp:7.4 stream RHSA-2026:87080; php:8.2 stream RHSA-2026:87073
RHEL 9Fixed, except the php:8.4 streamDefault 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 10FixedRHSA-2026:87070, php 8.3.36-1.el10_2; RHSA-2026:87071, php8.4 8.4.27-1.el10_2
AlmaLinux 8, 9, 10FixedEvery 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, 10FixedRebuilds 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, 10Fixed, except the php:8.4 stream on 9ELSA-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, 10Fixed for the default PHPphp 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 46Fixedphp 8.5.12; Fedora 43 and 45 in testing
SUSE Linux Enterprise 15, openSUSE Leap 15.6Fixed, except PHP 7SUSE-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 16Not yetSLES 16.0 php8 8.4.27 in QA; Leap 16.0 and 16.1 listed as affected
openSUSE TumbleweedFixedphp8 8.5.12
Alpine 3.23, 3.24, edgeFixedphp83 8.3.36-r0, php84 8.4.27-r0 and php85 8.5.12-r0 on the mirrors
Alpine 3.21, 3.22Partly fixed3.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 2023FixedALAS2023-2026-3301 to -3304, for example php8.4 8.4.27-1.amzn2023.0.1; php8.1: no fix planned
Amazon Linux 2Fixed for the php8.2 extraALAS2PHP8.2-2026-015, php 8.2.35-1.amzn2.0.1; php from the AL2 core repository: no fix planned
Arch LinuxFixedASA-202610-1, php 8.5.12-1; ASA-202610-2, php-legacy 8.3.36-1
GentooFixeddev-lang/php 8.2.35 and 8.3.36 stable; 8.4.27 and 8.5.12 in testing
Sources: the Debian security tracker and Freexian, Ubuntu USN-8948-1 and -2, Red Hat's errata and VEX data, the AlmaLinux blog and repositories, Rocky Linux's and Oracle's advisories, Fedora Bodhi, SUSE's CVE page and advisories, Alpine's package index, the Amazon Linux security centre, and the Arch and Gentoo package data, each checked between 13:00 and 14:30 UTC on 22 October.
# 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/php PPA 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 --pull so 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.4 still 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

Control panel status, 22 October 2026
PanelStatusHow to update
cPanelEasyApache 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 numbersWHM 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 LinuxPHP 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 4Install Plesk updates; check with /opt/plesk/php/8.3/bin/php -v for each version
Plesk for WindowsPHP 8.2 to 8.5 fixed; Plesk's own interface PHP fixed in 18.0.80 Update 11 and 18.0.81 Update 4Install Plesk updates
DirectAdminFixed, including patches for 5.6 to 8.1da update then da build php; PHP is not rebuilt automatically unless the CustomBuild cron is enabled
CloudLinux alt-phpFixed: alt-php 5.2 to 8.5 in the stable repositories since 00:07 UTC on 22 October; TuxCare ELS packages releaseddnf 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 statements, 22 October 2026
PlatformWhat it said
WordPress.com, WordPress VIP, WP Cloud, Pressable, TumblrAutomattic: already protected, nothing for customers to do
Laravel CloudEvery running application patched, no redeploy needed
Laravel ForgeIts 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
KinstaPatched 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 updatesPatched 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 BeanstalkPlatform 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 LightsailInstances 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 ServiceOn 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
UpsunEvery php runtime image from 7.4 to 8.5 patched and redeployed; PHP 7.3 and older get no fix
HerokuNew 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
DigitalOceanApp 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
GoDaddyManaged WordPress, Web Hosting and Windows Hosting patched; VPS owners update PHP themselves
HostingerFix 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.

How to restart each way of running PHP
SetupRestartNote
PHP-FPM on Debian, Ubuntusudo systemctl restart php8.4-fpm, once per installed versionA plain restart is the unambiguous choice
PHP-FPM on RHEL, AlmaLinuxsudo systemctl restart php-fpmRemi's parallel builds use names such as php84-php-fpm
Apache with mod_phpsudo systemctl restart apache2 or httpdUse a full restart rather than a graceful reload, and then confirm no old process survived
LiteSpeedsudo touch /usr/local/lsws/admin/tmp/.lsphp_restart.txt, or sudo killall lsphpLiteSpeed runs PHP detached by default, so PHP processes survive a web server restart
Containers, KubernetesPull or rebuild the fixed image and recreate the containers or podsRestarting the old container keeps the old image
Queue workers, Horizon, Octane and other long-running PHPRestart the process itselfThey 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.

Issues reported against the fixed releases, as of 22 October 2026
IssueWhat happensStatus
#24492Some 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 errorOpen; a related fix for ext/xml is in review
#24493On 8.5.12, the session upload progress handler destroys the whole session when a stored object has certain reserved property namesOpen
#24488On 8.4.27 and 8.5.12, a garbage-collection double free with SimpleXML objects (zend_mm_heap corrupted) broke some test suitesFixed in the source code on 22 October; not yet in a release
The hard limit defaults to twice 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

  1. sprintf()/pack()/bin2hex() _exit(137) at hard memory limit where 8.5.11 raised a catchable OOM php-src issue #24492, GitHub · 2026 The hard memory limit regression.
  2. Security advisory: Critical remote code execution vulnerabilities, update now PHP project, php.net · 2026
  3. CVE-2026-109618 Debian security tracker · 2026
  4. USN-8948-1: PHP vulnerabilities Ubuntu · 2026
  5. CVE-2026-109618 Red Hat · 2026
  6. php2shell (CVE-2026-109618, CVE-2026-109619): Patched PHP packages released AlmaLinux · 2026
  7. RHSB-2026-013 Request handling memory corruption - php (CVE-2026-109618, CVE-2026-109619) - "php2shell" Red Hat · 2026
  8. ELA-1853-1 php7.4 security update Freexian · 2026
  9. CVE-2026-109618 Oracle Linux · 2026
  10. Security update for php8 SUSE-SU-2026:4843-1 SUSE · 2026
  11. CVE-2026-109618 SUSE · 2026
  12. CVE-2026-109618 Amazon Linux security center · 2026
  13. Using Deterministic upgrades through versioned repositories Amazon Linux 2023 user guide · 2026
  14. Upcoming Critical PHP Security Release Ondřej Surý, Codeberg · 2026
  15. PPA for PHP Ondřej Surý, Launchpad · 2026
  16. PHP October 21 2026 security release and EL7 packages Remi Collet, GitHub · 2026
  17. [security] Update to 8.5.12, 8.4.27, 8.3.36, 8.2.35 Docker official images, GitHub · 2026
  18. Release v1.13.2 FrankenPHP, GitHub · 2026
  19. EasyApache 4 Change Log 25 cPanel · 2026
  20. Vulnerability CVE-2026-109618 and CVE-2026-109619: Remote code execution in PHP shipped with Plesk Plesk · 2026
  21. Critical PHP updates DirectAdmin forum · 2026
  22. Critical PHP vulnerabilities CVE-2026-109618 / CVE-2026-109619 - release 21 October 2026, 14:00 UTC CloudLinux status · 2026
  23. PHP critical vulnerability response updates Laravel · 2026
  24. Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619 Google Cloud · 2026
  25. Elastic Beanstalk Amazon Linux 2023 PHP platform updates for PHP 8.5 and PHP 8.4 on October 21, 2026 AWS · 2026
  26. Elastic Beanstalk Amazon Linux 2023 PHP platform updates for PHP 8.3 and PHP 8.2 on October 22, 2026 AWS · 2026
  27. Update PHP on Lightsail instances to address CVE-2026-109618 and CVE-2026-109619 AWS · 2026
  28. Critical PHP Security Release: What It Means for Azure App Service on Linux Azure App Service team blog · 2026
  29. Kinsta status Kinsta · 2026
  30. Critical PHP security patches: Upsun rollout and what to check Upsun · 2026
  31. PHP updates - October 2026 (CVE-2026-109618 and CVE-2026-109619) Heroku · 2026
  32. Critical PHP RCE Vulnerabilities: Patch Now (CVE-2026-109618, CVE-2026-109619) DigitalOcean · 2026
  33. Important PHP security update: What website owners need to do GoDaddy · 2026
  34. Hostinger deploys protections against php2shell PHP vulnerabilities Hostinger · 2026
  35. LSPHP Modes LiteSpeed documentation · 2026

Questions

Related questions

Ubuntu 24.04 still says PHP 8.3.6 after updating. Did it work?
Probably. Ubuntu backports the fix without changing the upstream number; the fixed package for 24.04 is 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?
That is a known regression in 8.4.27 and 8.5.12, triggered by SimpleXML objects in reference cycles, not a sign of attack. PHP has fixed it in its source for the next release. Stay on the fixed version; 8.3.36 and 8.2.35 are not affected.
We updated the package. Do we really need to restart?
Yes. A running PHP-FPM pool, Apache process, LiteSpeed PHP process or queue worker keeps the old code until it is restarted. The PHP project's advisory says to restart every worker.
Our vulnerability scanner still flags the patched server.
Scanners that compare upstream version numbers flag backported distribution fixes as vulnerable; Red Hat says so in its own FAQ. Confirm against your vendor's advisory, and record the package version as evidence.