Critical PHP php2shell flaws force urgent patching and WAF rollouts

Última actualización: 10/22/2026
  • Two core PHP CVEs enable unauthenticated code execution and memory exposure across releases going back to 5.4.
  • WordPress, Drupal, Joomla and custom apps are in scope because the flaws sit in the runtime, not in application code.
  • Patches arrived on 21 October 2026, while Cloudflare, Google Cloud Armor and national agencies urged layered defenses and fast updates.
  • Exposure estimates vary widely, and defenders should inventory PHP deployments, monitor suspicious traffic and keep WAF rules active.

PHP security update and web server protection

A pair of memory-safety flaws in PHP core has pushed the scripting language into an urgent patching cycle, with fixes released on 21 October 2026 and multiple infrastructure providers activating emergency defenses. The issues are tracked as CVE-2026-109618 and CVE-2026-109619 and are widely referred to as php2shell; researchers say they can lead to unauthenticated remote code execution and exposure of sensitive process memory, with grouped advisories reaching a CVSS score of 9.2.

Because PHP supports a large share of the public web, the disclosure quickly moved beyond a routine vendor update. The runtime sits under WordPress, Drupal, Joomla, MediaWiki and Magento deployments, among many custom applications, and the vulnerable paths live in PHP itself rather than in a theme, plugin or CMS module. Researchers compared the turning-point quality of the findings to earlier shared-infrastructure episodes such as Heartbleed and Log4Shell.

lenguajes de programación para ciberseguridad
Related article:
Lenguajes de programación para ciberseguridad: guía completa

What the PHP2Shell flaws allow

CVE-2026-109618 covers out-of-memory handling that can interrupt PHP while internal request data is only partly initialized, so cleanup may later treat invalid data as valid. CVE-2026-109619 concerns request-owned internal state that can survive after its backing memory has been freed, allowing a later request on the same worker to consume stale state before normal initialization resets it.

The defects appear when PHP mishandles fatal out-of-memory conditions while processing an HTTP request. Instead of returning to a clean state, a worker can retain stale pointers or partially initialized structures; a later request handled by the same worker may then consume memory that has already been freed or metadata that no longer matches the expected type.

In practical terms, the consequences range from unauthenticated leakage of worker memory to remote code execution, potentially enabling a PHP reverse shell. Exposed data may include passwords, session tokens, API keys and certificates belonging to other requests or to the server itself, which makes the memory-disclosure path serious even when an attacker cannot immediately run commands. The remote memory disclosure also worked without an application calling session_start, making that path application-agnostic.

servidores para desarrolladores
Related article:
Developer-friendly servers and hosting for modern projects

Wiz Research grouped four exploitable demonstrations under the two CVE identifiers, including a fatal-error backtrace use-after-free, an OPcache type confusion, an upload-progress unserializer use-after-free and an application-agnostic remote memory disclosure. The same underlying patterns may have additional variants, according to the researchers, although the PHP team’s patch is intended to remove the root cause rather than only individual test cases. The team combined the bugs into an exploit script named php2shell and described the findings as among the most severe PHP vulnerabilities, and arguably in software history.

Why core PHP makes the impact broad

The code paths involved sit below the application layer, so a secure CMS configuration does not automatically neutralize the risk. Wiz demonstrated unauthenticated code execution against contemporary container images of WordPress, Drupal and Joomla, while stressing that exploitation does not require one of those platforms; even a minimal PHP application on an affected release can be exposed.

Versions going back to PHP 5.4 fall within the affected range, and at least one of the issues applies to releases from the last decade. That long tail matters because many organizations run unsupported branches or depend on a hosting provider to manage the runtime, and some internet-facing systems may be too old to receive the new fixes.

CVE-2026-41940
Related article:
CVE-2026-41940: Inside the cPanel & WHM Authentication Bypass Shaking Shared Hosting

Estimates of exposed systems vary considerably. One researcher cited more than 1.3 million websites as potentially exploitable, while Palo Alto Networks produced a much larger figure of over 22.6 million exposed instances; Cisco estimated that roughly half of internet-facing instances were too old for the available fixes. These numbers should be read as differing exposure models, not as a single confirmed count, and not every PHP site is necessarily exploitable because configurations and versions differ.

AI-assisted discovery and coordinated disclosure

The research effort involved Google-owned Wiz, Calif, OpenAI and Quarkslab, with frontier AI models used to accelerate analysis and exploit development. Wiz said it used Wiz Atlas, Gemini 4 Argon and GPT-5.6 Sol across the work, and Calif found the flaws with OpenAI’s GPT-5.6 Sol model; the PHP team, Automattic, Akamai, AWS, Cloudflare, Fastly, Google, Imperva, Microsoft, Vercel and others participated in coordination and mitigation planning. OpenAI said it coordinated with CISA and the White House Office of the National Cyber Director.

