Skip to the page
Tecyfy

When AI finds the bug first: how defenders can use it

A frontier model found PHP2Shell about 12 weeks before the first known attacks, and the same week attackers ran AI agents against 2,250 Microsoft 365 tenants at machine speed. What AI security scanners such as Codex Security and Claude Security actually do, what the head start is worth, and what a small team can do this week.

Tecyfy · Published · 7 min read

A defender with a magnifying glass crosses an hourglass bridge ahead of a storm, the head start AI gives when it finds bugs first

A frontier model can now find severe flaws in software the whole internet runs, and in PHP's case, as far as anyone knows, it found them before attackers did. PHP2Shell, the pair of PHP flaws fixed on 21 October 2026, was first found with an AI model on 1 August, which gave maintainers about 12 weeks to build a fix in private. In the same week, Microsoft showed attackers running AI agents that tried 2,900 sign-ins a minute. Both sides have the same tools. What decides who wins is how fast the fix reaches your servers.

How AI found PHP2Shell 12 weeks before attackers

A researcher at Calif found the first ways into PHP using GPT-5.6 Sol, OpenAI's model, as part of OpenAI's Patch the Planet programme. The flaw had sat in PHP's engine since version 5.4 in 2012. A second team, at Wiz, found the same flaws on its own 13 days after Calif's report reached PHP. For the next 2 months, PHP's maintainers wrote the fix, partners tested it, and Linux distributions got it before release.

Then the details leaked. The first attacks came the next morning, about 6 hours before the fixed versions existed. Move through it yourself:

Try itWho knew about PHP2Shell, and when
24 Aug2026

23days defenders had it to themselves6hours of attacks before a fix existed

  1. Finders (with AI)
  2. PHP maintainers
  3. Second research team
  4. Distributions, providers
  5. Attackers
  6. Everyone with PHP

24 Aug. Wiz finds and reports both flaws on its own. 2 teams now know, and still no attacker is seen.

Dates from the PHP advisory, the researchers' timelines and OpenAI's account of the response. When distributions received the patch is not public, so their row starts at an estimate. Attackers are drawn from the leak: none were reported before it.

That is the shape to expect. AI widens the window before disclosure, because the defenders find the bug first. It does nothing for the window after: once a flaw is public, attackers have the same models to turn a write-up into an exploit. Our guide to checking and patching PHP2Shell covers the fix itself.

Attackers use AI agents too: the ConnectWise attack

Microsoft's threat intelligence team traced a China-aligned group, Storm-0940, using ARTEX, an open-source penetration testing framework built from several AI agents that plan and run an attack from reconnaissance to taking data, with little human input. ARTEX works with any AI model.

After the group got hold of the identities of ConnectWise's cloud backup app, its agents tried to sign in to more than 2,250 Microsoft 365 tenants that had trusted that app. In an earlier password spray against 327 accounts, the same infrastructure peaked at 2,900 failed sign-ins a minute. No user had to log in: the app already had access. Across the group's ARTEX attacks, several went from picking a target to privileged access in under 3 hours.

Nothing about the method is new. Password spraying and abuse of app permissions are old tricks. The agents changed the speed: they work through the night and try several paths at once. Against that, a team that reads its alerts once a morning can be many hours behind.

Codex Security vs Claude Security: what AI scanners do

A classic scanner matches code against known bad patterns. The new tools read code the way a security researcher does. They work out where an attacker can get in, which data matters and which code paths connect the two, then look for a flaw on those paths and explain how it is reached.

Codex Security, from OpenAI, connects to GitHub repositories and builds a threat model you can edit: entry points, trust boundaries, sensitive data. It scans a whole repository or each commit, tries to confirm a finding in an isolated environment, and proposes a patch for your team to review. It is a research preview for ChatGPT Enterprise, Edu, Business and Pro, billed by tokens.

Claude Security, from Anthropic, changed on 21 October from a scan you start to one that keeps up with the code. After a first deep scan, it scans changes by risk and complexity, can hold several repositories in one project so it sees flaws between services, and marks a finding fixed when the fix lands, wherever you made it. Each finding has a severity judged against the project's threat model and the path an attacker would take. Your team can add what the code cannot show, such as a firewall rule that already blocks a route. It is in public beta for Claude Enterprise, with an API, webhooks and a connector for Claude.ai and Claude Code.

