How OpenAI Used AI to Discover Critical PHP Vulnerabilities and Boost Cybersecurity

In late October 2026, security researchers and major technology organizations revealed that artificial intelligence systems had played a central role in identifying two high-severity vulnerabilities deep inside the PHP programming language. PHP underpins an estimated 70 percent of websites worldwide, including large content-management systems and countless custom applications. The flaws, tracked as CVE-2026-109618 and CVE-2026-109619 and collectively referred to as PHP2Shell, allow unauthenticated remote code execution under certain conditions and carry CVSS scores of 9.2. They had existed in the language’s core for more than a decade. The discovery process, the two-month coordinated response that followed, and the subsequent public disclosure illustrate how frontier AI models can surface complex, internet-scale security issues that previously resisted practical human exploitation.
OpenAI’s Patch the Planet initiative, security firm Calif, and Wiz Research each contributed to finding and validating the problems. PHP maintainers then led the engineering of intricate engine-level fixes, while partners prepared mitigations and detection guidance. Patches shipped on 21 October 2026 for supported branches. This sequence offers a concrete case study of AI-assisted vulnerability research operating inside a responsible disclosure framework. By combining large language models with structured security research under the Patch the Planet program, OpenAI and collaborating teams identified critical, long-standing PHP memory-safety flaws before known attacker exploitation, created a defender’s window of roughly two months, and demonstrated both the defensive potential and the dual-use nature of advanced AI in cybersecurity.
AI Models Surface Long-Hidden Memory Corruption Paths in Core PHP
Security firm Calif, participating in OpenAI’s Patch the Planet initiative, used the GPT-5.6 Sol model during an audit that began in late July 2026. Researchers focused on how PHP handles out-of-memory conditions and fatal errors during request processing. Within days, they identified an unconditional remote-code-execution path tied to incomplete initialization of request-owned memory. The model assisted in exploring edge cases around memory allocation failures and cleanup routines that human reviewers had long considered difficult to exploit reliably. Calif reported an initial finding to the PHP security team on 11 August. Subsequent work confirmed practical exploitability against common web stacks. OpenAI’s own team later independently identified a more complete version of the related class of issues in September. These efforts established that the underlying defects reached back many years, with some analyses tracing relevant code patterns to PHP 5.4. The AI systems reduced the time required to move from theoretical concern to working proof-of-concept, a step that had previously remained at the edge of practical human research.
Wiz Research reached parallel conclusions using its Wiz Atlas agent together with Gemini 4 Argon and GPT-5.6 Sol. The team confirmed unauthenticated remote code execution against representative installations of WordPress, Drupal, and Joomla within a short window in mid-August. Both sets of findings pointed to the same fundamental problems in PHP’s request lifecycle: one involving corruption when memory is exhausted mid-setup, and another involving stale global state that persists after memory is freed and can be reused by a subsequent request on the same worker process. The independent discoveries strengthened confidence that the issues were genuine and severe rather than artifacts of a single research approach. PHP maintainers classified both CVEs as critical and assigned CVSS v4.0 scores of 9.2, reflecting the potential for remote code execution without authentication on servers serving web requests.
Two Critical Flaws Enable Unauthenticated Remote Code Execution Across PHP Deployments
CVE-2026-109618 centers on out-of-memory corruption. When a request exhausts the configured memory limit while internal data structures are only partially initialized, PHP aborts processing. Cleanup code can then treat the incomplete state as valid, opening paths to memory corruption that skilled attackers can convert into code execution. Researchers demonstrated that specially crafted multipart requests could trigger the condition within normal configuration limits. The risk is especially pronounced under Apache mod_php because the exploit can execute before application-level code runs.
CVE-2026-109619 involves use-after-free conditions arising from stale request-owned global state. After a fatal error or certain late warnings, pointers or data belonging to one request can remain accessible after the underlying memory is freed. A subsequent request handled by the same worker process may then operate on that stale state before normal initialization occurs. Confirmed paths include interactions with session upload progress features (enabled by default in many configurations) and fatal-error backtrace handling in newer PHP versions. Both vulnerabilities can also support information-disclosure attacks that leak process memory, potentially exposing credentials, tokens, or keys. Fixed releases cover PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35. Older branches received source-level patches where feasible, but end-of-life versions remain exposed without vendor or distribution support.
Patch the Planet Coordinates a Multi-Party Response Over Two Months
OpenAI described leading a coalition of maintainers, researchers, and security providers after the initial reports. The two-month preparation period was required because the necessary changes touched core engine behavior rather than isolated application logic. PHP maintainers took primary responsibility for designing and testing the engine modifications. Partners including Wiz, Cloudflare, and others contributed research validation, mitigation development, and coordination with infrastructure providers. Government cybersecurity agencies received advance notification so they could prepare guidance.
The complexity of the fixes explains the extended timeline. Altering memory-management and request-cleanup paths risked introducing regressions across the wide variety of PHP deployment models (PHP-FPM, mod_php, cgi, and others). Extensive testing was therefore essential. OpenAI also released a Codex skill and associated repository to help operators identify vulnerable PHP versions and determine appropriate updates. This tooling lowered the barrier for site owners to assess exposure once the public disclosure occurred. The overall process followed established responsible-disclosure norms while leveraging AI capabilities for both discovery and support of remediation.
Why These Flaws Remained Practical Barriers for Years Despite Known Risk Classes
Memory-safety issues in language runtimes are not new. Security researchers had previously flagged concerns around PHP’s handling of certain error and allocation paths. However, constructing a reliable, unauthenticated remote-code-execution chain across diverse PHP versions, configurations, and memory layouts proved extremely difficult for human researchers operating under realistic constraints. The required sequence of steps sat at the practical edge of what manual reverse-engineering and fuzzing could achieve in a reasonable time.
Frontier models changed the economics of that search. By rapidly exploring large numbers of edge cases, generating candidate exploit adaptations, and helping validate behavior across version differences, the AI systems turned a longstanding theoretical weakness into a demonstrated, practical vulnerability. Wiz noted that large language models can further assist in adapting an exploit to different PHP versions, configurations, and memory layouts—capabilities that lower the barrier for both defenders and potential attackers. The result is a clearer illustration of the dual-use nature of advanced AI in security research: the same tools that accelerate discovery for responsible parties can also accelerate weaponization once details become public.
Global Impact and Immediate Operational Response After Disclosure
Because PHP powers such a large fraction of the public web, the disclosure triggered urgent action across hosting providers, content-management platforms, and government networks. The U.S. National Security Agency and multiple international agencies issued warnings recommending immediate updates or, where updates were not yet feasible, temporary offline status for high-risk systems. Some European public-sector sites temporarily took services offline as a precaution. Distribution packages and long-term-support vendors began shipping updated binaries rapidly after the official releases.
Cloudflare and other edge providers rolled out virtual patches and detection rules to reduce exposure while organizations completed upgrades. Partial configuration mitigations, such as disabling session.upload_progress or adjusting memory-limit and process-recycling settings were documented, yet PHP and researchers emphasized that only the patched releases constitute complete remediation. The absence of confirmed widespread exploitation in the wild at the moment of disclosure indicated that the defender’s window had largely held, although monitoring for opportunistic scanning and exploitation attempts intensified immediately afterward.
Technical Mechanics of the Out-of-Memory and Stale-State Paths
In the out-of-memory path, PHP’s abrupt termination via longjmp-style control transfer can leave partially constructed request structures reachable by subsequent cleanup logic. An attacker who can force memory exhaustion at the right moment, commonly through carefully designed multipart form data, creates a window in which those structures contain attacker-influenced values. On mod_php, the timing advantage is greatest because the vulnerability can be triggered before the application itself begins executing.
The stale-state path arises when request-owned data is not fully cleared after a fatal condition. Global or worker-local variables retain pointers into freed memory. The next request processed by the same worker can then dereference those pointers. Session upload-progress handling and certain backtrace features were confirmed as reachable entry points. Both classes of bug can be chained or used independently for code execution or for reading sensitive process memory. The engine-level nature of the defects means that application code quality offers limited protection; the runtime itself must be updated.
Independent Validation Strengthens Confidence in the Findings
Calif’s work under Patch the Planet and Wiz’s parallel research produced converging results on both the root causes and the practical impact. Calif’s timeline shows an early August confirmation of an out-of-memory remote-code-execution path, followed by formal reporting. Wiz’s timeline places the first discovery around 19 August, rapid confirmation against popular content-management systems, and reporting on 24 August. The independent confirmation reduced the chance that either team had mischaracterized the severity or the attack surface.
PHP maintainers reviewed the reports, reproduced the issues, and began developing fixes. The subsequent public advisories and the coordinated release schedule reflected the high confidence that the problems were both real and urgent. This multi-party validation model, AI-assisted discovery followed by human expert review and engine-level engineering, offers a template for handling future high-impact findings in widely deployed open-source software.
Practical Steps for Operators to Assess and Remediate Exposure
Operators should first determine the exact PHP version running on each web-facing server. Supported branches should be upgraded to 8.5.12, 8.4.27, 8.3.36, or 8.2.35 as soon as packages are available from the distribution or vendor. End-of-life versions require either migration to a supported release or application of any available source patches combined with compensating controls.
Configuration changes can reduce certain attack paths while upgrades are in progress: disabling session.upload_progress, adjusting process-recycling limits, and carefully managing memory_limit settings. Web-application firewalls and content-delivery networks have published virtual-patch rules that block known exploit patterns. OpenAI’s published Codex skill provides an automated way to inventory versions and map them to the fixed releases. After patching, organizations should rotate any credentials or secrets that may have been resident in process memory and review access logs for anomalous multipart or error-triggering requests.
Broader Effects for AI-Assisted Security Research
The PHP case demonstrates that frontier models can locate and help weaponize complex, multi-step vulnerabilities that previously required exceptional human effort. The same capabilities that allowed researchers to surface PHP2Shell can be used by less scrupulous actors once technical details are public. OpenAI and Wiz both highlighted this dual-use reality. The existence of a multi-month defender’s window in this instance depended on responsible reporting, quick coordination, and the absence of prior public knowledge of working exploits.
Future programs that systematically apply AI to high-value open-source targets will need equally robust processes for coordinated disclosure, advance notification of critical infrastructure operators, and preparation of both patches and interim mitigations. The Patch the Planet model, pairing model access with human researchers, maintainers, and infrastructure partners, provides one working example of how that coordination can be organized.
Industry Coordination and the Role of Infrastructure Providers
Beyond the core language maintainers, the response drew in Cloudflare and other large infrastructure providers who developed and deployed protective rules. Hosting companies accelerated package updates. Content-management communities issued urgent guidance to their users. The breadth of participation reflects the shared dependency on PHP across commercial, governmental, and open-source ecosystems.
Advance engagement with government cybersecurity agencies allowed national-level warnings to be prepared and issued promptly upon disclosure. This multi-layer coordination reduced the window during which unpatched systems remained fully exposed after public details became available. The episode also underscored the value of having pre-existing relationships and communication channels among researchers, maintainers, and operators of critical infrastructure.
Lessons for Maintainers of Foundational Open-Source Projects
PHP’s experience shows that even mature, widely audited codebases can harbor deep, long-lived defects whose practical exploitability only becomes clear with new analytical tools. Maintainers of similarly foundational projects may benefit from structured programs that grant vetted researchers access to advanced models under controlled conditions. Such programs can accelerate discovery while keeping remediation under human control.
The two-month engineering effort required for the PHP engine changes also illustrates that not every critical finding can be fixed with a simple patch. Projects should budget both time and expertise for complex, high-impact security work and maintain clear processes for handling coordinated disclosures that affect large fractions of the internet.
Monitoring and Detection After the Initial Patch Wave
Even after the majority of systems receive updates, residual risk remains on unpatched or end-of-life installations. Security teams should monitor for unusual request patterns involving multipart form data, unexpected fatal errors, or anomalous process behavior. Endpoint and network detection tools that understand PHP worker processes can surface early indicators of attempted exploitation.
Ongoing collaboration between researchers and vendors will be necessary to refine signatures and to address any novel variants that may appear. The public availability of technical details and proof-of-concept material means that opportunistic attackers now have a clearer starting point, elevating the importance of rapid patching and layered defenses.
Scaling Responsible AI Discovery Across Critical Software
The PHP2Shell episode is likely to accelerate investment in AI-assisted auditing of other foundational languages and libraries. Programs modeled on Patch the Planet can expand the defender’s window for additional high-impact targets. Success will depend on maintaining strong norms around responsible disclosure, investing in the engineering capacity of maintainers, and ensuring that infrastructure providers can respond at internet scale.
At the same time, the dual-use character of the underlying models requires continued attention to access controls, monitoring of potential misuse, and transparent reporting of both defensive successes and residual risks. The October 2026 disclosures provide a clear data point that frontier AI has moved from theoretical promise to concrete, internet-scale impact in cybersecurity.
Frequently Asked Questions
1. What exactly are the two PHP vulnerabilities known as PHP2Shell?
They are CVE-2026-109618, an out-of-memory corruption issue that can lead to remote code execution when request data is only partially initialized, and CVE-2026-109619, a use-after-free condition caused by stale global state surviving across requests on the same worker. Both received CVSS v4.0 scores of 9.2 and affect a wide range of PHP installations that serve web traffic.
2. Which PHP versions are affected and which releases contain the fixes?
Supported branches received fixes in 8.5.12, 8.4.27, 8.3.36, and 8.2.35. Older versions, including many still in production, may remain exposed unless distribution or vendor patches are applied. Source-level patches were made available for certain end-of-life branches, but binary updates are limited.
3. How did AI models contribute to finding these flaws?
Researchers at Calif used GPT-5.6 Sol under OpenAI’s Patch the Planet program to explore memory-handling edge cases. Wiz combined its own Atlas agent with Gemini 4 Argon and GPT-5.6 Sol. The models helped identify paths that had resisted practical human exploitation for years and assisted in adapting and validating the findings across versions.
4. Was there evidence of active exploitation before the public disclosure?
At the time of coordinated disclosure, OpenAI and partners stated that frontier AI had found the issues ahead of known attackers and that no confirmed widespread exploitation in the wild had been observed. Monitoring increased immediately after details became public.
5. What should website operators do right now?
Identify the PHP version on every web-facing system, upgrade to a fixed release as soon as packages are available, apply any interim configuration mitigations recommended by PHP or hosting providers, deploy available WAF rules, and rotate credentials that may have resided in process memory. OpenAI published a Codex skill to assist with version inventory.
6. Why did the coordinated response take approximately two months?
The required changes affected core engine behavior around memory management and request cleanup. Thorough testing was necessary to avoid introducing regressions across the many ways PHP is deployed. The extended preparation window allowed patches, mitigations, and detection guidance to be ready before public disclosure.
7. Do application-level defenses or secure coding practices protect against these issues?
Because the defects reside in the PHP runtime itself, application code quality provides limited protection. Updating the PHP binary is the primary remediation. Configuration changes and edge protections can reduce exposure while upgrades are completed.
8. What does this event imply for future use of AI in cybersecurity?
It shows that advanced models can surface complex, high-impact vulnerabilities more rapidly than traditional methods alone. The same capabilities can also accelerate exploit development once details are known. Structured programs that combine model access with responsible disclosure processes and multi-party coordination will be essential to keep the defender’s window open for other foundational software.
