PHP · runtime · 2026-10-21

PHP2Shell: RCE via stale global state

CVE CVE-2026-109619GHSA GHSA-6wmf-4rv5-p3rp Critical

The second PHP core flaw fixed on 21 October 2026. It requires a producer request and a consumer request to reach the same worker; confirmed paths involve session upload progress and, on PHP 8.5, fatal-error backtraces.

Patch status
Patch available
Exploitation
Attempts observed
CISA KEV
Not listed

Key facts

Each fact is linked to the source that supports it.
  1. CVE-2026-109619 is a use-after-free caused by request-owned global state that survives after the request heap is freed. GitHub / PHP Security Team PHP Group
  2. The producer and consumer requests must reach the same worker; this makes worker reuse part of the exposure analysis. GitHub / PHP Security Team
  3. Official interim controls are session.upload_progress.enabled=0 and, on PHP 8.5, fatal_error_backtraces=0, applied before request parsing, followed by restarting every worker. PHP Group GitHub / PHP Security Team
  4. The advisory says updating to a release with the complete state-reset patch is the only reliable mitigation. GitHub / PHP Security Team
  5. NVD publishes CVSS v3.1 9.8 while PHP publishes CVSS v4.0 9.2; the scores are not interchangeable. NIST NVD GitHub / PHP Security Team

Summary

Unauthenticated remote code execution through a use-after-free pattern. Request-owned state can survive in worker globals after the request heap is freed, and a later request on the same worker may act on that stale state.

Component: PHP core (php-src). Disclosed: 21 October 2026. Last verified: 22 October 2026, 16:45 UTC.

Affected versions

Product Affected range Note
PHP 8.2 < 8.2.35 PHP 8.2 reaches end of life on 31 December 2026.
PHP 8.3 < 8.3.36 Upstream fix available.
PHP 8.4 < 8.4.27 Upstream fix available.
PHP 8.5 < 8.5.12 Upstream fix available.
PHP 8.1 and older No upstream support End-of-life branches have no official release; source backports exist for 7.4, 8.0 and 8.1. Vendor backports require separate verification.

Version ranges preserve the source wording. A distribution package may contain a backport without changing this string. GitHub / PHP Security Team PHP Group CERT-EU

Fixed versions

Product Fixed version Note
PHP 8.2 8.2.35 Security release.
PHP 8.3 8.3.36 Security release.
PHP 8.4 8.4.27 Security release.
PHP 8.5 8.5.12 Security release.

Fixed upstream in 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Restart workers after updating so the old binary is not still serving requests. PHP Group GitHub / PHP Security Team

Conditions and scope

These are the conditions named by the sources. They are not a score and not a prediction.

  • The producer and consumer requests must be handled by the same PHP worker, according to the advisory.
  • The confirmed session path requires session.upload_progress.enabled to remain at its default-on setting.
  • The confirmed fatal-error-backtrace path applies to PHP 8.5.
  • PHP describes multiple trigger strategies; the confirmed paths are not the full set of variants.

Exploitation status

Attempts have been reported by multiple vendors, including activity that abused the session upload-progress path. No confirmed successful mass compromise had been publicly established at this page's verification time.

CISA KEV — not listed

Neither PHP2Shell CVE appears in CISA KEV catalog version 2026.10.21, checked 23 October 2026, 13:52 UTC. This is a catalog observation, not proof that exploitation never occurred.

Catalog version 2026.10.21 · checked 23 October 2026, 13:52 UTC.

Severity and scoring

Scores are listed with their version and assessor. Different CVSS versions, and different assessors, are not averaged. The presence of a high score does not establish exploitation, and a lower score does not make a memory-safety defect harmless.

9.2
CVSS v4.0 · Critical
PHP Security Team
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
9.8
CVSS v3.1 · Critical
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What the flaw is

PHP keeps several pieces of state in process-global variables. Some of those variables temporarily point into the memory owned by the current request. The advisory says that in some scenarios this state is not reset correctly, or is repopulated after a reset, and can still refer to request memory after that memory has been freed.

A later request handled by the same worker may read or branch on the stale value before normal initialisation replaces it. The advisory describes this as a use-after-free and says heap manipulation can produce full remote code execution. The confirmed early consumers are INI diagnostics and session upload progress.

Why worker reuse matters

The producer request and the consumer request must reach the same worker. That condition is why a simple single-request scanner may not prove or disprove exposure, and why PHP-FPM operators sometimes use pm.max_requests=1 as a temporary way to break the reuse pattern. That setting has availability and performance costs and is not a complete fix.

Disabling session upload progress removes the confirmed session path. Setting fatal_error_backtraces=0 on PHP 8.5 removes the confirmed fatal-backtrace path. Neither removes other variants. PHP's advisory is explicit that there is no complete generic configuration fix.

Fix and interim controls

Update to 8.2.35, 8.3.36, 8.4.27 or 8.5.12, then restart every PHP worker. A package upgrade that leaves old workers running does not apply the fix to traffic. Managed platforms must confirm the runtime their pool actually loads.

If patching cannot happen immediately, apply the settings in php.ini, the FPM pool or server configuration so they take effect before request parsing. PHP warns not to rely on ini_set() or .user.ini. Hiding diagnostics with error_reporting, display_errors or @ does not close the path. Also fix attacker-reachable fatal errors and timeouts, because those can feed the confirmed paths.

Verification status

The flaw, patched releases and interim controls are confirmed by the PHP advisory, the GitHub advisory and PHP's release announcement. Wiz demonstrated laboratory exploitation against multiple CMS container images. Vendor reports of attack attempts describe attempts, not confirmed compromises of specific sites.

The CVE was not in the CISA KEV JSON catalog version downloaded for this page. KEV absence is a statement about that catalog at that time.

What to do

Sources

Sources for this record

Last verified 22 October 2026, 16:45 UTC. A statement that no evidence was found in checked sources is not a statement that an event never occurred.

Search PHP2Shell Live

Type to search the local index Results stay in your browser
↑ ↓ move Enter open Esc close