The vendors' own counts are large: Anthropic says its scanner has found over a million vulnerabilities across thousands of organisations since April. A count of findings is not a count of fixes. Every finding still needs someone to judge it, patch it and ship the patch.

Why patching speed now matters most

OpenAI expects findings like PHP2Shell to "increase sharply in the coming months". Its proposed response can involve 5 stages, from fixing the flaw upstream and testing the patch against models trying to get round it, to giving distributors and hosting providers time, to publishing guidance once the fix ships. It has also put $1 billion of subsidised access to its security models toward defenders with small budgets, starting with US water and grid operators, local governments, community banks, nonprofits and open-source maintainers.

None of that patches your server. If more critical bugs arrive each month, the team that wins is the one that can apply a fix in an hour instead of a week.

How a small team can defend against AI-speed attacks

  • Know what runs where. A list of every server, the software and version on it, and the person who updates it. When the next emergency release lands, the list is what lets you patch in an hour.
  • Hear about fixes on the day. Subscribe to the security notices of the projects you run (PHP, your database, your CMS) and your Linux distribution, not only the news.
  • Check what your apps can reach. List the third-party apps that hold access to your Microsoft 365 or Google tenant and remove those you do not use. Microsoft's advice after the ConnectWise attack: search by the app's ID, not its display name, and do not delete a suspect app before saving its logs.
  • Review code before it merges. Without an enterprise plan, Claude Code's /security-review checks the changes on your branch for injection, authentication flaws and data exposure, and a GitHub Action does the same on each pull request. It sees a diff, not your whole system, so treat it as one more check.

The head start AI gives defenders is real, but it ends the moment a flaw goes public. Use the weeks before to make the hours after short.

Questions

Did AI find the PHP2Shell vulnerabilities?
Partly. A researcher at Calif found the first paths on 1 August 2026 using OpenAI's GPT-5.6 Sol, as part of OpenAI's Patch the Planet programme, and Wiz found and reported both flaws on its own 13 days after Calif's report. The fix shipped on 21 October 2026. As far as OpenAI knows, the model found the flaws before any attacker did, which gave maintainers about 12 weeks to prepare.
What is the difference between Codex Security and Claude Security?
Both read code like a security researcher rather than matching known patterns: they build a threat model of the codebase, look for reachable flaws and explain or test them. Codex Security, from OpenAI, is a research preview for ChatGPT Enterprise, Edu, Business and Pro; it scans GitHub repositories or commits, tries to validate findings in an isolated environment and proposes patches. Claude Security, from Anthropic, is in public beta for Claude Enterprise; since 21 October 2026 it scans continuously as code changes, marks findings fixed when the fix lands, and has an API, webhooks and an MCP connector.
Are attackers using AI agents?
Yes. Microsoft documented Storm-0940, a China-aligned group, using ARTEX, an open-source multi-agent penetration testing framework, to automate attacks on hundreds of organisations from September 2026. After a supply-chain compromise of ConnectWise's cloud backup app, its agents tried to sign in to more than 2,250 tenants; an earlier password spray peaked at 2,900 failed attempts a minute, and across the group's ARTEX attacks there were several cases of under 3 hours from first targeting to privileged access.
Can I use AI to check my own code for vulnerabilities without an enterprise plan?
Yes, on a smaller scale. Claude Code's /security-review command checks the changes on your branch for risks such as injection, authentication flaws and data exposure, on any Claude Code plan, and there is a GitHub Action that reviews each pull request. It reviews a diff, not your whole system, so it complements patching and monitoring rather than replacing them.
What should a small team do now that AI finds bugs faster?
Shorten the path from advisory to patched server. Keep a list of what software runs where and who updates it, subscribe to the security notices of the projects you run, review which third-party apps hold access to your Microsoft 365 or Google tenant, and run an AI review on code changes before they merge. More critical bugs will be found, so the bottleneck moves to how fast you apply fixes.