Critical PHP update (21 Oct 2026) First fixed upstream releases: 8.6.0, 8.5.13, 8.4.28, 8.3.37, 8.2.36. What to do now New (23 Oct): CVE-2026-115560

Understanding

What is PHP2Shell

Page last updated: Data verified:

Contents

“PHP2Shell” is the name the researchers gave to a group of critical memory-safety vulnerabilities in the PHP core. It does not concern a plugin or CMS, but the very program that executes PHP code on every server.

At a glance#

  • What: two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, in the PHP runtime. The PHP project rates them CVSS v4.0 9.2.
  • What can happen: under specific conditions, an attacker without an account can execute code on the server (remote code execution). The researchers also describe memory disclosure paths.
  • Who is affected: every PHP installation that serves web requests, i.e. PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, according to the PHP project.
  • Fix: upgrade PHP to a fixed version (8.5.12, 8.4.27, 8.3.36, 8.2.35 or later, ideally the 19 Nov 2026 releases 8.5.13, 8.4.28, 8.3.37, 8.2.36 which also fix CVE-2026-115560, or a fixed package from your vendor) and restart all PHP processes.
Sources: PHP project · The PHP Foundation

A runtime vulnerability, not an application one#

A PHP website has two layers:

  1. The application: WordPress, WooCommerce, Drupal, Joomla, Laravel, a custom system and so on. These are updated from the admin dashboard or with composer.
  2. The PHP runtime: the program (binary) that reads and executes the application’s code. It is installed on the server by the Linux distribution, the hosting panel or a container image.

PHP2Shell sits in the second layer. That is why:

  • An up-to-date CMS does not mean up-to-date PHP. A WordPress site with every plugin updated can still run on vulnerable PHP. Updating WordPress does not touch the runtime.
  • The problem is not limited to specific CMSs. The Wiz researchers note that exploitation does not require a vulnerable application; even a simple “Hello World” page on a vulnerable PHP version can be exposed, depending on configuration. The public demonstrations used WordPress, Drupal and Joomla because they are popular, not because they are the only targets.
  • It also affects custom applications, internal tools, APIs, old sub-projects in subfolders, phpMyAdmin, webmail, and devices or appliances that embed PHP.
Sources: Wiz Research · PHP project · NCSC-NL

What the terms mean#

Remote code execution (RCE). The attacker sends specially crafted requests over the internet and manages to run their own commands on the server, with the privileges of the user running PHP. From there they can, for example, read configuration files containing database passwords, plant a backdoor or alter content.

Memory disclosure. The attacker does not execute code, but manages to see parts of the PHP process’s memory. That memory may contain data from other requests: cookies, tokens, passwords, API keys. Wiz describes one such path in which memory contents are returned inside a response cookie.

Vulnerable version, actual exposure, confirmed compromise#

These three states are often confused. It helps to keep them apart:

StateWhat it meansHow you establish it
Vulnerable versionThe installed runtime does not contain the fix.PHP version and, for distribution/panel packages, the package changelog.
Actual exposureThe vulnerable runtime is reachable by an attacker in a way that meets the preconditions (e.g. public site, SAPI, worker reuse, settings).Configuration analysis. The preconditions differ per CVE and environment: see the vulnerabilities.
Confirmed compromiseThere is evidence that someone exploited the system.Incident investigation: logs, files, processes, connections. See possible compromise.

A vulnerable version does not mean you have been compromised. Equally, the absence of visible signs does not prove that nothing happened. The right practice is the same in every case: upgrade as soon as possible, then check for signs of compromise during the period the system was vulnerable.

Technical layer#

This section is aimed at developers and administrators. It summarises the official advisories and the researchers’ publications, without exploitation details.

The common pattern#

PHP handles fatal errors, and in particular memory exhaustion (out-of-memory, OOM, e.g. when memory_limit is exceeded), by abruptly aborting execution of the request. Until the fixes, this was done with longjmp(). If the abort happens at the wrong moment, two things can be left inconsistent:

  • Half-initialised data (CVE-2026-109618). Request memory that was already reachable before it was fully initialised is later treated as valid, during request shutdown.
  • Global state that survives (CVE-2026-109619). A persistent worker keeps pointers in global variables to request memory that has already been freed. A subsequent request on the same worker can use it before normal initialisation takes place (use-after-free).

The attacker tries to trigger memory exhaustion in a controlled way, usually through the processing of multipart requests (uploads, forms) before any application code runs, and then to exploit the inconsistency.

Sources: php-src (GitHub) · php-src (GitHub)

The fix#

According to the CVE-2026-109618 advisory, the fix replaces the longjmp() path with a “soft” OOM that defers the abort and a “hard” OOM that terminates the process immediately with _exit(). Practical consequence: after the upgrade, a request that drastically exceeds the memory limit may terminate the worker without shutdown handlers running. See the post-upgrade settings.

Differences per environment#

  • Apache with mod_php: the PHP project considers the risk highest here, with a demonstrated exploit in which an unauthenticated request triggers the attack before any application code runs.
  • PHP-FPM: for CVE-2026-109618 the advisory states that FPM was assessed as vulnerable through code analysis. The PHP Foundation and Calif report confirmed code execution on FPM via application-level paths or with a second multipart request on the same worker.
  • LSAPI (LiteSpeed) and FrankenPHP: according to the advisory, likely vulnerable but not validated.
  • PHP 8.5: an additional confirmed path via fatal_error_backtraces (CVE-2026-109619).

The individual sources do not phrase the preconditions in exactly the same way. Here we record each source’s wording rather than a single unified picture that cannot be confirmed.

Sources: PHP project · php-src (GitHub) · The PHP Foundation · Calif

See the remediation steps