PHP2Shell Fixed Versions: What to Install for Every PHP Branch

By: Irina Shvaya | October 23, 2026
This guide is part of our PHP2Shell Resource Center: fixed versions, how to check your PHP version, WordPress, Drupal and Joomla steps, mitigations and signs of a hack.

As of 23 October 2026, the PHP project's fixed releases for PHP2Shell (CVE-2026-109618 and CVE-2026-109619) are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, published on 21 October 2026. If your server runs an older patch release on any of those branches, it is vulnerable until you update. PHP 8.1 and older get no official release, only minimal source backports and fixes from Linux distributions and long-term support vendors.

There is one catch that confuses almost everyone. Linux distributions such as Ubuntu, Debian, Red Hat and AlmaLinux usually fix the bug inside their own packages without changing the PHP version number. A server that reports PHP 8.3.6 can be fully patched, and a server that reports 8.3.35 is not. The version string alone cannot tell you whether you are safe.

This page is the reference table: every PHP branch, the release that fixes it, its support status, and what to do. It also lists the vendor packages confirmed as of today and explains how to prove a server is patched.

Key Takeaways

  • Upstream fixed releases: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Anything below those on the same branch is affected.
  • The branch number is not enough. PHP 8.3.35 is vulnerable; PHP 8.3.36 is fixed.
  • PHP 7.4, 8.0 and 8.1 have no official release. The PHP security team published minimal source backports, and some vendors ship patched packages. PHP 7.3 and older have no upstream fix at all.
  • Distribution packages keep the old upstream number. Ubuntu 24.04's fixed package reports PHP 8.3.6. Confirm the package version or changelog, or ask your host.
  • After updating, restart every PHP worker. Old processes keep running the old code until they restart.
  • PHP 8.2 reaches end of life on 31 December 2026, so a site that lands on 8.2.35 today should plan its next upgrade now.

Fixed PHP Versions by Branch

The PHP project's 21 October advisory says: "Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35." The table adds the support dates from PHP's supported versions page, as shown on 23 October 2026.

PHP branchFixed upstream releaseUpstream status (23 Oct 2026)What to do
8.58.5.12Supported; security fixes until 31 Dec 2029Install 8.5.12 or later, or your vendor's patched 8.5 package
8.48.4.27Supported; security fixes until 31 Dec 2028Install 8.4.27 or later, or your vendor's patched 8.4 package
8.38.3.36Security fixes only, until 31 Dec 2027Install 8.3.36 or later, or your vendor's patched 8.3 package
8.28.2.35Security fixes only, ends 31 Dec 2026Install 8.2.35 now, then plan a move to 8.3 or newer
8.1None (end of life 31 Dec 2025; last release 8.1.34)No official updates from PHPUse a vendor's patched package, or build from PHP's source backport, then upgrade to a supported branch
8.0None (end of life 26 Nov 2023)No official updates from PHPSame as 8.1
7.4None (end of life 28 Nov 2022)No official updates from PHPSame as 8.1
7.3 and older, including PHP 5NoneNo upstream fix or backportUpgrade to a supported branch. Some vendors still ship patched packages for these (see below)
8.6 (pre-release)8.6.0 RC4 contains the fixesTest release, not for productionUpdate test builds to RC4 or later

The affected ranges in PHP's advisories are below 8.2.35, below 8.3.36, below 8.4.27 and below 8.5.12. PHP's advisories only list supported branches, but researchers including Wiz, Calif and watchTowr report that older branches back to PHP 5.4 are affected too. Treat every PHP installation as in scope.

Why "PHP 8.3" Is Not an Answer

When a host or developer tells you "we're on PHP 8.3," that tells you the branch, not whether you are patched. Every branch has many patch releases, and only the newest ones contain the fix.

  • PHP 8.3.35 (from upstream PHP) is vulnerable.
  • PHP 8.3.36 (from upstream PHP) is fixed.
  • PHP 8.3.6 on Ubuntu 24.04 LTS is fixed if the package version is 8.3.6-0ubuntu0.24.04.13 or later, according to Ubuntu's notice.

So you need two pieces of information: where your PHP comes from (php.net, your Linux distribution, your control panel vendor, or a container image), and the exact build. Our guide on how to check your website's PHP version walks through finding both.

