AI Makers
← Back to Blog
21 October 2026 · 7 min read

PHP2Shell: is your PHP site exposed?

Two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, can let an attacker run code on your web server. Here is how to check and what to do.

The short version

  • What it is: two PHP flaws that PHP says can allow unauthenticated remote code execution.
  • Who is exposed: any site on a vulnerable PHP version, including WordPress, WooCommerce stores and Laravel apps.
  • The fix: update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install your vendor’s patched package.
  • Can’t patch today? The interim settings are partial. The UK NCSC says to consider taking the system offline.

What is PHP2Shell?

PHP2Shell is the name for two critical flaws in PHP itself, fixed on 21 October 2026. PHP says both can allow unauthenticated remote code execution, and rates both 9.2 on CVSS v4.0.

CVE-2026-109618 is ‘RCE via OOM corruption’: running out of memory can leave request data half set up. CVE-2026-109619 is ‘RCE via stale global state’: data from one request can survive into the next request on the same worker.

Sansec adds that one path can leak memory from other requests. That memory can hold passwords, session tokens, API keys and TLS private keys.

Who is affected?

Any web server running a vulnerable PHP version is affected. Sansec says every web server on PHP 5.4 or later is exposed in its default configuration. The UK NCSC warns that all versions may be affected, so checks should not stop at old servers.

The flaws sit in the PHP interpreter, not in your application. Patchstack lists WordPress, Drupal, Magento, Joomla and Laravel sites as exposed, and that includes WooCommerce stores. PHP names PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, and rates mod_php as the highest risk.

Is PHP2Shell being exploited?

A working exploit exists. Help Net Security reports that one unauthenticated request can trigger it before any application code runs.

On 21 October, Patchstack logged active incidents reported by hosting partners, and Cloudflare said it was seeing early attacks. Later that day, Patchstack’s own telemetry showed probing, with no hard evidence of breaches yet.

How to check your PHP version in two minutes

Check the PHP version that serves your web pages, not only the one on the command line. Sansec makes the same point for PHP-FPM.

  • WordPress: go to Tools, then Site Health, then the Info tab, and open Server. The PHP version is listed there.
  • Hosting control panel: cPanel, Plesk and most managed hosts show the PHP version per site.
  • Server access: run php -v, then confirm the web version with a temporary phpinfo() page. Delete that page straight after.

Compare the result with the fixed releases below. A distribution package can carry the fix under an older version number, so check your vendor’s changelog too.

Which PHP versions are fixed?

  • PHP 8.5.12
  • PHP 8.4.27
  • PHP 8.3.36
  • PHP 8.2.35

PHP 8.1 and older no longer get releases from the PHP project. PHP published source backports for 7.4, 8.0 and 8.1, and Linux distributions and LTS vendors received patches early. On anything older, ask your host or vendor for a backport, or upgrade.

What to do if you can’t patch today

PHP is clear that there are no complete mitigations, and updating is the only safe choice. The steps below reduce risk while you arrange the update.

  • Turn off upload progress: set session.upload_progress.enabled=0 in php.ini or the FPM pool, then restart every worker. It does not work through ini_set() or .user.ini, and it is not a full fix.
  • Remove the memory limit: for CVE-2026-109618, PHP suggests memory_limit=-1, set with php_admin_value so apps can’t override it. Avoid RLIMIT_AS and RLIMIT_DATA. This is a partial stopgap, not a fix, and Sansec warns one request can then use all server memory.
  • Use a WAF: Cloudflare has deployed WAF rules for the known exploit vectors, for all customers including free plans.
  • Go offline if you must: the UK NCSC says to consider taking a system offline until it can be fixed. Patchstack suggests maintenance mode for high-risk sites.
  • Skip unofficial fixes: Patchstack warns against ‘fix’ plugins and copy-pasted snippets.

Patchstack lists warning signs to watch for. These include odd multipart requests followed by memory errors or HTTP 500s, malformed PHPSESSID cookies and unexplained worker restarts. If you see them, update and rotate your credentials.

PHP2Shell exposure scan: $250

I check which PHP version your sites actually run, whether the fix is in place, and whether the interim settings are set. You get a written result.

If something needs fixing, I can fix it too. I quote the fix after the scan.

For a wider check of your site and APIs, see my AI penetration testing.

Frequently asked questions

What is PHP2Shell?

PHP2Shell is the name for two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619. PHP says both can allow unauthenticated remote code execution on a web server. PHP rates both 9.2 on CVSS v4.0.

Is WordPress affected by PHP2Shell?

Yes, if the server runs a vulnerable PHP version. The flaws are in PHP itself, not in WordPress or a plugin. Patchstack lists WordPress, Drupal, Magento, Joomla and Laravel sites as exposed.

Which PHP versions fix PHP2Shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, all released on 21 October 2026. PHP 8.1 and older get no official release, so you need a vendor backport or an upgrade.

Does turning off session.upload_progress fix PHP2Shell?

No. It blocks one demonstrated attack path, but PHP says it does not cover the other paths. PHP says there are no complete mitigations and updating is the only safe choice.

Is PHP2Shell being exploited?

A working exploit exists, and Patchstack reported active incidents from hosting partners on 21 October. Its own telemetry that day showed probing, with no hard evidence of breaches yet.

Sources

All checked on 21 October 2026.

Related reading