Two PHP engine flaws allow remote code execution; fixed 21 Oct

In short

2 CVEs: CVE-2026-109618 and CVE-2026-109619; 9.2 CVSS v4.0 score of both, per PHP; 5.4 oldest PHP version affected, per Wiz; ~9 hours Cloudflare's WAF head start, per Cloudflare

What are the php2shell flaws?

PHP is a programming language that runs on the web server and builds each page before it is sent. Wiz says it powers 70% of websites, including WordPress, Joomla, Drupal and Wikipedia's MediaWiki; Cloudflare says "almost 70%". The 21 October post from Wiz Research describes bugs in the core engine, not in any one site's code.

All the bugs are memory-safety bugs. In plain words (ours): a program keeps its working data in memory, and a memory-safety bug lets that data be used after it was meant to be thrown away, or lets the program write where it should not. An attacker who controls what lands in that memory can steer the program.

Wiz says the shared cause is how PHP handles fatal errors, especially running out of memory, partway through a request. The request's memory is destroyed, but pointers to it survive in the worker process. A later request handled by the same worker trusts the stale pointer, and the attacker, having placed their own data in the freed space, controls what it finds.

Wiz says the memory read can expose passwords, tokens, API keys and certificates, including data from other people's requests, and works even if the application never starts a session. It also says there are other variants under the same two CVEs, and that the PHP patch removes the whole class in the patched release.

Why does a flaw in PHP hit sites with safe code?

An application such as WordPress is a program that PHP runs. If the engine under it mishandles memory, careful application code cannot help. Wiz says even a simple "Hello World" page on an affected version can be vulnerable. The PHP project says the risk is highest with mod_php (PHP running inside the Apache server), where it has a demonstrated exploit that triggers before any application code runs. It lists PHP-FPM, php-cgi, FrankenPHP and LiteSpeed as also at risk.

How AI was involved

Wiz's account: the bugs had been in the code for more than a decade, but turning them into an exploit meant chaining several flaws and adapting to each server's memory layout, version and settings. Wiz says language models, with testing and debugging tools, can analyse failures and adjust the exploit, so that it adapted working exploits across several applications in hours. It also says one researcher did in a week what would previously have taken a world-class team months. It used Wiz's own tool, Google's Gemini 4 Argon and OpenAI's GPT-5.6 Sol.

OpenAI describes a second route: Calif identified a critical flaw with GPT-5.6 Sol under OpenAI's Patch the Planet initiative, and Wiz independently found and reported both. OpenAI says that, to its knowledge, AI found the bugs before attackers did. These are the companies' own claims; the posts do not give a test that separates the model's contribution from the researchers'.

19 Aug 2026: Wiz Research finds the first PHP vulnerability, per its disclosure timeline. 20-21 Aug 2026: Wiz confirms unauthenticated code execution against Drupal, then WordPress. 24 Aug 2026: Wiz reports the bugs to the PHP security team. 21 Sep 2026: PHP acknowledges the reports and starts a coordinated fix. 21 Oct 2026: Patched PHP releases and public disclosure the same day.

What a coordinated head start looked like

OpenAI says it led a coalition of maintainers, researchers and security providers over about two months, and contacted US government bodies including CISA and the Office of the National Cyber Director. Wiz lists Automattic, Akamai, AWS, Cloudflare, Fastly, Google, Imperva, Microsoft and Vercel as partners preparing guidance and mitigations. The PHP project says Linux distributions and long-term-support vendors received patches in advance.

Cloudflare says its WAF rules were live for all customers, including free plans, from 3:02 am UTC on 21 October, about nine hours before disclosure. A WAF (web application firewall, ours) sits in front of a site and drops requests that look like attacks, so a site can be shielded before its PHP is updated. Cloudflare says this needed a new capability that checks the request and the server's response together, since the request alone did not reliably show an exploit.

There was a catch. Cloudflare says the vulnerability leaked before the official release date and it saw attack traffic aimed at customers, with attackers altering payloads to get past the rules. It still tells customers to patch, since a WAF is only a second layer.

PHP lists mitigations for those who cannot update, such as a low post_max_size and session.upload_progress.enabled=0, but says they reduce exposure and "do not make an installation safe". Only the update is a complete fix.

What operators were told to do

Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. PHP 8.1 and older no longer get project updates; PHP provided minimal source backports for 7.4, 8.0 and 8.1, and says some distributions and long-term-support vendors back-port fixes. The UK's NCSC urged organisations to find every PHP install, internet-facing ones first, and to check for backdoors if they could not patch at once. OpenAI also released a PHP version checker for its Codex tool.

Since then

On 23 October the PHP project published an informational advisory for a related flaw, CVE-2026-115560, in session upload progress. It affects patched releases including 8.5.12, needs an unusual setup (a runtime switch of the session serialize handler), and PHP advised setting session.upload_progress.enabled=0 until the next regular release. Cloudflare says its existing rule covers it, but not for sites that changed the default upload-progress field name. PHP's news page lists security releases on 19 November (8.5.13, 8.4.28, 8.3.37, 8.2.36); we did not check whether they carry the CVE-2026-115560 fix.

Terms in plain English

Sources

Sources

Related stories

More from AI and Security

All stories from AI and Security