The PHP security team shipped emergency patches for two critical remote code execution flaws tracked collectively as PHP2Shell. These vulnerabilities sit in the PHP runtime itself, which means every website running a vulnerable version is at risk regardless of how secure its own application code is. Furthermore, attackers are already probing the flaws in the wild.
What Happened: Attackers Chain PHP2Shell Flaws for Unauthenticated RCE
On October 21, 2026, PHP released fixes for two critical vulnerabilities in the language engine. When exploited together, they allow an unauthenticated attacker to run arbitrary code on a web server with the privileges of the PHP worker process.
The flaws were discovered by researchers at Wiz, Calif, and OpenAI. Moreover, the PHP security team confirmed that early exploit attempts were already visible before the patch shipped.
Technical Details of the PHP2Shell Vulnerabilities
Both flaws stem from the same root cause: PHP can leave its memory in a corrupted state when a request ends abnormally. Consequently, an attacker can manipulate that corrupted state into remote code execution.
- CVE-2026-109618 — An out-of-memory corruption chain that leads to remote code execution as the web worker account.
- CVE-2026-109619 — A stale global state vulnerability that enables unauthenticated heap use-after-free, memory disclosure, and remote code execution.
The risk is highest on servers running Apache mod_php. In that configuration, a single unauthenticated HTTP request can trigger the attack before any application code runs. However, PHP-FPM, php-cgi, FrankenPHP, and LiteSpeed installations are also affected.
Because the bugs live in the PHP engine rather than in any CMS or framework, even a simple “Hello World” page on a vulnerable version can be compromised.
Business and Operational Impact
PHP powers an estimated 75% to 80% of all websites worldwide, including WordPress, Joomla, and Drupal deployments. Therefore, the attack surface is enormous.
- Over 5.1 million PHP hosts are exposed online, with roughly 3.8 million having at least one port open.
- Both CVEs are rated 9.2 on the CVSS v4.0 scale.
- PHP 8.1 and earlier are end-of-life and no longer receive official patches.
- Some organizations took services offline as a precaution, including BambooHR in the US, Canada, and Ireland, and multiple Dutch government systems.
Additionally, Cloudflare reported observing early exploitation attempts against its customers. The firm deployed emergency WAF rules as a stopgap but stressed that patching is the only real fix.
Mitigation and Recommendations
Immediate Actions for Defenders
- Update PHP immediately. Install PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35, then restart Apache, PHP-FPM, and any long-running PHP workers.
- Do not rely on partial mitigations. Configuration changes such as disabling session upload progress only block confirmed attack paths. They do not eliminate the risk.
- Check distribution backports. Linux vendors received patches in advance. Verify the package changelog for the CVE rather than relying on the version string alone.
- End-of-life branches. If you run PHP 7.x or 8.0/8.1, migrate to a supported release. The PHP team published minimal source backports for 7.4, 8.0, and 8.1 to help builders, but these are not production patches.
- Review memory settings after patching. The fix introduces a new hard memory limit. Reaching it ends the process and prevents shutdown handlers from running, so confirm your application’s memory_limit and post_max_size are adequate.
Detection Guidance
If you cannot patch right away, watch for these indicators:
- Unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses.
- Oddly large PHPSESSID response cookies.
- Unexplained restarts of PHP workers.
Bottom line: PHP2Shell is a runtime-level threat that bypasses application security entirely. Patch now. Partial mitigations are not a substitute for updating the engine.
Incident Summary
| CVE ID / Incident: | CVE-2026-109618 and CVE-2026-109619 (PHP2Shell) |
| Affected Systems: | All PHP installations serving web requests, especially Apache mod_php |
| Severity: | CVSS 9.2 (Critical) |
| Disclosure Date: | October 21, 2026 (14:00 UTC) |
| Patch Status: | Emergency patches available (PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35) |
| Exploitation: | Early attempts observed; no confirmed mass breaches yet |
| End-of-Life Branches: | PHP 7.4, 8.0, 8.1 (source backports only) |
References
- PHP Security Team, “PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 Released — Critical Security Fixes,” PHP.net, October 21, 2026, https://www.php.net/archive/2026.php#2026-10-21-5.
- Wiz Research, “PHP2Shell: Critical PHP RCE,” Wiz.io Blog, October 2026, https://www.wiz.io/blog/php2shell-php-rce.
- Calif, “PHP 5.4.0 RCE Analysis,” Calif.io, October 2026, http://calif.io/php2shell/#php-5-4-0-rce.
- OpenAI, “Coordinated Disclosure of Critical Vulnerabilities in PHP,” OpenAI Blog, October 2026, https://openai.com/index/coordinated-disclosure-of-critical-vulnerabilities/.
- BleepingComputer, “PHP ships emergency patches for critical PHP2Shell flaws,” October 21, 2026, https://www.bleepingcomputer.com/news/security/php-ships-emergency-patches-for-critical-php2shell-flaws/.
- The Hacker News, “PHP Issues Emergency Patches for Two Critical PHP2Shell RCE Flaws as Exploit Attempts Emerge,” October 21, 2026, https://thehackernews.com/2026/10/php-issues-emergency-patches-for-two.html.
- Cloudflare, “PHP Vulnerabilities — WAF Protection,” Cloudflare Blog, October 2026, https://blog.cloudflare.com/php-vulnerabilities-waf-protection.
- UK National Cyber Security Centre, “Critical Security Issue Affecting PHP,” NCSC.gov.uk, October 2026, https://www.ncsc.gov.uk/news/critical-security-issue-affecting-php.