Why Distro Patches Keep the Old Version Number

Linux distributions "backport" security fixes. They copy the fix into the version they already ship rather than moving everyone to a new upstream release, because a new release could change behavior and break sites. Debian's security FAQ explains it directly: "Instead of upgrading to a new release we backport security fixes to the version that was shipped in the stable release."

Red Hat's backporting policy warns that "just looking at the version number of a package will not tell them if they are vulnerable or not," and that scanners which check only version numbers produce false positives. AlmaLinux says the same about PHP2Shell specifically: "Don't rely on php -v: our fixes are backported, so the upstream PHP version number doesn't change."

The reverse is also true. A version number that looks new does not prove the build is fixed if it came from a source that has not shipped a patch yet.

Distribution and Vendor Packages Confirmed So Far

PHP says "Linux distributions and LTS vendors received the patches in advance, so check your vendor for updated packages." This table lists what vendors had published as of 23 October 2026. It changes daily, so check the linked source before relying on it.

Source of PHPFixed package (as published)Notes
Ubuntu 26.10php8.5 8.5.9-0ubuntu2.1USN-8948-1, 21 Oct 2026
Ubuntu 26.04 LTSphp8.5 8.5.4-0ubuntu1.5USN-8948-1
Ubuntu 24.04 LTSphp8.3 8.3.6-0ubuntu0.24.04.13USN-8948-1
Ubuntu 22.04 LTSphp8.1 8.1.2-1ubuntu2.28USN-8948-1; a patched 8.1 build even though 8.1 is end of life upstream
Ubuntu 20.04, 18.04, 16.04php7.4 7.4.3-4ubuntu2.29+esm5; php7.2 7.2.24-0ubuntu0.18.04.17+esm14; php7.0 7.0.33-0ubuntu0.16.04.16+esm22USN-8948-2; "Fix available with Ubuntu Pro"
Ubuntu 14.04php5 5.5.9+dfsg-1ubuntu4.29+esm18Ubuntu Pro with the Legacy Support add-on
Debian 12 (bookworm)php8.2 8.2.35-1~deb12u1DLA-4848-1
Debian 13 (trixie)php8.4 8.4.27-1~deb13u1DSA-6574-1; forky (testing) still listed as vulnerable on 23 Oct
Red Hat Enterprise Linux 10, 9, 8RHEL 10: RHSA-2026:87070 (php 8.3.36-1.el10_2), RHSA-2026:87071 (php8.4 8.4.27-1.el10_2). RHEL 9: RHSA-2026:87072 (php:8.2), RHSA-2026:87079 (php:8.3), RHSA-2026:87151 (php 8.0.30-8.el9_8.1). RHEL 8: RHSA-2026:87073 (php:8.2), RHSA-2026:87080 (php:7.4)RHEL 9 php:8.4 still listed as "Affected" on 23 Oct
AlmaLinux 8, 9, 10Every PHP stream, in production since 21 Oct, 21:15 UTC (for example AlmaLinux 10 default php-8.3.33-1.el10_2.alma.1)Retired streams patched too, but "future fixes for retired streams are not guaranteed"
cPanel EasyApache 4 (ea-php)EasyApache 4 25.91 fixes ea-php74 through ea-php85; CloudLinux says ea-php52 through ea-php85 are in stablecPanel and WHM 138.0.18, 136.0.50 and 134.0.66 include PHP 8.4.27 for cPanel's own PHP
CloudLinux alt-php and system PHPalt-php fixed in stable on CloudLinux 7, 8 and 9; native php packages fixed for every affected versionCloudLinux 6 not confirmed yet
PleskOfficial support article: PHP 8.2.35 to 8.5.12, plus end-of-life 7.4.33, 8.0.30 and 8.1.34 builds fixed when "built on 21 Oct 2026"End-of-life builds keep their version number, so check the build date or ask your host
Docker official php imageTags 8.5.12, 8.4.27, 8.3.36 and 8.2.358.1 and 7.4 tags not rebuilt, so no fixed official image for 8.1 and older
Google App Engine standard (PHP 8.2+)"Applications are updated automatically"PHP 8.1 and earlier runtimes "will not be patched"
Automattic hosting (WordPress.com, VIP, WP Cloud, Pressable)Automattic says these sites "are safe"Its advice for everyone else: "If you run your own servers, update now."
rpms.remirepo.netNo updates on release day, per CERT-EU and CloudLinuxCheck the repository before assuming you are covered

