Tech · Explainer

PHP2Shell: the AI-found flaw that put most of the web on emergency patch duty

On October 21, 2026, PHP shipped emergency patches for two critical flaws — CVE-2026-109618 and CVE-2026-109619, dubbed PHP2Shell — that let an attacker run code on a web server with no login.

TrendBrief Tech Desk · October 22, 2026 · Updated November 9, 2026 · 9 min read

PHP code on a screen. Photo: lmonk72 / Wikimedia Commons (CC0).
PHP code — the language behind most of the world's websites. Photo: lmonk72 / Wikimedia Commons (CC0).

Key facts

2 flawsDisclosed October 21 and chained together for remote code execution on web servers
45 minutesFor exploit attempts to reach tens of thousands after disclosure, per Cloudflare
4 patch releasesPHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, issued as emergency fixes on October 21
October 17When Amazon's honeypots logged an exploit attempt, four days before public disclosure

Update — Friday, October 23, 2026: PHP warns of a third flaw, and exploit attempts surge

PHP is warning about another way to run code on a web server. According to The Hacker News, PHP published a short informational advisory on October 23 for a new issue, CVE-2026-115560, separate from the two PHP2Shell flaws and not fixed by the October 21 emergency releases (8.5.12, 8.4.27, 8.3.36 and 8.2.35). PHP is not issuing an emergency fix for it; instead it recommends setting session.upload_progress.enabled=0 until a fix arrives in the next routine release — the same setting it already listed as a mitigation for CVE-2026-109619 on October 21.

The new risk is narrow. According to The Hacker News, the problem can occur only when an application sets session.serialize_handler to php_binary or php_serialize, then changes it to php at runtime with ini_set() before calling session_start(), with session upload progress still turned on. PHP says that setup is unlikely in practice, has not stated which versions are affected or a severity score, and no exploitation of CVE-2026-115560 has been reported.

The attacks on the original two flaws, meanwhile, have surged. According to The Hacker News, Amazon said its honeypots logged an exploit attempt on October 17 — four days before disclosure — and Cloudflare said attempts rose from tens of thousands within 45 minutes of the October 21 disclosure to millions by early October 22. Attackers have tried to install a Mirai botnet variant, according to Sophos and Arctic Wolf as reported by The Hacker News, but those attempts have so far failed: scanning and probing are widespread, with no confirmed code execution reported so far.

On October 21, 2026, the PHP project shipped emergency security updates for two critical vulnerabilities — tracked as CVE-2026-109618 and CVE-2026-109619 and dubbed "PHP2Shell" — that let an attacker run code on a web server with a single crafted request and no login. According to The Hacker News, both flaws are rated 9.2 out of 10 on the CVSS v4.0 severity scale, and they affect nearly every PHP version going back to PHP 5.4, released in 2012.

First: what PHP is, and why this is huge

PHP is the server-side programming language behind a huge share of the web — WordPress, Drupal, Magento, Joomla, Laravel, Symfony and millions of custom sites all run on it. The Geneva-based digital-policy observatory dig.watch reports it powers around 70% of websites whose server-side language is known. That is why a flaw in PHP itself, rather than in any one app, is an internet-scale event.

The PHP logo by Colin Viebrock (CC BY-SA 4.0).
PHP logo by Colin Viebrock, CC BY-SA 4.0, via Wikimedia Commons.

What the two flaws actually do

Both bugs sit in PHP's memory handling, in parts of the language that nearly every web request touches, as the PHP security advisory (reported by WebProNews) describes:

Crucially, the flaws are in the PHP runtime, not in any application — a site is exposed even when its own code is perfectly secure. The Hacker News notes the risk is highest on servers using Apache's mod_php, where a working exploit triggers the attack before any application code runs.

What got patched — and what didn't

The fixes landed on October 21 at around 2 PM UTC as PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, per The Hacker News — a day ahead of the planned disclosure, because basic details leaked on social media on October 20. dig.watch reports that researchers at the security firm Calif published a video showing how the flaws could be exploited, which dig.watch described as mistakenly published and which then spread across hacking forums.

PHP 8.1 and earlier get no official fix — they're past end of life — though dig.watch notes some Linux distributions have issued their own patches. Security trackers estimate roughly half of PHP sites still run 8.1 or older, so the "zombie PHP" tail will stay exposed.

The twist: an AI found it

