Back to blog

23 October 2026 · 3 min read

PHP2Shell: AI Uncovers Two Critical Remote Code Execution Flaws in Core PHP

Discovery of Decade-Old Critical PHP Runtime Vulnerabilities

The global cybersecurity community responded on October 23, 2026, to the coordinated disclosure of two critical flaws in the core PHP programming language interpreter. Collectively designated as PHP2Shell, the vulnerabilities consist of two remote code execution (RCE) bugs tracked as CVE-2026-109618 and CVE-2026-109619, carrying a CVSS v4.0 severity rating of 9.2 (Critical).

The vulnerabilities persisted inside the core PHP engine for more than a decade, affecting all releases from legacy PHP 5.4 through modern PHP 8.5. Because PHP processes server-side logic for approximately 70 percent of public websites globally (including platforms like WordPress, Wikipedia, and commercial backend services), the flaws present systemic operational exposure across public web infrastructure.

Frontier AI Reasoning Models Drive Deep Code Audits

The disclosure of PHP2Shell highlights an important shift toward AI-assisted source code auditing. The flaws eluded traditional static analysis tools and manual security reviews for years, surfacing through frontier AI reasoning engines:

Cybersecurity firm Calif discovered the memory-management flaw using OpenAI's GPT-5.6 Sol model as part of the Patch the Planet vulnerability discovery initiative. Independently, cloud security researchers at Wiz surfaced identical code paths using automated analysis frameworks integrating Google's Gemini 4 Argon and GPT-5.6 Sol.

OpenAI and Wiz reported that advanced AI models identified subtle memory-safety inconsistencies across complex error-handling routines. This detection allowed PHP maintainers to develop official patches before malicious actors discovered and weaponized the attack vectors in public environments.

Technical Mechanisms of CVE-2026-109618 and CVE-2026-109619

Both vulnerabilities operate inside the low-level PHP interpreter before application-level scripts run:

The first flaw, CVE-2026-109618, involves out-of-memory (OOM) handling during request ingestion. When PHP encounters a memory allocation limit while parsing HTTP request data, it invokes longjmp to abort execution. This abrupt context shift halts execution while internal data structures remain partially initialized. Subsequent memory cleanup routines treat this uninitialized memory as valid state, causing heap corruption that attackers can leverage for remote code execution.

The second flaw, CVE-2026-109619, stems from global worker state management during session upload tracking. Under specific error sequences, global pointers fail to reinitialize properly, continuing to point to freed memory allocations (Use-After-Free). Subsequent requests handled by the same long-running worker process can interact with these stale references, allowing an attacker to divert execution control flow.

Remediation Guidelines and Emergency Upgrades

The PHP development team issued emergency maintenance releases across all active release branches. Systems engineers must update their base PHP runtime binaries immediately:

PHP 8.5 requires upgrading to 8.5.12, PHP 8.4 to 8.4.27, PHP 8.3 to 8.3.36, and PHP 8.2 to 8.2.35.

In containerized deployments, patching the host operating system is insufficient. Engineering teams must rebuild and redeploy all application container images containing embedded PHP binaries. For systems operating unsupported end-of-life releases (PHP 5.4 through 8.1), where vendor patches are unavailable, operators should migrate workloads to supported versions or enforce strict request-inspection rules at the Web Application Firewall (WAF) tier.

Select which cookie categories are allowed on xplor3.space. Your choices are saved for 6 months and can be modified anytime via the link in the footer.

Free from third-party advertising cookies and cross-site tracking profiles.