1. Red
  2. Learn
  3. PHP2Shell

PHP2Shell: affected versions, fixes, and what to do now

PHP2Shell (CVE-2026-109618/109619) is an unauthenticated RCE in PHP core. Fixed versions, who is affected, and how to confirm the PHP serving your site is patched.

By Alexander Gusev, run.cloudPublished 23 October 20266 min readHow we check facts
On this page
  1. Who is affected
  2. The version trap: why "we are on 8.3" is not an answer
  3. How to fix it
  4. Am I affected? A three-state self-test
  5. Was anything exploited before you patched?
  6. What this bug is, without the exploit

PHP2Shell is the name for two remote code execution bugs in PHP core, CVE-2026-109618 and CVE-2026-109619, disclosed by the PHP project on 21 October 2026. An attacker needs no account to use them. The fix is a patched PHP release (8.5.12, 8.4.27, 8.3.36 or 8.2.35) or a vendor backport, plus a restart of the PHP workers that serve your site.

FactDetailSource
CVE idsCVE-2026-109618 (RCE via out-of-memory corruption), CVE-2026-109619 (RCE via stale global state)PHP notice
SeverityCVSS v4 9.2 for bothPHP advisories
Disclosed21 October 2026, 14:00 UTCPHP notice
Fixed releases8.5.12 · 8.4.27 · 8.3.36 · 8.2.35PHP notice, changelog
Older branches8.1 and earlier are end of life; no php.net release. Backports exist from some distributions and hostsCanonical, Heroku (below)
Who is in scopeEvery PHP installation that serves web requests: mod_php, PHP-FPM, CGI, LiteSpeed, FrankenPHPPHP notice
ExploitationAttempts observed by AWS honeypots from 17 October; broad scanning after public proof-of-concept code; no confirmed named victim at our 22 October checkAWS (vendor-claimed)
Checked22 October 2026this page

Who is affected

Any website served by PHP. That is most of the web: WordPress, WooCommerce, Magento and Adobe Commerce, Shopware, Drupal, Joomla, MediaWiki, Laravel, Symfony and Craft all run on PHP. The bug sits in the engine underneath them, so the application being up to date does not help.

The PHP project is explicit that all installations serving web requests are in scope. The way the PHP is served changes how exposed you are, not whether you are:

  • mod_php (Apache with PHP built in) is the highest-risk setup, because the PHP engine runs inside the web server process.
  • PHP-FPM, CGI, LiteSpeed and FrankenPHP are in scope. A patched package only helps once those worker processes have been restarted or replaced.
  • Sites that do not run PHP at all (static sites, Node.js, Ruby, Python, Shopify-hosted stores) are not affected by this bug. Their third-party scripts and apps are a separate question.

If you do not know whether your site runs PHP: WordPress and WooCommerce always do. For anything else, ask whoever built or hosts it, or run the free scan at the end of this page, which lists the technologies the site serves from outside.

The version trap: why "we are on 8.3" is not an answer

This is the part that catches most owners. Three things make the version number misleading:

  1. Backports keep the old number. Debian, Ubuntu, Red Hat, AlmaLinux and cPanel's EasyApache ship security fixes as a new package build, not a new PHP version. Ubuntu 22.04's fixed PHP 8.1 package still reports 8.1. The only reliable check is the package changelog, which names the CVE ids.
  2. php -v is the command-line PHP, not the web PHP. Many servers have several PHP builds installed. The one answering web requests can be a different binary with a different version.
  3. Panels show the branch, not the build. cPanel's selector shows "8.3". It does not show whether the 8.3 package on that server includes the fix, or whether the workers restarted after it was installed.

So the question to ask, of your host or of yourself, is not "which version are we on" but: is the PHP runtime that serves web requests for this domain patched for CVE-2026-109618 and CVE-2026-109619, and have all its workers been restarted or replaced since?

How to fix it

If a host manages PHP for you (shared, managed WordPress, most VPS panels)

