In short

PHP2Shell is a family of critical memory-safety vulnerabilities in PHP itself, tracked as CVE-2026-109618 and CVE-2026-109619 (CVSS 9.2). They can let an unauthenticated attacker run code on a server that uses PHP to serve web requests, or read secrets from its memory. PHP released fixes on 21 October 2026: update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or a vendor-patched package), then restart every PHP process.

What PHP2Shell is

The bugs are in the PHP runtime, not in any particular application. When a request is cut short by a fatal error, for example by running out of its memory allowance, PHP could leave internal data half-built or pointing at memory that has already been freed. A carefully crafted request can then turn that leftover state into code execution or a leak of memory belonging to other requests.

Because the flaw sits below the application, a fully up-to-date WordPress, Drupal or other PHP application is still exposed if the PHP runtime underneath is unpatched. The researchers report that even a minimal "Hello World" PHP page on an affected version can be attacked.

The two vulnerabilities

Descriptions follow the official PHP advisory.

CVEWhat goes wrongAdvisory
CVE-2026-109618Remote code execution via out-of-memory corruption. Hitting the memory limit at the wrong moment can leave request data partly initialised, which PHP later treats as valid during cleanup.GHSA-w8hw-w9fx-j79w
CVE-2026-109619Remote code execution via stale global state. Internal state belonging to one request can outlive its memory and be used by the next request on the same worker (a use-after-free).GHSA-6wmf-4rv5-p3rp

Both are rated CVSS 9.2. PHP considers Apache with mod_php the highest-risk setup: there, with a demonstrated exploit, an unauthenticated request can trigger the attack before any application code runs.

Who is affected

PHP branchFixed inNotes
8.58.5.12
8.48.4.27
8.38.3.36
8.28.2.358.2 reaches end of life on 31 December 2026.
8.1 and olderNo official releaseEnd of life. Get a backported package from your distribution or LTS vendor, or upgrade. PHP published minimal source backports for 7.4, 8.0 and 8.1.

What to do

  1. Update the PHP runtime everywhere it runs, using your operating system's packages, your hosting provider, or the fixed releases. Updating an application or CMS does not update PHP.
  2. Restart Apache, PHP-FPM and any long-running PHP workers, so the fixed code is actually loaded.
  3. Check products that bundle PHP (appliances, panels, container images) and apply vendor updates. Use the software list to see what's known.
  4. If you can't patch straight away, CERT-EU advises isolating internet-facing applications from public networks until the fix is applied and verified. PHP's advisory lists temporary configuration changes (such as disabling session.upload_progress and adjusting memory limits) that block some attack paths. These are partial and don't make an installation safe, and some have side effects, so follow the exact guidance in the PHP advisory rather than a summary.
  5. After patching, review any temporary settings you changed. The fix introduces a new hard memory limit (described in PHP's advisory and summarised on php2shell.com), so check that memory_limit and post_max_size fit your application.

Signs to look for

Because the bugs act below the application, application logs may show little. Wiz Research suggests watching for:

Several security vendors have published detections and protections; see the sources below. Proof-of-concept material circulated after an early leak. The PHP security team said it had not identified any functional exploits among it at the time of release, but CERT-EU warns that attackers may already be exploiting the flaws.

Timeline

Dates are from the PHP Foundation's account of the release. The people who found the bugs are credited on our acknowledgements page.

Official sources

This page is PHP2List's own summary. For anything you act on, rely on the official sources below; if they differ from this page, they are right.

Summary written by PHP2List from the sources above. Last checked: 22 October 2026.