TCH
SecurityCloud Infrastructure · Zero Trust · DevSecOps · IAM
Published on

When AI Finds the Bug Before You Patch It: PHP2Shell, Big Sleep, and the New Math of Patch Triage

Authors

When AI Finds the Bug Before You Patch It: PHP2Shell, Big Sleep, and the New Math of Patch Triage

I'm writing this as a cloud security engineer who triages disclosures for a living, not as one of the researchers who found the bugs below. The point of this article isn't "look how cool AI vulnerability discovery is" — that piece has already been written, several times, by the people who actually built the tools. The point is narrower and more useful: what changed, concretely, in how fast a disclosure turns into exploitation, and what that means for how you should be running patch triage right now.


The Case That Started This: PHP2Shell

On October 21, 2026, the PHP project shipped emergency fixes — versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35 — for two critical remote code execution flaws now known as PHP2Shell: CVE-2026-109618 and CVE-2026-109619, both rated CVSS v4.0 9.2. CVE-2026-109618 is a chain of memory-corruption weaknesses; CVE-2026-109619 involves stale global state that can enable exploitation of freed memory. Google Cloud's advisory puts the affected range at PHP 5.4 through 8.5.11 — meaning the bug had been sitting in the codebase for roughly two decades before anyone found it.

What makes this one worth leading with isn't the severity — plenty of CVSS 9+ bugs ship every month. It's the discovery path. Security researchers at Calif used OpenAI's GPT-5.6 "Sol" model, obtained through OpenAI's "Patch the Planet" initiative, to find an initial version of the bug in August 2026. Independently, Wiz Research reached a more complete version of the same flaw in September, using a combination of Gemini 4 "Argon", their own internal tool "Atlas", and GPT-5.6 Sol for exploit development and patch validation. Two unrelated teams, using different AI models, converged on the same two-decade-old bug within weeks of each other. That's the part that should make you pay attention — not that an AI found a bug, but that two unrelated teams, using different models, converged on the same one within weeks of each other, without coordinating. That kind of unplanned collision is only possible once the discovery process itself has gotten productive enough to be common, not exceptional.

The exploitation timeline is the other reason this matters. Reporting attributes exploitation-attempt telemetry to Amazon's MadPot system as early as October 17 — four days before public disclosure — and separately, mass exploitation attempts observed by Hadrian targeting PHP's session upload-progress handling, mostly after disclosure. The FBI urged immediate patching, and Germany's BSI issued a second-highest-tier warning. Whichever telemetry claim turns out to be most precise, the shape is the same: the gap between "patch available" and "attackers using it at scale" was measured in days, not the weeks or months that used to be normal for a bug this old and this widely deployed.


This Isn't a One-Off

PHP2Shell is the loudest recent example, but it's not isolated. A few other data points from the same stretch of 2026, each with a different shape:

CaseCVEWhat happenedCaveat worth knowing
Big Sleep (Google DeepMind + Project Zero)CVE-2025-6965A memory-corruption flaw in SQLite (CVSS 7.2), patched in version 3.50.2. Google says the bug was "only known to threat actors" and close to being exploited when Big Sleep flagged it.The "stopped before exploitation" framing rests entirely on Google's own account — they haven't published who the threat actors were or exactly how the timing was established.
XBOW (autonomous pentesting agent)CVE-2026-21536Credited in Microsoft's March 2026 Patch Tuesday for a critical RCE in the Microsoft Devices Pricing Program, reportedly found without source code access.XBOW's blog is the primary source for most of the specifics; treat "first fully autonomous find" as the vendor's own framing, not an independently verified claim.
OpenAI Codex Security (formerly Aardvark)~14 CVEs reportedOpenAI's own figures claim roughly 800 critical and 10,500+ high-severity findings across external repos including OpenSSH, GnuTLS, and Chromium during testing.These are the vendor's self-reported numbers from their own testing program — useful as a scale signal, not as an audited count.
Sonatype's landscape estimate~60 CVEsRoughly 60 AI-discovered CVEs are publicly documented so far, with more reported privately to vendors and awaiting patches, per Sonatype's research.A snapshot from one research firm, not an exhaustive registry — the real number of privately disclosed findings is unverifiable from outside.

Google also runs a second in-house effort, CodeMender, alongside Big Sleep, and Anthropic has its own comparable product, Claude Code Security. I'm not going to pretend I have independently verified numbers for either — they're worth knowing the names exist, not worth treating as case studies here.


