PHP2Shell, AI-Found Vulnerabilities, and the End of “Too Hard to Exploit”
A twenty-year-old weakness in the engine behind most of the web was found, proven, and patched in one summer — by a researcher working with a frontier model. What the PHP2Shell disclosure tells SaaS founders about where the next decade of security risk actually lives.
On October 21, 2026, the PHP project shipped emergency releases for two critical vulnerabilities — CVE-2026-109618 and CVE-2026-109619, known together as PHP2Shell — that allow an unauthenticated attacker to run code on a web server before the application’s own code even starts. PHP powers roughly 70% of the websites whose server-side language is known. The flaws sit in the engine itself, so a WordPress blog, an e-commerce store, a Laravel API and a bare “Hello World” page are all exposed in the same way.
The researcher who found the first of these bugs did it in days, not years — with a commercially available AI model and a good memory for PHP’s history. The underlying weakness had been flagged in 2004, re-reported in 2020, and rediscovered in a 2024 audit, each time filed under too hard to exploit. That category no longer exists. Nothing hidden in a codebase will stay hidden, and the same light that shows defenders the flaw shows attackers the patch.
The story reached the general public on the morning of October 21, when The Wall Street Journal ran an exclusive by Robert McMillan under the headline “AI Just Found A Bug That Puts Up to 70% of the World’s Websites at Risk.” According to the Journal’s reporting, the vulnerabilities were discovered by Ryan Austin, a researcher at the security firm Calif, working with OpenAI’s GPT-5.6 Sol during an audit of PHP’s source code in August; Calif’s chief executive, Thai Duong, called Volker Dusch of the PHP Foundation on August 11 to report a serious issue; and the fix was originally scheduled for October 22 before a leak forced it forward by a day.
The primary sources — published by the PHP project, the PHP Foundation, Calif, Wiz and OpenAI within minutes of the Journal’s story — confirm that account and add the detail that matters.
| When | What happened |
|---|---|
| 2004 | Stefan Esser discovers the first PHP memory-limit remote vulnerability and considers it serious enough to withhold the exploit. |
| 2020 | PHP bug #78876 reports that certain requests can exhaust memory and leave temporary files behind. It is treated as a cleanup problem. |
| 2024 | PHP’s first external security audit in years (Quarkslab via OSTIF, funded by Germany’s Sovereign Tech Agency). A core developer sees the first signs of the out-of-memory problem; an exploit is theorized, no concrete path is found, and the fix stalls. |
| Jul 30, 2026 | Calif begins auditing PHP under OpenAI’s Patch the Planet initiative. Esser, now at Calif, introduces the team to Dusch. |
| Aug 11, 2026 | Calif reports an unconditional remote code execution to PHP. OpenAI’s own team independently reports the same root cause the same day. |
| Aug 19–24, 2026 | Wiz Research independently finds the first vulnerability using Wiz Atlas, Gemini 4 Argon and GPT-5.6 Sol, and reports on August 24. |
| Oct 20, 2026 | Two days before the planned release, the CVE identifiers leak on Hacker News. PHP publishes an advance notice that evening and moves the release to October 21. |
| Oct 21, 2026 | PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 ship at 14:00 UTC. Cloudflare had switched on default WAF protection for all customers about nine hours earlier and reported attack traffic before the release. |
On sourcing. The Journal’s piece was the first to tell the human story, and it is where most readers heard the name. It was not the first public signal: the CVE numbers had been circulating for nearly a day, and PHP’s own notice went out the evening before. This thesis relies on the primary advisories and the write-ups from the PHP Foundation, Calif, Wiz, OpenAI and Cloudflare; press figures those sources do not confirm are attributed as such.
PHP’s interpreter is written in C, and both vulnerabilities live in the part of the engine that nearly every request touches: memory management and error handling. In php.net’s words, one bug lets an out-of-memory error interrupt PHP “while internal request data is only partially initialized,” and the other lets request-owned state “survive after its backing memory has been freed” so that a later request can use it. Both are rated CVSS v4.0 9.2; both can be reached by an unauthenticated request; both are fixed in the four releases above.
Three facts from the advisories matter more than the mechanics:
If any part of your estate serves PHP over HTTP — your product, your marketing site, the phpMyAdmin someone installed in 2019, the WordPress blog on a subdomain — assume it is reachable and assume the attacker needs no account. The question is not whether you run PHP. It is where.
The most uncomfortable sentence in the whole disclosure comes from the PHP Foundation’s own post-mortem, published the same afternoon as the patch. Explaining why a problem spotted in 2024 was still open in 2026, the Foundation describes a security team weighing several competing fixes — each carrying compatibility breaks, denial-of-service risk, or changes to a large ecosystem of third-party extensions — and, without a known path to remote code execution, a decision process that “stalled and restarted repeatedly over months.” Its verdict on itself: “the delay was a structural failure.”
This is not a story about negligence. It is a story about a triage rule that was correct for twenty years and is now wrong. Every mature engineering organization runs on the same rule: severity equals impact times likelihood, and the likelihood of a memory-corruption bug nobody can demonstrate is low. Esser could not prove it in 2004. The 2020 reporter did not try. The 2024 audit theorized it and moved on to findings with clear impact. The bug was never secret. It was ranked — and it sat exactly where every unproven memory bug in every C codebase sits today: in the archive, below the line.
What changed in the summer of 2026 was not the code. It was the price of proof.
Calif’s account is deliberately unglamorous. “No special harness, or access to models that weren’t generally available to everyone were used in the initial bug discovery,” the firm writes, adding that the result came from knowing the target’s history and asking the model the right questions. Wiz, which found the same class independently three weeks later, draws the economic conclusion: “a single researcher completed in a week what previously would have taken a world-class team months of work.”
That is a γ-sized change, to borrow from an earlier thesis on this site — not a 20% improvement in a security team’s throughput, but an order-of-magnitude drop in the cost of turning a theoretical flaw into a demonstrated one. And it did not arrive overnight. PHP2Shell is the largest entry so far in a sequence that has been building for two years:
| Date | Milestone |
|---|---|
| Nov 2024 | Google’s Big Sleep finds a previously unknown, exploitable memory-safety bug in SQLite — the first public example of an AI agent doing so. |
| May 2025 | A researcher uses OpenAI’s o3 to find a zero-day in the Linux kernel’s SMB implementation (CVE-2025-37899). |
| Jun 2025 | XBOW, an autonomous system, reaches #1 on HackerOne’s US leaderboard. |
| Aug 2025 | DARPA’s AI Cyber Challenge final: AI systems find 54 of 63 planted bugs and 18 real ones in open-source code. |
| Jan 2026 | curl ends its bug bounty; the share of confirmed reports had fallen from over 15% to under 5% as AI-generated submissions flooded in. |
| Apr 2026 | Anthropic’s Mythos Preview surfaces a 27-year-old OpenBSD bug and a 16-year-old FFmpeg bug; Project Glasswing launches. |
| Oct 2026 | PHP2Shell: a 22-year-old class of flaw in the runtime behind most of the web, found, proven, and patched in one season. |
The pattern across the table is the same as the pattern inside PHP: old code, known weak spots, exploitability never demonstrated — until a model made demonstration cheap. Microsoft and the Chromium team have each reported for years that roughly 70% of their serious security bugs are memory-safety issues. Every one of those codebases has an archive of “unproven” reports. OpenAI’s disclosure post says it plainly: these bugs “are among several significant vulnerabilities we’ve already found,” and the company expects “similar findings to increase sharply in the coming months.”
“No one lights a lamp and hides it in a clay jar or puts it under a bed. Instead, they put it on a stand, so that those who come in can see the light. For there is nothing hidden that will not be disclosed, and nothing concealed that will not be known or brought out into the open.”
For twenty years the software industry has operated as if a bug nobody could prove was, for practical purposes, a bug that did not exist. The lamp is now on the stand. Frontier models read every old bug report, every audit note, every “theorized but unproven” finding — and they do not forget. What was concealed in the archive is being brought into the open, codebase by codebase. The only question left is who carries the lamp into your server room first.
The same capability that found PHP2Shell is burying the people who have to fix things. The PHP security team reports publishing 15 CVEs since July 1 while working through more than 100 reports that were invalid, duplicate or unreproducible. curl’s maintainer shut down a bounty program that had paid over $100,000 because signal had fallen below 5%. The PHP Foundation’s post ends not with a victory lap but with a funding appeal: tools can find bugs, but deciding the right fix for a design decision made in 2004 “takes experienced engineers who know the entire PHP codebase, and today there are too few of them.”
That asymmetry — discovery becoming nearly free while remediation stays expensive and human — is the defining fact of software security for the rest of this decade.
Every patch is also a map. The moment a fix ships, attackers compare the new code with the old, see what changed, and work backward to the weakness. This has always been true; what AI changes is the speed. An academic study in 2024 found that GPT-4, given a CVE description, could exploit 87% of a set of real one-day vulnerabilities. Anthropic reported this spring that its Mythos Preview succeeded in more than half of its attempts to weaponize recently patched flaws. Google’s threat-intelligence group counted exploited vulnerabilities rising from about 10.5 per month in 2025 to 18 per month in the first eight months of 2026, and attributes much of the growth to faster weaponization of already-patched bugs.
The long-run numbers tell the same story:
The PHP Foundation’s security engineer compared PHP2Shell to Heartbleed, the 2014 OpenSSL flaw, and the comparison is instructive in both directions. Heartbleed affected about 17% of SSL web servers, roughly half a million trusted certificates. A month after the patch, scans still found more than 318,000 vulnerable servers; two and a half months later, about 309,000. The world patched what it could reach quickly, and then stopped.
PHP2Shell’s surface is roughly four times larger. And by our arithmetic on W3Techs’ version data, about half of all PHP sites run a branch the project no longer updates — which means the fix, for them, depends on a distribution backport, a hosting provider, or a migration nobody has scheduled. The long tail of Heartbleed was measured in years. There is no reason to expect this one to be shorter.
What is shorter is the window in front of the patch. OpenAI’s disclosure post introduces the phrase that will likely define this era of security: “To our knowledge, frontier AI found these vulnerabilities before attackers did, opening a Defender’s Window.” That window was planned at two days of advance notice. The leak shrank it to hours, and Cloudflare reported attack traffic against its customers before the official release.
“We believe PHP2Shell could mark a similar turning point for the AI era.”
— WIZ RESEARCH, OCTOBER 21, 2026, PLACING PHP2SHELL ALONGSIDE HEARTBLEED (2014) AND LOG4SHELL (2021)The industry median of 43 days to remediate a critical vulnerability was already too slow. For a runtime-level flaw on the public internet in 2026, the useful unit is hours. If your organization cannot say, today, how many PHP processes it operates and which ones are patched, that is the finding — not the CVE.
Public coverage of PHP2Shell is about web servers, and the patch is about web servers. But nobody breaks into a web server to own a web server. In every real intrusion, the runtime is the door; the asset behind it is the data.
By design, a PHP worker holds the credentials to the application’s database — in a configuration file, an environment variable, a connection string. Compromise the runtime and you inherit the application’s database identity, with every permission that identity was granted. Wiz notes that memory exposed by these bugs “may contain passwords, authentication tokens, API keys and certificates” belonging to other requests or the server itself. The attacker who gets in through PHP walks out through the database.
That is why the actual damage of a vulnerability like this is decided long before the vulnerability is found. It is decided by schema and privilege choices made at design time, usually by a small team under deadline pressure, and never revisited:
| Design-time decision | On exploit day |
|---|---|
| One database user for the whole application, with full rights | The attacker has full rights |
| Customer PII and PHI stored in plaintext columns | Exfiltration is a single query |
| Audit log stored in the same database, writable by the app user | The attacker edits the evidence |
| Old customer exports, orphan tables, abandoned staging copies left in place | Data you forgot you had is the data that leaks |
| Every tenant’s rows in shared tables with no row-level isolation | One tenant’s breach is every tenant’s breach |
| Secrets rotated “when we get to it” | Credentials taken today work next quarter |
None of these are PHP problems. All of them are data-architecture problems, and all of them are visible in the schema before any attacker arrives. This is the layer where Thor ThunderScan does its work: the Security & Compliance scan inventories PII and PHI columns, encryption gaps, over-privileged roles, missing audit trails and orphaned data across a production schema, and turns them into remediation scripts. A runtime patch closes one door. A least-privilege, encrypted, well-partitioned schema is what makes the room behind it worth less to whoever comes through the next one.
Detection, briefly. Wiz advises that, until systems are patched, defenders watch for unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses, unexpectedly large session cookies, and unexplained PHP worker churn. These signals live in web and application logs, not in the database — one more reason the two teams should be reading the same dashboard this month.
There are three elephants in this story.
The first is PHP’s own mascot, the elePHPant, and it stands for the software we all run and never think about — the runtime, the library, the dependency that was there before the company was founded and will be there after the current team leaves. Most of the web’s risk is not in the code you wrote. It is in the code you inherited.
The second is the elephant in the room: the industry’s quiet agreement not to talk about memory-unsafe foundations as long as nobody could prove they were exploitable. For twenty years that agreement held, because proof was expensive. The economics of proof have changed, and with them the terms of the agreement.
The third is the oldest proverb about elephants: they never forget. Neither do models. Every bug report, every audit note, every “theorized but unproven” finding in every public codebase is now in the training data and in the context window. What the industry filed, the models remember.
The lamp is lit and it is on the stand. It illuminates the flaw for whoever looks first — the researcher on a Patch the Planet audit, or the adversary reading tonight’s patch. The defender’s window exists, but it is measured in hours, and it opens only for organizations that already know what they run and already decided how much a compromised web tier is allowed to reach.
The companies that spend this month building that inventory, cutting that blast radius, and reopening that archive will be ready for the next disclosure. The companies that treat PHP2Shell as one more patch Tuesday will be the case study in the next one.
Nothing hidden will stay hidden. Build as if that is true — because, as of this October, it is.
Isaac Shi writes about AI, software, and entrepreneurship at isaacshi.com. These essays provide the strategic and philosophical context behind this thesis.