PHP2Shell alert: critical PHP flaws CVE-2026-109618 / 109619 — check your servers and get patched fast
HashTech Systems
Cybersecurity

PHP2Shell on PHP 7.4, 8.0, 8.1 and Older: Your Real Options

No official PHP2Shell release exists for PHP 8.1 and older. Here are the vendor backports, source patches, upgrade paths and isolation steps that do.

HashTech Engineering · October 26, 2026 · 5 min read

The PHP2Shell fixes released on 21 October 2026 (8.2.35, 8.3.36, 8.4.27 and 8.5.12) only cover supported branches. If a server runs PHP 8.1, 8.0, 7.4 or older, no new php.net release is coming. Those versions are still vulnerable. The background is in our PHP2Shell explainer. This post covers what to do when your PHP is past end of life.

Where each old branch stands

BranchUpstream statusPHP2Shell fix from PHP
8.1End of life 31 Dec 2025Minimal source backport only
8.0End of life Nov 2023Minimal source backport only
7.4End of life Nov 2022Minimal source backport only
7.3 and older, PHP 5Long end of lifeNone; affected (Sansec traces the bugs back to PHP 5.4)
8.2Supported until 31 Dec 2026Fixed in 8.2.35, but plan to move on

You have four realistic options, often used together: a patched package from your OS or a long-term-support vendor, a source build with PHP's backport, an upgrade, and isolation while you get there.

Option 1: a patched vendor package

This is the fastest fix if your platform has one, because it keeps your PHP version and only swaps in patched code. What we could confirm from vendor sources:

PlatformOld PHPStatus
Ubuntu 22.04 LTS8.1Fixed, free: 8.1.2-1ubuntu2.28 (USN-8948-1)
Ubuntu 20.04 / 18.04 / 16.04 / 14.047.4 / 7.2 / 7.0 / 5.5Fixed in Ubuntu Pro (ESM) packages
Ondřej Surý repo (ppa:ondrej/php, packages.sury.org)5.6 to 8.1Patched builds dated 21–22 Oct; changelog names both CVEs
Amazon Linux 2023php8.1No Fix Planned; move to php8.2 or later
Amazon Linux 2core phpNo Fix Planned; the php8.2 extra is fixed
RHEL, AlmaLinux, RockyModule streamsCheck your stream's errata for the CVEs; Red Hat is releasing fixes in stages

Commercial extended-support vendors such as TuxCare ELS and ZendPHP LTS also ship patched builds of old branches, and Freexian ELTS covers older Debian releases. Check the vendor's own advisory for the two CVE IDs before you rely on any of them.

Whichever source you use, verify the installed package rather than the version string. A patched 8.1 build still reports 8.1.x.

bash
# Debian/Ubuntu: search the whole changelog (Sury's CVE line may not be in the top entry)
zgrep -E 'CVE-2026-10961(8|9)' /usr/share/doc/php8.1-common/changelog.Debian.gz

# RHEL family
rpm -q --changelog php-common | grep -E 'CVE-2026-10961(8|9)'

Option 2: build from source with PHP's backport

The PHP security team published minimal source backports for 7.4, 8.0 and 8.1 for people who build PHP themselves. There is no tarball, binary or version bump. This suits teams that already compile their own PHP, such as custom Docker base images. You own the build from then on, including every future security fix, and the official Docker Hub 8.1 and older tags have not been rebuilt, so images based on them need your own build or a vendor image.

Option 3: upgrade to a supported branch

A backport fixes this bug. It does not fix the next one. 8.2 itself reaches end of life on 31 December 2026, so for an upgrade made now, aim for 8.4 (security support to 31 Dec 2028) or 8.5 (to 31 Dec 2029). If you need a stopgap, 8.3 is supported until 31 Dec 2027.

A sensible order of work:

  1. Patch first using Option 1 or 2 (or isolate using Option 4). An upgrade project should not leave you exposed in the meantime.
  2. Inventory the app: framework and CMS versions, Composer dependencies, PHP extensions (php -m) and anything compiled or proprietary such as ionCube-encoded modules. Check each supports the target version.
  3. Run static checks: PHPCompatibility for PHP_CodeSniffer to flag removed functions and syntax, and Rector to apply many of the mechanical changes automatically.
  4. Update dependencies with composer update against the target platform. Old framework versions are often what blocks an upgrade, so upgrading the framework may be the real project.
  5. Test on a staging copy with production-like data. Common breaks from 7.4: stricter comparisons between strings and numbers, warnings that became errors, removed functions such as each() and create_function(), and dynamic property deprecations from 8.2.
  6. Switch over with a rollback ready. Running two PHP-FPM versions side by side (one pool per version) lets you move one site at a time.

For WordPress, Drupal, Magento and similar platforms, check the platform's own PHP compatibility matrix first; the core may be fine while an old plugin or theme is not.

Option 4: isolate what you cannot fix yet

Some systems, often PHP 5 or 7.3 applications that nobody can easily change, have no fix at all. For those, reduce who can reach them and what they can do:

  • Take it off the public internet. Put it behind a VPN, an identity-aware proxy or at least an IP allowlist. PHP2Shell needs no login, so application passwords do not help, but network-level access control does.
  • Apply the temporary settings from the explainer: session.upload_progress.enabled = 0, a small post_max_size, and memory_limit = -1 only with a hard memory cap outside PHP. These lower the risk without removing it.
  • If the app never takes file uploads, block multipart/form-data at the proxy or WAF.
  • Contain the damage: a dedicated host or container, a read-only filesystem where possible, no outbound internet access except what the app needs, and least-privilege database and cloud credentials.
  • Watch it: alert on the web user spawning shells and on new files in the web root.
  • Set a decommission or migration date and give it an owner. Isolation is a holding pattern, not a fix.

Choosing quickly

SituationDo this nowThen
Ubuntu 22.04 with stock php8.1apt upgrade, restartPlan to move to 8.4 or 8.5
Sury PPA with 7.4 / 8.0 / 8.1Update, check changelog, restartUpgrade the app
Amazon Linux 2023 php8.1Isolate; move to php8.2+ streamTarget 8.4 or 8.5
Docker image on official php:8.1Isolate; build your own patched base or use a vendor imageUpgrade the image and app
PHP 5.x or 7.0–7.3 on an old OSIsolate nowVendor backport if available, else migrate or retire

If you have to justify the work, use this incident. Cyber Essentials, for example, expects critical and high-risk patches within 14 days and unsupported software to be removed or isolated (see our Cyber Essentials guide).

Sources

HashTech Systems handles PHP2Shell remediation for end-of-life PHP, including vendor backports, source builds, isolation and upgrade planning.

Let's Talk

Ready to build something that lasts?

Whether it's a charging network, an AI rollout, or a core enterprise system — let's talk about what you're building.