On this page
To fix PHP2Shell (CVE-2026-109618 and CVE-2026-109619), update the PHP packages on every server that serves web requests, then restart every PHP-FPM, Apache, LiteSpeed or CGI process that uses them. Fixed upstream releases are 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Vendor backports keep older numbers. The job is done only when the running service started after the update.
| Fact | Detail | Source |
|---|---|---|
| CVE ids | CVE-2026-109618, CVE-2026-109619, CVSS v4 9.2 | PHP notice |
| Fixed releases | 8.5.12 · 8.4.27 · 8.3.36 · 8.2.35, or a vendor package that names both CVEs | PHP notice |
| Scope | Every PHP serving web requests: mod_php, PHP-FPM, CGI, FrankenPHP, LiteSpeed | PHP notice |
| Checked | 23 October 2026 | this page |
The full facts are in the background on how PHP2Shell works. If a host runs PHP for you, start with questions to put to your host. The rest of this page is for people who run the server, or who want to check what their host did. The wider picture is in the October 2026 tracker, and the other PHP2Shell guides each take one question in depth.
Why is "package updated" not the same as "fixed"?
Two separate things must be true. First, the package on disk contains the fix. Second, every process serving requests was started from that package. A long-lived PHP-FPM master or Apache worker keeps running the code it loaded at start, whatever is on disk afterwards. Canonical says the same in its notice: applications that use PHP usually need a restart or a reboot after the upgrade.
The Debian tracker and every vendor table below only record the first thing. The second is yours to prove, and the verification section shows how.
How do I patch each channel?
Debian
Debian's own packages are fixed per release. At our check on 23 October 2026 the Debian tracker listed bookworm PHP 8.2 fixed at 8.2.35-1~deb12u1 and trixie PHP 8.4 fixed at 8.4.27-1~deb13u1. It still listed PHP 8.2 in sid as unfixed. Packages from a third-party repository are tracked by that repository, not here.
sudo apt update && sudo apt install --only-upgrade 'php*'
sudo systemctl restart php8.4-fpm
Replace the unit name with the one for your branch, and use apache2 instead if you run mod_php. Package fixed: the tracker. Worker restarted: only the service start time can tell you.
Ubuntu
Canonical lists a fixed package for every release, including ESM releases. It does not match upstream numbers.
| Release | Package | Fixed version |
|---|---|---|
| 22.04 | php8.1 | 8.1.2-1ubuntu2.28 |
| 24.04 | php8.3 | 8.3.6-0ubuntu0.24.04.13 |
| 26.04 | php8.5 | 8.5.4-0ubuntu1.5 |
sudo apt update && sudo apt install --only-upgrade '?name(^php[0-9.]+$)'
sudo systemctl restart apache2
Restart php8.3-fpm or your equivalent for FPM setups. Unattended upgrades install the package on their own, and Canonical says the application still needs a restart or reboot afterwards.
RHEL, AlmaLinux and Rocky
Red Hat's bulletin RHSB-2026-013 covers RHEL 8, 9 and 10, and RHEL 7 for CVE-2026-109619 only. At our check it said some updates were available and gave no package versions. Read the CVE page for your stream before you rely on a version. Containers built on RHEL or UBI images must be rebuilt once the base image updates.
AlmaLinux published exact packages per module stream on 21 October and says to verify with rpm -q php-common, not php -v.
sudo dnf clean metadata && sudo dnf upgrade 'php*'
sudo systemctl restart php-fpm
Use httpd instead for mod_php. Rocky Linux: we found no dated Rocky advisory at our check. Read Rocky's errata for your stream and the installed RPM changelog. Do not copy a status from Alma or Red Hat.
Alpine
We could not read an Alpine advisory or package record for these CVEs at our check; the Alpine security tracker page for CVE-2026-109618 returned 404. Treat the status as unknown. Check the package revision of your installed php* package in the Alpine package index for your branch, then upgrade it. Alpine package names carry the branch, such as php84-fpm.
apk update && apk upgrade
On a full Alpine host restart the OpenRC service for your branch. In an Alpine-based container there is no init system to restart, so the container must be replaced. That is the Docker step below.
cPanel EasyApache and CloudLinux alt-php
CloudLinux says fixed ea-php packages for ea-php52 to ea-php85 were released on 21 October, with builds carrying php.net numbers for ea-php82 to ea-php85 added later. It says alt-php is fixed for 5.2 to 8.5 on CloudLinux 7, 8 and 9, with CloudLinux 6 not confirmed at its 23 October update. These are vendor statements, and installing the packages is the server owner's job.
dnf clean all && dnf upgrade "ea-php*"
dnf clean all && dnf upgrade "alt-php*"
/scripts/restartsrv_httpd
/scripts/restartsrv_apache_php_fpm
Use yum on CloudLinux 7. CloudLinux says the backported packages keep lower numbers, so check the changelog for both CVE ids with rpm -q --changelog. Package fixed: the changelog. Worker restarted: the two restart scripts, or the LiteSpeed restart if that is your handler. The panel screens are walked through in updating PHP from cPanel.
Docker images
Docker's official php image listed 8.5.12, 8.4.27, 8.3.36 and 8.2.35 at our check, on Debian trixie and bookworm and on Alpine 3.24 and 3.23. A running container never changes its own PHP. Which Docker images are patched has the tag list. You must rebuild from the new base and replace the container.
docker build --pull --no-cache -t myapp:fixed .
docker compose up -d --force-recreate
Package fixed: your image contains the new PHP. Worker restarted: the container is a new one. Check both, and check every image that bundles PHP, including queue workers and cron containers.
Heroku and buildpack platforms
Heroku's changelog of 21 October lists runtime builds 8.5.12, 8.4.27, 8.3.36 and 8.2.35, plus a rebuilt 8.1.34 on Heroku-22 with the backported fix, which Heroku calls a minimal mitigation rather than a supported release. Its instruction is to redeploy. Heroku's PHP support page says a rebuild with an unchanged composer.lock reinstalls the same PHP version, so read the build log for the resolved runtime.
git commit --allow-empty -m "Rebuild for PHP fix"
git push heroku main
Package fixed: the build log shows a fixed runtime. Worker restarted: dynos run the new release after the deploy. For other buildpack platforms, ask the platform whether the buildpack contains both fixes and whether a redeploy is required.
How do I verify the running service?
Do these on the server. None of them needs anything beyond reading state.
- Web, not CLI.
php -vreports the command line binary. The web service can be another binary entirely. Ask the FPM binary itself (php-fpm8.4 -vor your equivalent), or load a temporary page that callsphpinfo()and read the version, Server API and build date. Delete the page the same minute. - Response header. If
X-Powered-Byis on, it shows the version the web service reports. It shows the branch string, so a backport still looks old, and many sites switch it off. - Service start time.
systemctl statusfor the FPM or Apache unit shows when it started. That time must be later than the package install time (rpm -q --last php-fpmor the dpkg log). - Stale binary. A process whose binary was replaced on disk after it started shows
(deleted)on its/proc/<pid>/exelink. That process predates the fix. - Every pool and virtual host. Servers with several PHP versions need each checked. A control panel that shows "8.3" shows the branch, not the build. On Plesk, reading the real PHP version takes a few steps.
Container hosts compare the running container's image digest with the image they built.
Am I affected? A three-state self-test
Where you stand right now
A check from outside can read headers and version hints. It cannot see your package changelog, which runtime serves each virtual host, or when workers last started.
- Detected Your site serves PHP and the version it shows is below the fixed release for its branch. Treat it as exposed. Patch and restart today, or ask the host the standard question.
- Unknown The version is hidden, or could be a backport, or you cannot tell which PHP serves this domain. This is the common case. Get the package identifier and the service start time from the server or the host.
- Confirmed by owner evidence You hold a package changelog naming both CVEs and a service start time after the install. The runtime is patched. Whether anything got in before then is a separate question.
No scan, ours included, can move you from "unknown" to "confirmed".
What if I cannot upgrade because my PHP is end of life?
The PHP project's notice says 8.1 and older no longer receive project updates. It published minimal source backports for 7.4, 8.0 and 8.1, and says some distributions and LTS vendors ship backports too. On php.net's supported versions page, 8.2 gets security fixes only until 31 December 2026, so 8.4 or 8.5 is the better target.
The options for 8.1 and older are covered on their own page. In order of preference:
- A vendor backport that names both CVEs. Ubuntu ESM, AlmaLinux's retired streams, CloudLinux ea-php and alt-php, and Heroku's 8.1.34 all have one. AlmaLinux warns that retired streams may get no further fixes. Read the changelog.
- A move to a supported branch. Test the application on 8.4 or 8.5 in staging first. Plugins and themes are usually what break.
- Interim settings from the PHP notice. They apply to CVE-2026-109618: set
memory_limit=-1at server level, cappost_max_size, and limit multipart parts at the web server or proxy. For CVE-2026-109619, setsession.upload_progress.enabled=0inphp.inior the pool, never withini_set(), and restart every worker. PHP's 23 October update about CVE-2026-115560 recommends the same setting. PHP calls updating the only complete solution. - Reduce who can reach the origin. Restrict direct access to the origin so traffic only arrives through your proxy or WAF, and take the site offline if nothing else is possible.
Did anything get in before the patch?
Patching removes the hole, not anything planted before it. The signs of an exploited site are listed on their own page. If PHP was unpatched and reachable from 17 October, check upload directories for unexpected PHP files, cron entries you did not create, new administrator accounts, and outbound connections from the web server. AWS reported honeypot attempts from 17 October (AWS, vendor-claimed). If you want an outside view of what your site shows, the free scan reads the stack your site serves and matches each version to known vulnerabilities. It is a lookup, and the checklist in this week's security list and the 10-minute response cover the rest.
Questions people ask
How do I fix PHP2Shell on my server?
Update the PHP packages from your distribution or vendor so the changelog names CVE-2026-109618 and CVE-2026-109619, then restart every PHP-FPM, Apache or LiteSpeed process that serves your sites. Finally confirm the running web service started after the update. A package that is installed but never restarted keeps serving the old code.
I ran apt upgrade. Am I patched?
The package is fixed. Whether the service is fixed depends on a restart. Canonical says applications that use PHP usually need a restart or a reboot after the upgrade. Check when the PHP-FPM or Apache service last started and compare it with the time the package was installed.
php -v shows 8.1.2. Does that mean I am vulnerable?
Not by itself. Ubuntu 22.04 ships a fixed 8.1 package that still reports 8.1.2, and the command line PHP can be a different binary from the web one. Read the package changelog for the CVE ids, and check the version the web service reports.
Is it safe to leave a phpinfo page up to check the version?
No. Create it, load it once, and delete it straight away, because it lists paths, modules and settings an attacker can use. For a long-running check prefer the CLI of the FPM binary, the service status and the package changelog, which show the same facts without publishing them.
My site runs PHP 7.4 or 8.0 and I cannot upgrade this week. What can I do?
Ask your distribution or hosting vendor for a backported package that names both CVEs. If none exists, apply the interim settings from the PHP notice, restart every worker, limit who can reach the origin, and plan the move to PHP 8.4 or 8.5. The settings reduce exposure and do not replace the patch.
Sources
- PHP security notice, 21 October 2026 (php.net)Fixed releases, scope, interim mitigations, source backports for 7.4, 8.0 and 8.1. Checked 23 October 2026.
- GHSA-w8hw-w9fx-j79w: CVE-2026-109618 (php/php-src advisory)
- GHSA-6wmf-4rv5-p3rp: CVE-2026-109619 (php/php-src advisory)
- PHP supported versions (php.net)Which branches get security fixes, and until when. Checked 23 October 2026.
- Canonical: PHP2Shell vulnerability fixes available (Ubuntu blog, 21 October 2026)Fixed package per Ubuntu release, update and restart commands.
- Debian security tracker: CVE-2026-109618Per-release status. It records package fixes, not worker restarts.
- Red Hat security bulletin RHSB-2026-013Affected RHEL versions and container guidance. Listed no fixed package versions at our check.
- AlmaLinux: PHP2Shell patched packages (21 October 2026)Fixed package per AlmaLinux release; verify with rpm, not php -v.
- CloudLinux: fixed ea-php and alt-php packagesVendor page, updated 23 October 2026. Package availability is not the same as installed on your server.
- Docker Official Image: php (library definition)
- Heroku changelog: PHP runtime builds with the PHP2Shell fixes (21 October 2026)
- Heroku PHP support
Facts on this page are dated and point at the primary source next to them. If a vendor status changes after the date shown, the vendor's page wins; tell us at support@run.cloud and we will update it.