Send support this exact question and keep the reply:

For [your domain], is the PHP runtime that serves web requests patched for CVE-2026-109618 and CVE-2026-109619? Please give the fixed package, build or backport identifier, confirm that all PHP-FPM, CGI or Apache workers serving it have been restarted or replaced, and say whether I need to redeploy or change a setting.

Several hosts published dated status pages. Our host-by-host pages carry what each one said and when; the short version on 22 October was that SiteGround, Hostinger's status page, Namecheap (most servers) and DreamHost's notice (most servers) reported fixes applied, Bluehost and OVHcloud's rollout reported partial or product-specific rollouts, and many others had published nothing specific. "Nothing published" means confirm with support, not "patched" and not "unpatched".

If you manage the server yourself

  • Update the PHP packages from your distribution or vendor, not from a random tarball. The package changelog must list both CVE ids.
  • Restart the PHP workers: php-fpm (or php8.x-fpm), or Apache if you use mod_php. On cPanel servers, use the documented service restarts for Apache and PHP-FPM rather than killing processes.
  • Confirm the running web PHP, not the CLI. A phpinfo() page served through the web, or the server's own X-Powered-By header if it is on, shows the build the workers are using. Remove the phpinfo() page again afterwards.
  • Rebuild and redeploy any container images that bundle PHP. A patched base image does nothing until your image is rebuilt from it and deployed.
  • Check every virtual host separately if the server runs more than one PHP version.

Distribution status at our 22 October check (Debian re-checked 23 October), so you know what "update" will give you:

ChannelStatus on 22 October 2026What to check
DebianTrixie's PHP 8.4 fixed in 8.4.27-1~deb13u1 (DSA-6574-1); Bookworm's PHP 8.2 fixed in 8.2.35-1~deb12u1 through bookworm-security (DLA-4848-1); sid fixed in 8.4.27-1. Checked 23 OctoberDebian tracker
UbuntuFixes available for supported and ESM releases, including a PHP 8.1 backport for 22.04; versions differ per releaseCanonical notice
RHELNo fixed errata listed yetRed Hat CVE page
AlmaLinuxFixed packages rolling to production repositories for 8, 9 and 10 (vendor-claimed)AlmaLinux advisory
cPanel EasyApache (ea-php) and CloudLinux alt-phpFixed packages for ea-php52 to ea-php85 and most alt-php sets reported stable (vendor-claimed); installing them is the server owner's jobCloudLinux
HerokuFixed runtime builds, including a rebuilt 8.1.34; apps need a redeployHeroku changelog

These rows move fast. Open the linked page before you act on a row.

Am I affected? A three-state self-test

Where you stand right now

A passive check from outside can only give you the first two states. Only evidence from the server or the host gives you the third.

  1. Detected Your site serves PHP and the exposed version is below the fixed release for its branch. Treat the site as exposed. Ask the host the question above, or patch and restart yourself today.
  2. Unknown Your site serves PHP but hides the version, or shows a version that could be a backport. This is the common case. Nothing from outside can settle it. Get the package or build identifier and the restart confirmation from whoever runs the server.
  3. Confirmed by owner evidence You have the fixed package name or changelog entry naming both CVEs, and a restart or redeploy time after it was installed. The runtime is patched. The remaining question is whether anything got in between 17 October and your patch time; see the indicators page.

No scan, ours included, can move you from "unknown" to "confirmed". A clean passive result is not proof of a patch.

Was anything exploited before you patched?

Attempts started before disclosure. AWS saw exploit attempts against its honeypots on 17 October, four days before the advisory, and broad attempts across its sensors once public proof-of-concept code appeared on 21 October. AWS itself says it is unclear whether the early attempts would have worked on real systems, and at our 22 October check no primary source had published a confirmed, named compromise. Neither CVE was in CISA's Known Exploited Vulnerabilities catalog on that date.