Sources: Ubuntu USN-8948-1, the Debian security tracker, Red Hat's security data, AlmaLinux's PHP2Shell post, CloudLinux's PHP2Shell post, cPanel's news page, Plesk's support article and Docker Hub.

How to Confirm You Have the Fixed Build

Use the method that matches where your PHP comes from. Replace the version numbers in these examples with your own.

Ubuntu and Debian

Ubuntu's notice says "a standard system update will make all the necessary changes," and Ubuntu recommends updating everything rather than cherry-picking packages. Debian's FAQ says you can confirm a fix by "comparing its exact version number with the version indicated in the Debian Security Advisory" or by reading the changelog with apt-get changelog package-name.

sudo apt update && sudo apt upgrade
apt-get changelog php8.3-fpm (example: use the package name for your version)

Compare the installed package version with the "Fixed in" version in the table above or the vendor notice. A changelog entry naming CVE-2026-109618 and CVE-2026-109619 is the clearest proof.

AlmaLinux, Red Hat and similar

AlmaLinux documents these commands, and says to compare the result "against the patched package versions":

sudo dnf clean metadata && sudo dnf upgrade 'php*'
rpm -q php-common

On AlmaLinux 10 with PHP 8.4, AlmaLinux says to check rpm -q php8.4-common instead. Red Hat attaches CVE names to its advisories, so you can also match your installed package against the RHSA listed for your release.

cPanel, Plesk and managed hosting

If PHP comes from a control panel, only the panel's packages matter. AlmaLinux points out that its packages "only update PHP installed from AlmaLinux's own repositories." Ask your host which build serves your site and whether it includes the PHP2Shell fix. CloudLinux also notes that hosting servers "often run several PHP versions side by side," so every version that serves a website needs updating.

Containers

For the Docker official php image, rebuild from a fixed tag (for example php:8.3.36, using your own branch) and redeploy. Base images from other publishers have their own schedules, so check each one. Pulling a new image does nothing until the running containers are replaced.

Restart Every PHP Worker After Updating

Installing the package is not the last step. PHP worker processes that started before the update keep running the old, vulnerable code. watchTowr's guidance is short: "Restart every PHP worker after updating so the fix takes effect." The php2shell.com site says to "restart Apache, PHP-FPM and any long-running PHP workers."

  • PHP-FPM on Ubuntu or Debian: sudo systemctl restart php8.3-fpm (replace 8.3 with your version)
  • PHP-FPM on AlmaLinux or RHEL: sudo systemctl restart php-fpm
  • Apache with mod_php on AlmaLinux 8: sudo systemctl restart httpd
  • cPanel servers with ea-php: CloudLinux documents /scripts/restartsrv_httpd and /scripts/restartsrv_apache_php_fpm

Long-running application servers and worker-mode setups need a restart too. If you cannot restart yourself, ask your host to confirm they did.

If You Are on PHP 8.1, 8.0, 7.4 or Older

PHP's advisory says "PHP 8.1 and older no longer receive updates from the PHP project. Some distributions and LTS vendors provide backported fixes, so contact your vendor for details, or upgrade to a supported version." You have three paths:

  1. Vendor package. Ubuntu, AlmaLinux, CloudLinux, cPanel and Plesk have shipped patched builds for some end-of-life versions. This is the fastest route if your host uses one of them.
  2. Source backport. The PHP security team published "minimal source-backports for PHP 7.4, PHP 8.0, and PHP 8.1 to help people building from source or without access to an LTS vendor." This is only for teams that already compile PHP themselves.
  3. Upgrade. Move to PHP 8.3 or newer. This takes testing, because old plugins, themes and custom code are what usually break. Our guide to WordPress staging sites shows how to test first.

Government agencies have been blunt about old versions. CISA says organizations that "continue to use PHP 8.1 or earlier unsupported versions, should take PHP-based systems offline until they can be patched or updated." If an upgrade will take days, read our guide to PHP2Shell interim mitigations for the settings that reduce exposure in the meantime. None of them is a fix.

