PHP · runtime · 2026-10-21

PHP2Shell: RCE via OOM corruption

CVE CVE-2026-109618GHSA GHSA-w8hw-w9fx-j79w Critical

One of two PHP core flaws fixed on 21 October 2026. It is a runtime defect, not an application bug: updating a CMS or plugin does not remove exposure, and PHP rates Apache mod_php as the highest-risk configuration.

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-109618 is an out-of-memory handling flaw that can corrupt request state and lead to remote code execution. GitHub / PHP Security Team PHP Group
  2. The official fixed releases are PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. PHP Group GitHub / PHP Security Team
  3. PHP's CVSS v4.0 score is 9.2; NVD separately publishes a CVSS v3.1 score of 9.8. These are different scoring systems and should not be mixed. GitHub / PHP Security Team NIST NVD
  4. Updating is the only complete mitigation. Setting memory_limit=-1 is an official interim control, but PHP warns that an underlying allocation failure can still reach the vulnerable path. GitHub / PHP Security Team PHP Group
  5. The CVE was not listed in the CISA KEV JSON catalog version 2026.10.21 when checked for this site. CISA

Summary

Unauthenticated remote code execution in the PHP runtime. An out-of-memory exit can occur while request state is only partly initialised; later cleanup may treat invalid memory as valid. PHP says multiple OOM strategies can reach the condition.

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 PHP 8.1 and older are end-of-life. Minimal source backports exist for 7.4, 8.0 and 8.1; distributions and LTS vendors may backport. Wiz reports that PHP 5.4 and later are affected by at least one of the two flaws; CERT-EU says PHP 5 onward may be affected.

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 Wiz Research

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. Distributions may carry a backport without changing the visible version string. 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.

  • PHP is serving web requests through a SAPI such as Apache mod_php, PHP-FPM, php-cgi, FrankenPHP or LiteSpeed.
  • PHP rates Apache mod_php highest risk because a demonstrated exploit can run before application code executes.
  • The OOM path depends on inducing an allocation failure while request data is partly initialised; this is not described as every request.
  • Bitdefender's analysis says defeating ASLR is also required for exploitation; that is a vendor assessment, not a guarantee.

Exploitation status

Security vendors observed exploitation attempts before and after the patch, including an Amazon honeypot attempt on 17 October 2026. As of this page's verification time, no publicly documented confirmed mass compromise had been established. Attempts are not the same as successful exploitation.

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 uses longjmp() to leave the current execution context when an out-of-memory condition occurs. The advisory says some contexts do not fully account for that exit while request memory is still being initialised. Request cleanup can then read or branch on memory that was never validly set up.

The practical consequence is memory corruption inside the PHP worker, below the application layer. The advisory states that multiple OOM strategies can consistently trigger the condition and lead to remote code execution. This is a description of the defect, not an exploit recipe.

Who is exposed

Any PHP installation that serves web requests is in scope, including PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP project singles out Apache mod_php because an unauthenticated request can trigger the demonstrated attack before any application code runs.

Website code, CMS versions and plugins are not the relevant boundary here. A fully patched application can still be exposed if the PHP runtime underneath it is unpatched. Container images, appliances and managed hosting need their own verification because the PHP binary may be supplied by the platform rather than the site owner.

Fix and interim controls

The complete fix is a PHP release containing the patch: 8.2.35, 8.3.36, 8.4.27 or 8.5.12. Distributions and LTS vendors received patches in advance and may backport them. A backported package may keep the old upstream version string, so the package changelog and vendor advisory matter more than the number reported by a version scanner.

If an immediate update is impossible, PHP lists interim controls: set memory_limit=-1 in a way applications cannot override; reduce post_max_size (8M where uploads are not required, 32M where they are); enforce decoded request-size, field-count, multipart-part, header-count and nesting limits at the proxy; and use container or cgroup memory limits. PHP explicitly warns against using RLIMIT_AS or RLIMIT_DATA as the boundary because they can cause the vulnerable allocation failure.

These controls reduce specific attack paths. They do not make an installation safe. The same page also says update is the only complete mitigation.

Why a WAF, backup or non-root user does not close the issue

Cloudflare deployed managed WAF rules about nine hours before public disclosure and reported attack traffic. That is useful time-buying, but Cloudflare itself says customers should patch even with WAF protection. A rule match can be evaded by payload variation, and a missed request reaches PHP before the application sees it.

Backups restore availability after an incident; they do not prevent code execution. Running PHP as a non-root user limits what a successful attacker can do next, but it does not turn remote code execution into a non-event. Each of these controls addresses a different part of the risk.

Verification status

The defect, affected branches and fixed releases are confirmed by the PHP project's advisory, the GitHub security advisories and the release changelog. The two CVEs are tracked separately by NVD. Exploitation attempts are reported by multiple security vendors, but this site does not convert attempt counts into a claim that any particular site was compromised.

The CISA KEV catalog version downloaded for this page did not list either CVE. That is a statement about one catalog at one time, not a finding that exploitation never happened.

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