PHP Foundation researchers had identified a theoretical flaw in 2024 but couldn't work out how it might be exploited, dig.watch reports. The breakthrough came after the foundation joined OpenAI's "Patch the Planet" initiative in July 2026: researchers at the security firm Calif reported the first flaw on August 11 using OpenAI's GPT-5.6 "Sol" model, and Wiz, the Alphabet-owned security firm, reported the second on August 24 using models including Google's Gemini 4 "Argon". Wiz called it the most severe vulnerability ever found by AI.

The fallout: governments went dark

Because the details leaked before the patch, attackers had a head start: Cloudflare said it observed attack traffic targeting its customers and put WAF protections live about nine hours ahead of public disclosure. Governments took precautionary action — Reuters reports South Korea raised its private-sector cybersecurity alert level and activated emergency response measures on October 22, with the presidential National Security Office convening an emergency meeting. Per dig.watch, France's prefecture websites, Germany's digital ministry, the Dutch parliament, Finland's central government, and in the UK the Office for Budget Responsibility and NHS Scotland took sites offline while patching. The US National Security Agency issued a rare public warning advising that websites be taken offline if they cannot be updated immediately, and the UK's National Cyber Security Centre gave similar advice.

What to do

If you run a website: update PHP itself to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (whichever line you're on) — the PHP project says only the runtime update fully protects a server. Updating WordPress or its plugins does not fix this; the bug sits below the CMS, so check the PHP version your host actually runs and ask them, in writing, whether the PHP2Shell fix is installed, WebProNews' reading of the advisory urges. If you can't patch immediately, follow the NSA's advice and take the site offline rather than leaving it exposed.

If you just browse the web: there's nothing to install — this one belongs to whoever runs each site's server. You can check php.net for the official release notes as the situation develops.

Timeline

DateWhat happened
October 17Amazon's honeypots record an exploit attempt against the flaws, before anyone has announced them.
October 21The two PHP2Shell flaws are disclosed and PHP ships emergency patched releases the same day.
October 22Exploit attempts climb into the millions, per Cloudflare, including attempts to install a Mirai botnet variant.
October 23PHP flags a third, narrower issue (CVE-2026-115560) with a settings workaround instead of an emergency patch.

What happens next

Three watches follow from here. First, the patch wave: the emergency releases are out, and the exposure now belongs to servers whose owners have not applied them, which is exactly the population automated scanning hunts. Second, the third flaw, CVE-2026-115560, gets its real fix in PHP's next routine release, so sites using the session workaround should plan that upgrade. Third, the disclosure that an AI system found and chained these flaws will repeat; the defensive lesson is that the gap between disclosure and mass exploitation is now measured in minutes, which argues for automatic updates wherever a site can tolerate them.

Frequently asked questions

What is PHP, in plain terms?

PHP is the programming language that runs a large share of the world's websites, including most WordPress sites. A flaw in PHP itself therefore reaches far beyond any single app, which is why this disclosure put so much of the web on patch duty.

What do the two flaws actually do?

Separately, each is a weakness in how PHP handles certain requests. Chained together, as a researcher demonstrated, they let an attacker run their own code on a vulnerable web server, the most serious outcome a web flaw can have.

Is my website at risk?

If your site runs PHP and has not been updated to one of the October 21 patched releases (8.5.12, 8.4.27, 8.3.36 or 8.2.35), treat it as exposed. PHP 8.1 and older do not get a patch for the second flaw at all, so those sites need a branch upgrade, not just a patch.

What should I do right now?

Update PHP to a patched release, or have your host do it, and ask whether the session.upload_progress mitigation is in place until you can. Then check the article's 'What to do' section for the full sequence, in order.

Get this in your inbox: Get tomorrow morning's stories, and updates to this one: the free TrendBrief email lands each morning with the day's top stories, explained, and it tracks patch deadlines and exploit waves on stories like this one. Joining takes seconds, and unsubscribing is one click. The signup form is just below.

Sources: dig.watch (emergency-patch timeline, AI discovery via OpenAI's Patch the Planet and Wiz, government responses, the leaked demo video); The Hacker News (CVSS 9.2 ratings, fixed versions, PHP 5.4 exposure, mod_php risk); WebProNews (advisory details, Cloudflare's early WAF rules, patching guidance); Reuters (South Korea's emergency response, October 22); Tenable's FAQ (Security Boulevard) (CVE details, patch versions, end-of-life guidance). Flaw mechanics and severity as reported at publication; the exploit situation is still developing. Update, October 23, 2026: The Hacker News (PHP's October 23 advisory for CVE-2026-115560, the session-upload-progress mitigation, Amazon and Cloudflare exploit-attempt figures, and the Mirai attempts reported by Sophos and Arctic Wolf).

Get TrendBrief in your inbox

The day's top stories, explained — free, every morning.