The difference between attempts and compromise is covered on its own page. That is not reassurance. It means the public record lags what attackers are doing. If your PHP was unpatched and reachable between 17 and 22 October, look for unexpected PHP files in upload directories, cron entries and scheduled tasks you did not create, new administrator accounts, and outbound connections from the web server. Patching does not remove anything that was planted before the patch.

What this bug is, without the exploit

Both CVEs are memory-safety problems in the PHP engine itself, reachable by an unauthenticated web request. CVE-2026-109618 is remote code execution via memory corruption during an out-of-memory condition. CVE-2026-109619 is remote code execution via stale global state carried between requests. The PHP project's advisories describe the conditions; we do not reproduce payloads or proof-of-concept code here, and you do not need them to fix your site. Each host and channel has its own page among the PHP2Shell guides.

Social posts about a "patch bypass" or an "8.5.13 hotfix" were not backed by any new PHP release or advisory at our last check. If that changes, the PHP changelog and advisory list linked below will show it first.

Separately, php.net's 2026 archive carries a 23 October follow-up notice naming CVE-2026-115560, with details promised for the next release. It is a different issue from the two PHP2Shell CVEs; we will add it here once the advisory is published.

Questions people ask

Does updating WordPress, WooCommerce or my plugins fix PHP2Shell?

No. The bug is in the PHP engine that runs those applications, not in the applications. The fix is a patched PHP package on the server, followed by a restart of the PHP workers. Application updates are still worth doing, but they do not close this hole.

My host says they patched. Is that enough?

Usually, if the patched runtime is the one serving your domain and its workers were restarted. Ask the host to confirm both for your domain, in writing. Many hosts run several PHP versions side by side, and a patched package that nobody restarted keeps serving the old code.

php -v shows an old version. Am I vulnerable?

Not necessarily. Distributions such as Debian and Ubuntu backport fixes and keep the old version number, and the command-line PHP is often a different binary from the one serving web requests. Check the package changelog for the CVE ids and the version reported by the web runtime itself.

Is PHP2Shell being exploited?

Attempts, yes: AWS reported honeypot attempts from 17 October and broad scanning after public proof-of-concept code appeared. A confirmed, named real-world compromise had not been published by a primary source at our 22 October check. Treat your site as exposed until the running PHP is confirmed patched.

I run PHP 8.1 or older. What now?

php.net shipped no release for 8.1 or older because those branches are end of life. Some distributions and hosts backported the fix into their own 8.1 or 7.x packages (Ubuntu 22.04 and Heroku did). If yours did not, the realistic path is to move the site to a supported PHP branch and test it.

Sources

  1. PHP security notice, 21 October 2026 (php.net)Names both CVEs, the fixed releases, and says every PHP installation serving web requests is in scope.
  2. GHSA-w8hw-w9fx-j79w: CVE-2026-109618 (php/php-src advisory)
  3. GHSA-6wmf-4rv5-p3rp: CVE-2026-109619 (php/php-src advisory)
  4. PHP 8 changelog (php.net)8.5.12 entry dated 22 October lists both advisories.
  5. Amazon Threat Intelligence: PHP2Shell exploitation attempts seen in MadPot honeypots before disclosure (AWS Security Blog, 21 October 2026)Vendor telemetry. AWS says it is unclear whether the early attempts would have succeeded on real systems.
  6. NHS England cyber alert CC-4875 (21 October 2026)
  7. Canonical: PHP2Shell vulnerability fixes available (Ubuntu blog)
  8. Debian security tracker: CVE-2026-109618
  9. Red Hat CVE page: CVE-2026-109618
  10. CloudLinux: fixed ea-php and alt-php packages (blog, 22 October 2026)
  11. Heroku changelog: PHP runtime builds with the PHP2Shell fixes
  12. CISA Known Exploited Vulnerabilities catalogNeither CVE was in the catalog at our 22 October check. Re-check before relying on this.

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.