What AI Did Not Find — the Honest Counterpoint

This is the part I think most coverage of this topic skips, and it's the part that actually matters if you're trying to use this information rather than just be impressed by it.

In the same week PHP2Shell was disclosed, Oracle shipped a security alert for CVE-2026-91403 — a CVSS 9.1 flaw in JSSE that required distrusting a set of compromised eMudhra intermediate CA certificates, affecting Java SE 8 through 27 and GraalVM. That's a severe, recent, high-profile vulnerability disclosure. I looked for any public attribution of this discovery to an AI tool, model, or agent. There isn't one. It's a conventional CA-trust issue, handled through Oracle's normal advisory process.

I'm including this deliberately, not as a footnote. If you only read the PHP2Shell and Big Sleep coverage, it's easy to walk away assuming every serious CVE in late 2026 has an AI origin story. That's not true, and writing as if it were would be exactly the kind of overclaiming this space doesn't need more of. AI-assisted discovery is real and it's producing results, but it's one input among several, not a replacement for the entire disclosure pipeline — and conflating "severe CVE this month" with "AI found it" is a factual error, not a stylistic shortcut.

The honest summary: PHP2Shell is AI-attributed and well-documented. Big Sleep's SQLite find is AI-attributed, with the caveat that the "beat the attackers to it" framing comes only from Google. XBOW's Microsoft credit is AI-attributed, sourced mostly from XBOW's own account. The Java CA-trust bug, despite being just as severe and just as recent, has no AI attribution anywhere I could find. All four of those sentences are true at once, and an article that only has room for the first three isn't telling you the whole picture.


Why This Changes the Defender's Math

Here's the part that's actually actionable, from where I sit:

The grace period between disclosure and exploitation is shrinking from months to days — but only for the CVEs that earn that treatment. PHP2Shell went from "patch released" to "broadly exploited" in days. If both researchers and attackers have access to the same class of AI tooling, the cushion that used to give defenders a few weeks before mass exploitation kicked in is disappearing for this specific category: AI-discovered, vendor-confirmed-exploited bugs. That's not a reason to treat every disclosure as a fire drill — it's a reason to have a fast lane ready for the ones that do meet that bar. A CVSS score alone won't tell you which ones those are; the discovery method and the vendor's own exploitation telemetry will.

Exposure numbers get inflated fast, and they're the first thing worth stress-testing. Several outlets repeated a claim that PHP2Shell left roughly 70% of websites exposed; others cited a figure of 1.5 million affected hosts. Neither number is something I'd act on without checking it against what's actually confirmed for your own stack — Google Cloud's affected-version range is the more durable fact here than any headline exposure percentage. Treat big round exposure numbers from launch-week coverage as a hook, not a measurement.

Volume is its own cost, separate from detection quality. OpenAI's own figures — nearly 800 critical findings and over 10,500 high-severity ones across the repos it scanned — are a preview of what any team running AI-assisted scanning or bug bounty triage is going to face: the bottleneck moves from "can we find the bug" to "can we triage the flood of findings fast enough to tell the real ones from the noise." That's a staffing and process problem, not a tooling problem, and it's worth planning for before the volume shows up rather than after.


What To Actually Do About It

Concrete, not philosophical — this is the checklist I'd actually apply:

  • Give AI-attributed, vendor-confirmed-exploited CVEs their own severity lane. A CVE that is (a) AI-discovered by a named, credible party and (b) confirmed by the vendor or a major cloud provider as actively exploited should skip your normal patch cadence entirely. PHP2Shell met both conditions within a week.
  • Read past the headline exposure number. When a disclosure comes with a dramatic percentage or host count, go straight to the vendor's own affected-version range and your own asset inventory. The gap between "1.5 million hosts, allegedly" and "which of our hosts are actually on an affected version" is where real triage time should go.
  • Separate the attribution claim from the technical finding. Whether a bug was found by GPT-5.6, Gemini 4, or a human reading source code line by line doesn't change the patch. It does change how much weight to put on claims about how it was found, who else might already know about it, and how fast it's likely to be weaponized — which is exactly the information you need for prioritization, not for patching mechanics.
  • If you run or plan to run AI-assisted scanning yourself, build the triage pipeline before the volume arrives. The lesson from Codex Security's and XBOW's own published numbers isn't "scan more" — it's that scanning at this scale produces a review bottleneck almost immediately, and that bottleneck is cheaper to design for in advance than to retrofit under pressure.

