PHP2Shell on PHP 8.1, 8.0, 7.x and older

Updated 4 min read php2shell.eu

Banner scans published on disclosure day suggest that more than half of the internet's PHP servers that reveal their version run a branch the PHP project no longer supports. Those servers are affected, and none of them gets an official fixed release. This guide sets out what does exist for them, and what to do where nothing does.

Old versions are affected, whatever the CVE records say

The machine-readable CVE records for CVE-2026-109618 and CVE-2026-109619 list only the 8.2 to 8.5 branches and mark everything else as unaffected. That is a statement about which branches the PHP project fixes, not about where the bug lives. A scanner or dashboard that reads the records literally will report a PHP 7.4 server as clean.

Everyone else says the opposite. The PHP project's advisory says PHP 8.1 and older no longer receive updates and directs their users to vendors or source backports. Wiz reports that every PHP version released in the last decade is affected by at least one of the issues, going back to 5.4, and Calif dates its earliest affected path to PHP 5.4.0. CERT-EU lists the end-of-life branches as affected; CERT.LV, CERT-FR and the Dutch NCSC say PHP 5 onwards. Treat every PHP version below the fixed releases as vulnerable.

What exists for each branch

Fix availability by PHP branch, 21 October 2026
BranchOfficial releaseWhat exists instead
8.2 to 8.58.2.35, 8.3.36, 8.4.27, 8.5.12Use the fixed release or your distribution's patched package. PHP 8.2 itself reaches end of life on 31 December 2026
8.1NoneA minimal source backport from the PHP security team; distribution and long-term support vendor packages
8.0NoneA minimal source backport from the PHP security team; vendor packages where your vendor still supports it
7.4NoneA minimal source backport from the PHP security team; vendor packages where your vendor still supports it
7.3 and older, 5.xNoneNo backport from the PHP project. Only a commercial or distribution long-term support vendor, if yours covers the branch
The source backports are published as branches in the php-src repository, named PHP-7.4-CVE-2026-109618-109619, PHP-8.0-CVE-2026-109618-109619 and PHP-8.1-CVE-2026-109618-109619, and are linked from the php.net advisory.

The source backports are minimal by design

The PHP security team provided the backports, in its own words, to help people building from source or without access to a long-term support vendor. They are deliberately smaller than the fix in the supported branches. From our reading of the code, the backports stop the vulnerable out-of-memory jump by ending the worker outright, reset the request state that the attacks rely on, disable the session upload progress hook, and tighten the multipart header parser. They do not add the configurable hard memory limit of the supported releases.

  • If you build PHP yourself, apply the backport for your branch, rebuild, deploy and restart every worker.
  • Expect session upload progress to stop working, because the backport switches it off unconditionally.
  • Treat the result as a stop-gap that buys time to migrate, not as a supported PHP.

Distribution packages

Most production PHP below 8.2 comes from a Linux distribution, not from php.net, and that is the best news on this page. The PHP project gave Linux distributions and long-term support vendors the patches in advance, and distributions routinely backport security fixes into the version they ship without changing the upstream version number. An Ubuntu or Debian package still called 8.1 can contain the fix.

  • Look up CVE-2026-109618 and CVE-2026-109619 in your distribution's security tracker and compare the fixed package version with what you have installed.
  • Install all pending security updates for the PHP packages, then restart Apache, PHP-FPM and every PHP worker.
  • If the tracker says your distribution release is no longer supported, it will not get a fix. You are in the "nothing exists" case below.
  • Several third-party builders went further than the PHP project: Ondřej Surý's Debian and Ubuntu packages, Remi's RPM repository for Enterprise Linux 8 to 10, cPanel's ea-php74 to ea-php81 and DirectAdmin all published fixes for end-of-life branches on 21 October, and Plesk, CloudLinux (alt-php 5.2 upwards) and Freexian's Extended LTS for Debian 9 to 11 followed by 22 October. Ubuntu Pro covers PHP back to Ubuntu 14.04. See the platform guide.

Where nothing exists: contain, then migrate

For a branch with no fix from any source, there is no configuration that makes it safe. The authorities agree on what to do: CERT.LV says systems that cannot be updated to a safe PHP version must not be publicly reachable until the risk is removed; CERT-FR advises isolating end-of-life PHP and then migrating; CISA advises taking systems on PHP 8.1 and earlier offline until they can be patched or updated.

  • Remove public access. Put the application behind a VPN, an IP allow-list or authentication at a reverse proxy, so that unauthenticated requests never reach PHP.
  • Apply the stop-gap settings from the mitigations guide in the meantime, knowing they cover only the demonstrated paths.
  • Check whether it was already reached. An old, exposed PHP server is the likeliest place to find an intruder. See the detection guide.
  • Plan the upgrade with a date. Moving an application from PHP 7 to 8 is real work; PHP2Shell is the reason to start it now rather than after the next flaw.

If PHP is inside a product you bought

Appliances, control panels, network devices and management interfaces often embed their own PHP that the administrator cannot update. The Dutch NCSC maintains a public, admittedly incomplete repository of third-party products potentially affected by PHP2Shell, which CERT-EU and the UK NCSC both recommend consulting. Ask each vendor for a firmware or package update that includes the fix, and restrict network access to the management interface until you have it.

Sources

  1. Security advisory: Critical remote code execution vulnerabilities, update now PHP project, php.net · 2026 End-of-life status of PHP 8.1 and older, and the source backports.
  2. PHP-8.1-CVE-2026-109618-109619 branch php-src, GitHub · 2026 The minimal backport for PHP 8.1; matching branches exist for 8.0 and 7.4.
  3. PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet Wiz Research · 2026 Affected versions going back to PHP 5.4.
  4. php2shell Calif Research · 2026 The earliest affected path, PHP 5.4.0.
  5. Security Advisory 2026-018: Critical Vulnerabilities in PHP CERT-EU · 2026 End-of-life branches listed as affected.
  6. CERTFR-2026-ALE-014: Multiples vulnérabilités dans PHP CERT-FR · 2026 Isolate end-of-life PHP, then migrate.
  7. Critical Vulnerabilities in PHP Require Immediate Patching CISA · 2026 Take PHP 8.1 and earlier offline until patched or updated.
  8. Saistībā ar globāli atklātām PHP ievainojamībām Latvijā ievieš preventīvus pasākumus CERT.LV · 2026 Restrict internet access to systems that cannot be updated.
  9. Operational information regarding the 2026 php2shell vulnerabilities NCSC-NL, GitHub · 2026 Third-party products that embed PHP.
  10. php2shell: What We Know About the Leaked Critical PHP Vulnerabilities Check Point · 2026 Shodan banner counts showing most version-revealing PHP hosts on end-of-life branches.

Questions

Related questions

Our scanner says PHP 7.4 is not affected. Is that right?
No. The CVE records only list the branches the PHP project fixes, and some tools read that as "everything else is unaffected". The PHP project, the researchers and CERT-EU all treat end-of-life PHP as affected.
Is the 8.1 source backport as good as upgrading to 8.2.35?
No. It ends the worker on any out-of-memory error instead of taking the vulnerable path and switches session upload progress off; its own commit calls it a "minimal mitigation for EOL version". It is not a supported release and receives no further fixes.
Our Ubuntu server says PHP 8.1. Are we vulnerable?
Possibly not. Ubuntu shipped a backported fix for 22.04 in package version 8.1.2-1ubuntu2.28. Compare the fixed package version in Ubuntu's security notice for the two CVEs with the version you have installed, then restart PHP.