What the Fixed Releases Do Not Cover

On 23 October 2026, PHP published an informational advisory for a related issue, CVE-2026-115560, which affects patched releases including 8.5.12. PHP calls it unlikely: it needs an unusual combination of session settings changed at runtime, and session upload progress still turned on. PHP suggests setting session.upload_progress.enabled=0 "until the next regular bugfix release," and will not ship an out-of-band release for it, according to CERT-EU.

Patching also does not undo anything that happened before you patched. Attempts were reported from 17 October 2026, before disclosure. If you are worried your site was touched, see was my site hacked through PHP2Shell. For a broader patch routine, our security patching best practices guide applies here too.

Planning Past 31 December 2026

PHP 8.2.35 fixes PHP2Shell, but PHP says "PHP 8.2 reaches end of life on 31 December 2026 and will receive no further security fixes after that date." The next serious PHP bug after that date will have no upstream fix for 8.2. If you are updating now, consider whether you can go straight to 8.3 or 8.4 instead. For WordPress sites, our WordPress PHP versions guide covers compatibility and safe upgrades.

Conclusion

As of 23 October 2026, the fix for PHP2Shell is PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or a vendor package that backports the same patch. Check the exact build and where it comes from, not just the branch, then restart every PHP worker. If you are on 8.1 or older, use a vendor package or upgrade, and use mitigations only as a stopgap. If you need help confirming or applying the update, our emergency PHP patching team can do it with you. Every PHP2Shell guide is in our PHP2Shell Resource Center.

Frequently Asked Questions

Which PHP version fixes PHP2Shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October 2026. Any newer release on those branches also includes the fix. Distribution packages may show a lower number and still be fixed, so check the package against your vendor's notice.

Is PHP 8.3 safe from PHP2Shell?

Only if it is 8.3.36 or later from php.net, or a vendor package that includes the fix. PHP 8.3.35 and earlier upstream builds are vulnerable. On Ubuntu 24.04, the fixed package is 8.3.6-0ubuntu0.24.04.13, even though it still reports 8.3.6.

My server says PHP 8.3.6. Am I vulnerable?

It depends on the package, not the number. 8.3.6 is the version Ubuntu 24.04 ships, and Ubuntu patched it without changing that number. Check the installed package version or its changelog, or ask your host to confirm the PHP2Shell fix is installed.

Is there a fix for PHP 7.4?

Not an official release. The PHP security team published a minimal source backport for 7.4, 8.0 and 8.1, and vendors such as Ubuntu (through Ubuntu Pro), AlmaLinux, CloudLinux, cPanel and Plesk have shipped patched 7.4 builds. The long-term answer is to upgrade to a supported branch.

Is there any fix for PHP 7.3 or PHP 5?

There is no upstream fix or backport. Some vendors still ship patched packages, for example Ubuntu Pro for older Ubuntu releases and CloudLinux alt-php for very old versions. If your host does not offer one, upgrading is the only path.

Do I need to restart anything after updating PHP?

Yes. Restart PHP-FPM, Apache if it runs mod_php, and any long-running PHP workers. Processes that started before the update keep running the vulnerable code until they restart.

Does updating WordPress, Drupal or Joomla fix PHP2Shell?

No. The flaw is in the PHP runtime, not in the CMS. Updating your CMS or plugins is good practice, but only a fixed PHP build closes these vulnerabilities.

Will these version numbers change?

The upstream fixed releases will not change, but newer releases will follow, and vendors are still shipping packages. PHP has said CVE-2026-115560 will be fixed in its next regular release. Check this page and the vendor sources for updates.

Put this into action with eSEOspace

We help businesses grow with maintenance & support that actually performs. Explore the services behind this guide:

Book a free strategy call →

Get a FREE Audit

We'll perform a comprehensive SEO, AEO, GEO & CRO audit of your website — completely free — and show you exactly how to outrank your competitors.

Don't have a site yet? Get in touch →

Get a FREE GEO/AEO/SEO Audit

We'll analyze your site's SEO, GEO, AEO & CRO — completely free — and show you exactly how to get found across Google and AI answers.

Don't have a site yet? Get in touch →

You Might Also like to Read