PHP just dropped a nightmare scenario for defenders. If you run PHP 5 or newer, you are likely vulnerable to two new critical Remote Code Execution (RCE) flaws, dubbed PHP2Shell (CVE-2026-109618 and CVE-2026-109619).[1]

This isn’t an application logic bug in WordPress or Drupal, though they are certainly affected.[1] The vulnerability lives in the PHP core itself, specifically in how the engine handles upload progress and memory exhaustion.[3] Because the exploit happens before your application code even executes, application-level authentication cannot block it.[3]

The Anatomy of the Exploit

The mechanics are brutal. An attacker intentionally sends a maliciously crafted, massive request designed to exhaust PHP’s memory_limit.[4] When the engine hits this out-of-memory condition, it uses a C-level longjmp() to abruptly abort execution and jump straight to the request shutdown phase.[4]

That abrupt jump skips the normal cleanup routines, leaving dangling pointers and uninitialized memory behind.[4] The attacker then crafts the heap to overwrite those pointers with their own payload.[4] When PHP’s shutdown routine tries to free the memory, it blindly reads the attacker’s forged structure, leading to remote code execution.[4]

Mitigation vs. Remediation

I’ve seen a lot of noise online about just turning off session.upload_progress.enabled to buy time. While researchers at Calif suggested it as a partial, temporary mitigation, others like Datadog have confirmed that configuration tweaks don’t actually fully protect you.[1][3]

Setting memory_limit=-1 removes the memory cap entirely, which might stop this specific out-of-memory exploit chain. But doing so drastically increases your risk of a simple memory exhaustion Denial of Service (DoS) attack.[1] You’re trading one outage for another.

The only real fix is to patch. PHP has released fixed versions: 8.5.12, 8.4.27, 8.3.36, and 8.2.35.[3] Even older branches like 7.4, 8.0, and 8.1 have received source backports, though you’ll need to check with your distro or vendor for those specific packages.[3]

The State of Play

CISA has already added these to the Known Exploited Vulnerabilities (KEV) catalog.[2] Exploitation attempts were seen in the wild four days before the public disclosure.[3]

If there is a silver lining here, it’s that building a reliable exploit is difficult. The attacker needs to know the exact build-specific memory offsets of your PHP binary.[4] Telemetry from Wiz shows that while open-source exploit kits are circulating, many fail in the wild because they can’t reliably obtain the memory addresses needed to complete the chain across different environments.[5]

Don’t let that make you complacent. Opportunistic attackers will figure this out. Wiz also reported a 47.9% drop in significantly affected organizations within the first week, meaning people are taking this seriously and patching.[5] If you haven’t yet, you need to update your runtimes, rebuild your containers, and restart your workers immediately.

Sources

[1] https://calif.io/php2shell — PHP2Shell by Calif Research [2] https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching — Critical Vulnerabilities in PHP Require Immediate Patching | CISA [3] https://securitylabs.datadoghq.com/articles/php2shell-critical-vulnerabilities-in-php — Datadog Security Labs: PHP2Shell Analysis [4] https://www.wiz.io/blog/php2shell-exploitation-so-far — Wiz Blog: PHP2Shell Exploitation and Remediation Trends [5] https://www.akamai.com/blog/security-research/understanding-php2shell-everything-you-need-to-know — Akamai: Understanding PHP2Shell