← PatchMyPHP blog

What is PHP2Shell? CVE-2026-109618 and CVE-2026-109619 explained

By PatchMyPHP ·

PHP2Shell is the common name for two critical vulnerabilities in the PHP engine, CVE-2026-109618 and CVE-2026-109619, that together let an attacker run their own code on a web server without logging in. PHP rates both 9.2 (CVSS v4.0, PHP's rating) and fixed them in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released October 21, 2026.

Because the flaws live in PHP itself rather than in any single application, they affect every PHP site: WordPress, WooCommerce, Laravel, Drupal, Joomla, Magento and custom code alike. This article explains what the two CVEs are, which versions are exposed, how the disclosure unfolded, and what it means if you run a site.

Check whether a site has the fix

Read-only: one standard page request, like a browser visit. We never send attack traffic.

The two CVEs behind the PHP2Shell name

PHP2Shell is not one bug but two, both in PHP core, both reported in PHP's security advisory of October 21, 2026:

Both carry a CVSS score of 9.2 (CVSS v4.0, PHP's rating). According to security firm Wiz (October 21, 2026), one path lets an attacker read memory from a PHP worker process, which can contain passwords, session tokens and API keys, while the other was developed into running code on the server. Wiz notes that even a minimal "Hello World" application on an affected PHP version can be exploited, because the vulnerability is in PHP, not in the application's own code.

How the two flaws chain together

Both bugs begin with a fatal error inside a request, such as PHP exhausting its memory limit. That failed request leaves internal state behind, and the next request handled by the same PHP worker reuses it. mod_php (PHP running inside Apache) is rated the highest-risk setup in PHP's advisory, where a demonstrated exploit fires from a single unauthenticated request before any application code runs. This is why a well-maintained, fully patched application can still be vulnerable if the PHP engine underneath it is not.

CVSS 9.2: what the score means

A CVSS score of 9.2 (CVSS v4.0, PHP's rating) sits in the critical band of the scale. The rating reflects three things that make PHP2Shell dangerous: it can be triggered remotely over the network, it needs no authentication or user interaction, and a successful attack can lead to full code execution on the server. In practical terms, an exposed server can be taken over by anyone who can reach it over the internet.

Affected and fixed versions

Reports say every PHP version from 5.4 onward is affected. PHP ships fixes only for branches that still receive security support.

BranchFixed inSecurity support until
PHP 8.58.5.13Dec 31, 2029
PHP 8.48.4.28Dec 31, 2028
PHP 8.38.3.37Dec 31, 2027
PHP 8.28.2.36Dec 31, 2026
PHP 8.1 and olderNo fixEnded (8.1 on Dec 31, 2025)

Sites on PHP 8.1 or older cannot simply update to a patched release, because none exists for those branches. The only durable fix is moving to a supported version; see PHP 8.1 end of life. If you run a distribution package (Debian, Ubuntu, Red Hat), the version number may stay the same while the fix is added, so check your distribution's security tracker rather than the number alone.

Disclosure timeline

DateWhat happened
October 20, 2026Details of both flaws leak publicly, a day ahead of PHP's planned release.
October 21, 2026PHP ships the fixed releases: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. The advisory is published on php.net.
October 21, 2026Security firms (Wiz, Sansec) publish analyses, and Cloudflare reports its WAF blocking known attacks by default from 03:02 UTC.
October 22, 2026The BBC reports government and other sites going offline as a precaution on official advice; the PHP2Shell name is in wide use.

Because the technical details leaked on October 20, 2026, a day before PHP's planned release, defenders and attackers learned of the flaws at roughly the same time. That compressed window is why the advice from national cyber agencies was unusually blunt: patch immediately, or take exposed systems offline until you can.

What it means for site owners

If you run any public PHP site, treat it as exposed until you confirm the PHP version serving it carries the fix. The steps are the same whatever the application:

  1. Find the version your site actually serves. Use the free checker above, or in WordPress open Tools, Site Health, Info, Server.
  2. Compare it with the fixed releases (8.5.12, 8.4.27, 8.3.36 and 8.2.35), or with your distribution's tracker for a packaged build.
  3. Update and restart. PHP-FPM and Apache keep running the old code until they restart. Steps per host: how to update your PHP version.

A full walkthrough of patching on each hosting type, plus php.net's stopgap mitigations for sites that cannot update today, is on our main PHP2Shell guide.

Want to know the day it matters? Continuous monitoring reads the real PHP version from inside your server every day and emails you the day a new fix applies to your site, plus the signs of a break-in. See pricing.

Questions

What does PHP2Shell mean?

It is the nickname given to two PHP core vulnerabilities, CVE-2026-109618 and CVE-2026-109619, that together let an unauthenticated attacker run code ("get a shell") on a web server through PHP itself. It is not an official PHP term; php.net calls them critical remote code execution vulnerabilities.

How severe is PHP2Shell?

PHP rates both CVEs 9.2 (CVSS v4.0, PHP's rating). That is in the critical range, reflecting remote code execution with no authentication required.

Which PHP versions are affected?

Reports say every version from PHP 5.4 up to the fixed releases. PHP only ships fixes for the 8.2, 8.3, 8.4 and 8.5 branches; 8.1 and older get none.

Is PHP2Shell the same as wp2shell?

No. wp2shell was a WordPress core flaw fixed in July 2026. PHP2Shell is in the PHP engine and affects every PHP application, WordPress included.