Where This Is Headed — and How to Prepare

Everything above is already documented fact. This section is a forecast, so I want to flag it as such up front: it's an extrapolation from trends that are already visible, not a claim about what's confirmed to happen.

Discovery stops being episodic and becomes ambient. Right now, PHP2Shell and Big Sleep read as events — a named team, a named model, a named CVE. But OpenAI's own figures for Codex Security — nearly 800 critical findings and over 10,500 high-severity ones from scanning external repos during testing — describe something closer to continuous background scanning than a one-off discovery. The more realistic few-years-out picture isn't "an AI occasionally finds a big bug," it's "every actively maintained open-source project is under something like permanent automated audit," with findings arriving as a steady stream rather than a headline every few months. That changes what a CVE announcement even means — from a rare signal worth dropping everything for, to one item in a continuous queue that has to be triaged on arrival.

The bottleneck moves from finding bugs to fixing and merging them. Finding has gotten cheap; validating a fix, testing it against the full matrix of downstream consumers, and getting a maintainer to actually merge it has not. Google's CodeMender points at where this goes next: not just AI that finds a bug, but AI that drafts the patch and opens the PR. That's a genuinely different trust problem from anything in this article so far — reviewing "this flaw exists" is different from reviewing "trust this automatically generated change to our cryptographic code." Expect the responsible-disclosure norms built around finding being the hard part (90-day windows, embargo coordination) to come under real pressure once finding is routine and shipping the fix safely is the actual constraint.

Patch cadence built around a calendar won't survive contact with this. Patch Tuesday and quarterly Critical Patch Updates exist because disclosure used to arrive at a human pace. If PHP2Shell's days-not-weeks exploitation timeline becomes the median case rather than the headline case, a fixed monthly or quarterly cycle stops being a cadence and starts being a liability for anything severity-scored high. The organizations that handle this well will be the ones that can patch out-of-band without it being a change-management emergency every time — which is a process and culture change, not a tooling purchase.

Severity scoring will need a "how findable is this right now" dimension. CVSS measures impact and exploitability, but says nothing about whether a bug sat undiscovered for twenty years because no one looked, or because no one who looked had the right tool. Once a given class of AI-assisted discovery becomes commodity-accessible, every codebase with that pattern becomes findable at the same time — which argues for weighting "how many independent parties are capable of finding this today" into prioritization, not just the theoretical blast radius if someone did.

So, concretely, what's worth doing now rather than waiting for this to fully arrive:

  • Fix your asset inventory before you fix your patch process. If exploitation windows keep shrinking, the single highest-leverage thing you can do is know instantly which of your systems run which version of what — without that, faster disclosure just means faster panic, not faster response.
  • Build an out-of-cycle patch path that isn't an exception process. If "patch this now, outside the normal window" requires the same change-approval overhead as a routine update, you will be structurally too slow for the cases that matter most. Make the fast path a designed, tested path, not an escalation.
  • Treat AI-authored patches as a distinct review category, not a shortcut. When auto-remediation tools like CodeMender start proposing fixes directly, resist the pull to trust the patch because the finding was trustworthy — a correct diagnosis and a safe fix are two different claims, and only one of them gets easier with AI.
  • Budget triage capacity as infrastructure, not overflow. The volume numbers coming out of Codex Security and similar tools are a preview of what your own inbound finding rate will look like once this tooling is commodity-priced. Plan headcount or tooling for that now, the same way you'd plan for any other load you know is coming.
  • Start scanning your own first-party code with these tools before someone else does. The asymmetry that matters most isn't AI versus humans — it's you versus whoever else points the same class of tool at your code first.

Closing Thoughts

AI didn't change what a vulnerability is. A chain of memory-corruption bugs in PHP's source is exactly the kind of thing a sufficiently patient human researcher has always been capable of finding — PHP2Shell sat there for two decades waiting for someone, or something, to look closely enough. What changed is the economics of looking: two independent efforts converged on the same bug within weeks, using tools neither team built from scratch, and the gap between that disclosure and real-world exploitation was days.

That's the thing worth designing your process around — not whether AI vulnerability discovery is impressive (it is), and not whether it's hype (parts of it clearly aren't), but the fact that the clock between "this exists" and "this is being used against you" just got shorter, for reasons that have nothing to do with how good your own patch management already is.


Sources and further reading: