Summary
CVE-2026-109618 is a critical remote code execution (RCE) vulnerability in the PHP core, one of a pair (with CVE-2026-109619) known as "php2shell". The PHP security team rates it 9.2 (CVSS v4.0), and its network attack vector makes it relevant to any internet-exposed PHP server. PHP shipped the fix on October 21, 2026, after the embargoed details leaked early. Public proof-of-concept code appeared on GitHub within hours of the release, so unpatched servers should be treated as exploitable now.
Technical details
-
Root cause: a cross-request memory-corruption flaw (use-after-free, CWE-416). PHP’s out-of-memory handling can interrupt a request while internal request data is only partially initialized; cleanup then treats the invalid data as valid.
-
Trigger conditions: memory exhaustion reached through normal request handling. The documented route is multipart parsing, for example a request that stays under
post_max_sizebut carries a very large number of part-headers or nested field names until it exhaustsmemory_limit. No special field or payload string is required. -
Attack vector: network (remotely exploitable), unauthenticated.
-
Impact: remote code execution in the PHP worker. Risk is highest for Apache with mod_php, where the request body is parsed during startup before application code runs.
-
The flaw is in PHP itself, so it cannot be fixed in application code. It requires updating PHP at the infrastructure level.
Affected software
-
All PHP releases from 5.4 onward, up to and including 8.2.34, 8.3.35, 8.4.26 and 8.5.11.
-
Fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. The PHP project also provided source backports for 7.4, 8.0 and 8.1.
-
End-of-life branches (8.1 and older) receive no official upstream fix; use a distribution backport or migrate to a supported branch.
Severity
- CVSS v4.0 base score: 9.2 (Critical), vector
AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H, as assigned by the PHP security team. Credited to Wiz, OpenAI, Calif.io and PHP core maintainers.
Mitigation and recommended actions
-
Immediate: upgrade to 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12, or your distribution’s backport (for example Ubuntu USN-8948-1).
-
Inventory all PHP installations and versions, including those bundled in containers, web hosting and appliances.
-
If you cannot patch immediately, reduce the memory pressure an unauthenticated request can create: enforce
memory_limit = -1administratively and bound memory externally with a per-worker container or cgroup limit (do not useRLIMIT_ASorRLIMIT_DATA, which trigger the vulnerable path); keeppost_max_sizeconservative; lowermax_input_nesting_level; and block multipart requests at the edge for hosts that do not accept uploads. -
Migrate end-of-life PHP versions to a supported branch.
-
For WAF mitigations, vendor built-in rulesets in blocking mode can help mitigate the risk (e.g. Cloudflare Managed Ruleset and Akamai Adaptive Security Engine rules).

