PHP2Shell RCE: CVE-2026-109618 and CVE-2026-109619 Threaten 70% of Web Servers -- Patch PHP Now
Reach 50,000+ security professionals
Sponsor a newsletter slot and put your brand in front of CISOs, engineers, and IT decision-makers.
CVE-2026-109618 and CVE-2026-109619 together break PHP's memory isolation guarantees, allowing any unauthenticated remote attacker to execute arbitrary code on servers running Apache mod_php, PHP-FPM, php-cgi, FrankenPHP, or LiteSpeed. The PHP security team released emergency out-of-band patches on October 21, 2026, the same day CISA issued an urgent advisory, and SecurityWeek confirmed active exploitation attempts hit sensors within 48 hours. The public proof-of-concept toolkit "PHP2Shell" is already circulating.
PHP powers over 70% of the web's server-side infrastructure, including WordPress, Drupal, Laravel, Magento, Joomla, and countless custom applications. Every one of those installations is exposed until patched. CVE-2026-109618 exploits an out-of-memory corruption condition in PHP's request processing: when a request exhausts available memory at a precise point in PHP's internal execution, the language runtime leaves worker state half-initialized. The next request sharing that worker process inherits corrupted memory and can be crafted to redirect execution. CVE-2026-109619 exploits a related stale global state flaw, a use-after-free where data from one HTTP request remains live in PHP's global namespace and is reachable by a subsequent request on the same worker, again without any authentication.
Organizations running any Apache or LiteSpeed stack with mod_php face the highest immediate risk because the mod_php model reuses worker state most aggressively across concurrent requests. PHP-FPM and php-cgi deployments are affected but the exploitation path differs slightly by configuration. The PHP team states plainly: there is no complete mitigation short of patching. Server operators need to update every PHP branch in production today.
How Does PHP2Shell Work?
CVE-2026-109618 exploits PHP's behavior when a request runs out of allocated memory at the wrong execution point. PHP's memory manager deallocates request-scoped variables, but the deallocation is incomplete when it occurs during internal data structure operations. The result is a half-initialized worker state that persists into the memory pool available to the next request on the same worker process. An attacker sends a crafted request that reliably triggers this specific OOM condition, then a second request that lands on the same worker and exploits the corrupted memory layout to overwrite a function pointer or return address.
CVE-2026-109619 takes a different path to the same result. PHP maintains global state across the lifecycle of a worker process, including internal tables for class definitions, function registries, and extension contexts. Under specific request sequencing, data from a completed request remains accessible in this global state after the response is sent. A follow-up request from any source can read or write that dangling reference, a classic use-after-free condition. Both CVEs share the CWE-824 root cause classification (Access of Uninitialized Pointer) and both require zero authentication from the attacker.
The PHP team identifies Apache mod_php as highest-risk because Apache's prefork and event MPMs share worker memory more directly across requests than FPM-based configurations. PHP-FPM pools are also affected when pool recycling is not aggressive enough to clear stale state between requests. Rapid7's ETR notes that working exploits require specific combinations of OS, PHP version, and web server configuration, but the public PHP2Shell toolkit already packages multiple working variants targeting the most common configurations.
“PHP can leave its memory in a corrupted state when a request ends abnormally. The next request on the same worker inherits that state.”
PHP Security Team, October 21, 2026
Scope and Deployment Risk
PHP 8.2, 8.3, 8.4, and 8.5 are all affected by both CVEs. The PHP team also released minimal backports for the end-of-life branches PHP 7.4, 8.0, and 8.1, which remain deployed on a significant share of production infrastructure. Any PHP installation serving live HTTP requests through Apache, Nginx with php-cgi, FrankenPHP, or LiteSpeed is in scope.
The exposure distribution skews heavily toward Apache mod_php and PHP-FPM. A runZero scan of internet-reachable PHP servers identified millions of unpatched instances in the 72 hours following disclosure. Government sites in at least three countries went offline proactively after disclosure, rather than risk serving traffic on vulnerable PHP builds, and the NSA issued an internal advisory urging federal operators to update or take PHP services offline.
| PHP Branch | Affected Versions | Fixed Version | Action |
|---|---|---|---|
| PHP 8.5 | 8.5.0 to 8.5.11 | 8.5.12 | Update now |
| PHP 8.4 | 8.4.0 to 8.4.26 | 8.4.27 | Update now |
| PHP 8.3 | 8.3.0 to 8.3.35 | 8.3.36 | Update now |
| PHP 8.2 | 8.2.0 to 8.2.34 | 8.2.35 | Update now |
| PHP 8.1 | All versions | Backport available | Update or retire |
| PHP 8.0 | All versions | Backport available | Update or retire |
| PHP 7.4 | All versions | Backport available | Strongly consider migration |
Organizations still on PHP 7.4 or 8.0 face compounding risk: those branches have reached end of life, and the backport is a one-time emergency release that does not commit to ongoing security maintenance. The correct long-term response for those deployments is migration to a supported branch.
Briefings like this, every morning before 9am.
Threat intel, active CVEs, and campaign alerts, distilled for practitioners. 50,000+ subscribers. No noise.
Exploitation Evidence and Timeline
The PHP security team received a responsible disclosure report from ox.security researchers in mid-October 2026. The team fast-tracked an out-of-band release, avoiding the normal monthly cycle, and coordinated with CISA to issue a simultaneous advisory on October 21. A proof-of-concept toolkit labeled "PHP2Shell" appeared on a public tech forum approximately 24 hours before the official fix shipped, forcing the accelerated release timeline.
SecurityWeek's sensor network confirmed exploitation attempts within 48 hours of the public disclosure. Beazley Security Labs' advisory from October 23 describes the PHP2Shell PoC as demonstrating reliable unauthenticated RCE against Apache mod_php on major Linux distributions. Rapid7's ETR states that exploit code is being independently reproduced across multiple research teams, and it expects weaponized variants targeting the broadest-exposure configurations to be broadly available within days.
CrowdStrike confirmed its Falcon platform is blocking PHP2Shell-sourced exploitation attempts as of October 23. The University of Toronto issued an internal advisory to all departments running web applications on PHP, and the Beazley advisory was classified as involving "active exploitation" in the title, reflecting the sensor-confirmed exploitation attempts.
Defenders should treat this as actively exploited. The combination of a public PoC, independent reproduction, and confirmed sensor hits means the window between "being exploited by targeted actors" and "mass automated scanning" is closing fast.
“First exploitation attempts have hit sensors. PHP2Shell is no longer theoretical.”
SecurityWeek, October 23, 2026
PHP2Shell IOCs and Behavioral Indicators
No attacker-controlled C2 infrastructure has been publicly attributed to PHP2Shell campaigns as of October 24. The following behavioral and structural indicators are derived from the vulnerability's exploitation mechanics and are ready for immediate SIEM and EDR rule creation.
The most reliable host-based signal is a web server worker process spawning an interactive shell. A legitimate PHP application never forks /bin/bash, /bin/sh, or /bin/dash as a child of the apache2 or php-fpm process. Any such event is high-confidence exploitation. Similarly, any new PHP file written by the www-data, apache, or nginx user to a web-accessible directory outside of a known deployment window should be treated as webshell installation.
On the network side, look for unexpected outbound connections from web server processes: a php-fpm or apache2 process initiating a TCP connection to an external IP on ports 4444, 1337, 9001, 9999, or any non-standard high port is a strong post-exploitation indicator. The absence of a prior outbound connection pattern from that process makes these events easy to baseline and alert on.
Subscribe to unlock Indicators of Compromise
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Sigma Detection Rules for PHP2Shell
Two detection rules cover the primary PHP2Shell attack phases: initial exploitation (web server spawning a shell) and post-exploitation webshell persistence (web server writing unexpected PHP files). Both carry experimental status; validate against your Linux audit logging configuration before enabling automatic blocking.
Subscribe to unlock Sigma Detection Rules
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Subscribe to unlock Sigma Hunt Queries
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Subscribe to unlock WAF Detection Rules
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Patch and Remediation
Patching is the only complete fix. The PHP team explicitly states no configuration change, permission restriction, or web server setting fully mitigates CVE-2026-109618 or CVE-2026-109619. Every PHP installation serving live web traffic must be updated. The remediation sequence below prioritizes the highest-risk deployment mode first.
For organizations that cannot patch within hours, removing the PHP-FPM socket from external reach and temporarily disabling session.upload_progress in php.ini reduces the attack surface for the most common exploit path without shutting down application functionality entirely. This is a temporary measure only.
Subscribe to unlock Remediation & Mitigation steps
Free subscribers unlock full IOC lists, Sigma detection rules, remediation steps, and every daily briefing.
Why PHP Unauthenticated RCE Matters for Your Organization
PHP2Shell is structurally different from most web application CVEs. This is not a flaw in a specific CMS, framework, or plugin -- it is a flaw in the PHP language runtime itself. Every organization running PHP-backed infrastructure is exposed regardless of how well they harden their application code.
The attack requires no credentials, no prior access, and no special knowledge of the target application. An attacker can enumerate PHP servers via Shodan or Censys, run the PHP2Shell toolkit against identified targets, and obtain remote code execution without interacting with any application logic. This is the same attack profile that made Log4Shell devastating in 2021 and ProxyShell devastating in 2022: a flaw in a widely deployed runtime component that attackers can target at scale.
Review your full PHP deployment inventory. Legacy applications, development and staging environments, and test servers running older PHP branches are frequently overlooked during patch cycles. Any one of those hosts could be used as a pivot point into your internal network once compromised.
For related pre-auth RCE context on similarly structured web infrastructure vulnerabilities, see ServiceNow CVE-2026-18885 Unauthenticated RCE and Exchange CVE-2026-62911 Pre-Auth RCE.
The bottom line
PHP2Shell CVE-2026-109618 and CVE-2026-109619 give any unauthenticated attacker remote code execution on the runtime that powers 70% of the web, including your development environments, staging servers, and legacy applications that rarely get patched. Fixed releases (PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35) shipped October 21 alongside a CISA urgent advisory. Exploitation attempts are active now. Patch every PHP branch in your environment today, deploy the Sigma detection rules to catch any compromise that predated your patch window, and audit web roots for newly written PHP files.
This analysis is generic. create a free account to score threats like this against your own stack.
Frequently asked questions
What is PHP2Shell?
PHP2Shell is the name given to a pair of critical security vulnerabilities in the PHP language runtime, CVE-2026-109618 and CVE-2026-109619, disclosed on October 21, 2026. Both flaws allow an unauthenticated attacker to execute arbitrary code on any server running PHP for web request handling. The name comes from a public proof-of-concept toolkit that leaked before the official patches shipped.
Which PHP versions are affected by CVE-2026-109618 and CVE-2026-109619?
All PHP versions across branches 8.2, 8.3, 8.4, and 8.5 are affected up to the patch release. The fixed versions are PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12. The PHP team also released emergency backport patches for the end-of-life branches 7.4, 8.0, and 8.1, though those branches no longer receive routine security maintenance.
How do CVE-2026-109618 and CVE-2026-109619 work technically?
CVE-2026-109618 exploits PHP's memory handling when a request runs out of memory at a specific execution point: internal data structures are left half-initialized, and the corrupted state persists into the next request on the same worker process. CVE-2026-109619 is a use-after-free condition where global PHP state from one completed request remains accessible to a subsequent request on the same worker. Both are rooted in CWE-824, Access of Uninitialized Pointer. Neither requires any authentication from the attacker.
Is PHP2Shell being actively exploited in the wild?
Yes. SecurityWeek confirmed that first exploitation attempts hit monitoring sensors within 48 hours of the October 21, 2026 patch release. CrowdStrike confirmed its Falcon platform is actively blocking PHP2Shell-sourced attempts. Beazley Security Labs classified its advisory as involving active exploitation. The public PHP2Shell PoC toolkit is functional against common configurations, and Rapid7 notes multiple research teams are independently reproducing working exploits.
What is the patch for PHP2Shell and how do I apply it?
The official patches are PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, available from php.net/downloads.php. For Linux package managers, the patched builds are distributed through standard OS repositories: run `apt update && apt upgrade php` on Debian-based systems or `yum update php` on RHEL-based systems. After updating, verify with `php -v`. For Apache mod_php, restart Apache after the update. For PHP-FPM, restart the FPM service.
How do I detect PHP2Shell exploitation attempts?
The most reliable host-based signal is a web server process (apache2, php-fpm, litespeed) spawning an interactive shell (bash, sh, python3, nc). Deploy the Sigma rules above in your EDR. On the network side, look for unexpected outbound connections from web server processes to unusual ports. Also audit your web root for newly created PHP files that do not correspond to known deployments.
Is there a workaround if I cannot patch immediately?
There is no complete mitigation without patching. As a temporary partial measure, set `session.upload_progress.enabled = Off` in php.ini and restart your web server. This reduces the exploit surface for some CVE-2026-109618 variants that rely on session upload progress manipulation. It does not address CVE-2026-109619 or all exploitation paths. Treat this as a bridge measure only and prioritize patching.
Does PHP2Shell affect PHP on Windows with IIS?
Both CVEs are classified as platform-independent by the PHP security team. PHP deployments on Windows using IIS with php-cgi or FastCGI are in scope. The specific OOM corruption pathway differs on Windows due to memory management architecture differences, but the PHP team has not excluded Windows from the advisory or the patch requirement. Windows PHP operators should apply the same fixed releases.
Sources & references
- CISA: Critical Vulnerabilities in PHP Require Immediate Patching
- PHP Downloads -- Official Fixed Releases
- Rapid7: ETR -- CVE-2026-109618 and CVE-2026-109619 Critical Unauthenticated RCE in PHP
- SecurityWeek: PHP2Shell Patches Land as First Exploitation Attempts Hit Sensors
- Beazley Security Labs: PHP2Shell Advisory BSL-A1233
Free resources
Critical CVE Reference Card 2025–2026
25 actively exploited vulnerabilities with CVSS scores, exploit status, and patch availability. Print it, pin it, share it with your SOC team.
Ransomware Incident Response Playbook
Step-by-step 24-hour IR checklist covering detection, containment, eradication, and recovery. Built for SOC teams, IR leads, and CISOs.
Daily briefings + Google Top Stories in one step.
Enter your email and we'll subscribe you to the daily briefing and add Decryption Digest to your Google Search feed at the same time.

Founder & Cybersecurity Evangelist, Decryption Digest
Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals every morning.
