PHP2Shell: critical PHP flaws let an unauthenticated request run code, and attacks began before the patch
The PHP project fixed two critical bugs, CVE-2026-109618 and CVE-2026-109619, that can let an unauthenticated request run code on servers using PHP, in the worst case through Apache mod_php before any application code executes. Amazon's honeypots logged an exploit attempt on October 17, four days before disclosure, another researcher recorded 35 working shells on October 24, and CISA added both flaws to its exploited-vulnerabilities list on October 26.
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on October 21, fix two vulnerabilities that the PHP project rates critical. CVE-2026-109618 is an out-of-memory bug: if a request hits the memory limit at the wrong moment, PHP can leave partly initialized internal data behind and later treat it as valid. CVE-2026-109619 leaves request-owned state pointing at freed memory, which a later request handled by the same worker can then use. According to the PHP Foundation, full remote code execution was demonstrated on Apache with mod_php using default settings, and confirmed on PHP-FPM through application-level code paths.
OpenAI says Calif found one of the flaws with its GPT-5.6 Sol model under OpenAI's Patch the Planet initiative, and Wiz independently found and reported both. OpenAI led a coalition of maintainers, researchers and security providers for two months to prepare fixes and protections ahead of disclosure, and calls it one of the most impactful security issues in recent memory.
Exploitation started early. Amazon Threat Intelligence found an exploit attempt dating to October 17 in its MadPot honeypot data, from an IP address on a commercial anonymization network and four days before the embargo lifted at 14:00 UTC on October 21; it says it is unclear how the actor got the information. Amazon also saw working proofs of concept from about 02:00 UTC on October 21 and more attempts from multiple actors within hours. A researcher publishing as 0x4D31 later recorded 35 complete exploit chains on October 24 that ended in a shell started by Apache on three disposable PHP honeypots, from two source addresses, using traffic that matches the public proof-of-concept family. CISA added both flaws to its Known Exploited Vulnerabilities catalog on October 26 with a federal due date of October 29.
The only complete fix is to update; PHP also provided minimal source backports for 7.4, 8.0 and 8.1, which no longer get official updates. Settings such as a higher memory limit, a low post_max_size and disabling session.upload_progress reduce exposure but do not make an installation safe. The UK's NCSC told organizations to identify every PHP installation, patch internet-facing systems first, and take a system offline if it cannot be updated or mitigated quickly. Amazon advises investigating from October 17, not from the disclosure date.
Sources
- PHP.net news archive 2026: Security advisory, critical remote code execution vulnerabilities php.net
- The PHP Foundation: Today's PHP Security Release, and How We're Strengthening PHP Security thephp.foundation
- AWS Security Blog: Amazon Threat Intelligence identifies PHP2Shell exploitation prior to public disclosure in MadPot aws.amazon.com
- 0x4D31 honeypot data: PHP2Shell exploitation observed, packet-to-process RCE evidence github.com
- OpenAI: Patch the Planet, global response coordination as agents uncover critical vulnerabilities openai.com
- UK NCSC: Critical security issue affecting PHP ncsc.gov.uk
- CISA Known Exploited Vulnerabilities catalog data (cisagov/kev-data) github.com