According to the published timeline, Wiz discovered the first issue on 19 August 2026, confirmed unauthenticated RCE against Drupal on 20 August and against WordPress on 21 August, and reported the findings to PHP’s security team on 24 August. PHP acknowledged the reports on 21 September, patched releases became available on 21 October, and public disclosure followed the same day; one advisory listed the release time as 13:40 UTC and listed affected and fixed versions.

ia para debugging y testing en visual studio
Related article:
AI for Debugging and Testing in Visual Studio and VS Code

The use of AI cut down the specialist effort needed to chain multiple memory bugs and adapt exploits to different PHP builds, configurations and memory layouts. Researchers argued that complexity is no longer as strong a barrier as it once was, because models can iterate through failures and debugging steps quickly; the same capability can help defenders find and verify fixes, but it can also shorten the path from patch to working exploit. OpenAI said the case showed AI could uncover internet-scale security flaws while also helping attackers build offensive tools faster.

WAF and cloud defenses activated

Cloudflare said it deployed WAF protections in early October 2026, roughly nine hours before public disclosure, and made them active by default for free and paid WAF customers from 21 October at 03:02 UTC. The company observed attack traffic and payload mutation attempts before the official release date, and it introduced full transaction detection, a capability that combines request and response signals so malicious origin responses can be blocked before reaching the requester.

Google Cloud Armor advised customers to use managed rules, enable at least the File Upload and RFI categories, and test canary rules in preview mode before enforcing stable rules. It also recommended rules that limit or reject oversized request bodies, since large payloads can be used to trigger out-of-memory conditions; organizations that already run managed rules were told protection would update automatically. Wiz said its threat-intelligence advisory included detection coverage and an optional sensor response policy for terminating processes that show php2shell behavior.

Linux
Related article:
Linux ecosystem balances AI-driven threats, kernel changes and desktop expansion

Other providers and national agencies issued parallel guidance. The UK NCSC, CISA, Canadian and Australian authorities, CERT-EU, ENISA and NCSC-NL all urged operators to inventory PHP-based applications, prioritize internet-facing systems and apply vendor updates; ENISA pointed to its advisory collection, NCSC-NL maintained a GitHub repository for third-party software that may include PHP, and the UK NCSC said it would keep monitoring for impact on UK organizations.

Government warnings and real-world pressure

The response extended to high-level government action. The White House said federal agencies were assessing PHP use and coordinating with critical infrastructure operators, and that the U.S. government learned about the vulnerabilities on 16 October; the NSA urged partners to update quickly because such flaws can provide a direct path to server file systems or databases. Some public bodies chose temporary disconnection, including Finland’s government and the Dutch House of Representatives, while others weighed isolation for exposed applications that could not be patched immediately.

Threat-intelligence teams at watchTowr and Sophos reported discussion and attempted exploitation in cybercriminal communities. Jake Knott of watchTowr said nobody had succeeded at the time of his comment, but he did not expect that situation to last; security researcher Nicholas Weaver said reports of exploits in the wild made unpatched systems especially dangerous and described the episode as one of the first widespread vulnerability crises shaped by AI, noting that AI can turn a patch into a recipe for exploitation.

qué es claude code
Related article:
What Is Claude Code and How This AI Agent Transforms Coding

Regulatory context adds another layer. ENISA noted that, as of 11 September 2026, manufacturers of hardware and software products must report actively exploited vulnerabilities through the Cyber Resilience Act single reporting platform under Regulation (EU) 2024/2847; the CRA’s main cybersecurity requirements are due to apply from 11 December 2027, including security-by-design and timely remediation duties.

Defensive steps and monitoring signals

Patching the PHP runtime is the only complete remediation, and updating application code or a CMS plugin alone does not address the core flaw. Administrators should confirm whether their hosting provider manages PHP, request the fixed release where necessary, and keep WAF protections active as an additional layer while verification work is completed.

Where immediate patching is impossible, agencies recommended isolating exposed applications from public networks, reducing unnecessary uploads and capping upload sizes. These measures can lower exposure but do not replace the vendor update; defenders were also advised to monitor for unusual multipart requests followed by memory-limit errors, repeated HTTP 500 responses, malformed or unexpectedly large PHPSESSID cookies and unexplained PHP worker churn. Because the flaws run below the application layer, ordinary application logs may contain little context.

  • Patch scope: update PHP itself, not only WordPress, Drupal, Joomla or custom code.
  • Exposure review: prioritize internet-facing services and confirm unsupported branches can be replaced.
  • Layered defense: keep WAF and managed-rule protections enabled during and after remediation.
  • Detection: watch memory errors, odd multipart traffic and abnormal worker turnover.

Taken together, the episode shows how a core runtime bug can outgrow a single product: fixes are available, but exposure depends on version, configuration and hosting arrangements, and the public estimates differ enough that organizations should verify their own inventories rather than rely on a headline figure. The practical priority remains the same for most operators: locate affected PHP deployments, apply the vendor patch, keep layered defenses on and treat any pre-patch internet-facing system as high risk.

Related article:
Solved: recursively delete directory
Related posts: