AI Security Patches Need Adversarial Testing as Vulnerability Reports Surge
AI has made patch quality a throughput problem
AI tools can find software flaws quickly, but the harder task is making sure a fix closes every route to the underlying bug. That gap is becoming more consequential as automated discovery produces more findings and attackers use models to inspect patches for missed variants. For security teams, the practical measure of progress is shifting from how fast a patch is drafted to how thoroughly it survives an adversarial review.
The issue showed up in work on vm2, an open-source JavaScript sandboxing library with about one million downloads a week. Its maintainers shipped fixes for 34 sandbox-escape vulnerabilities over the summer, and Anthropic’s Claude helped write 19 of those fixes. Weeks later, a researcher asked an AI agent to find a way around one of the patches. It did.
Shayaun Nejad, lead product security engineer at Rubrik, examined the vm2 fix while preparing a presentation for the [un]prompted AI security conference in San Francisco. His team had seen vulnerabilities return in later testing, even after AI-assisted pipelines marked them fixed. In some cases, a more capable model or a longer chain of analysis surfaced a related flaw that earlier runs had missed.
That pattern is known as variant analysis: searching for other ways to trigger the same underlying weakness. A patch can block the specific input named in an advisory while leaving nearby code or another input format exposed. Once vulnerability details and a fix are public, both can help a defender test the repair—and give an attacker useful context for probing it.
Patch generation still needs a second attacker’s pass
Examples from research and practice point to a recurring failure mode: generated patches can address the visible symptom while weakening another safeguard or leaving a bypass. At the conference, OpenAI security researcher Tim de Waal described an AI agent patching two flaws in network access point firmware. One fix rebuilt a vulnerable function but removed its stack canaries, which help detect stack corruption. Another rejected double quotes in attacker-controlled input but overlooked single quotes, leaving a route around the filter.
In a controlled study, researchers at 1Password’s Off-by-1 Labs had agents repeatedly patch six known vulnerabilities in complex open-source projects. Of 6,080 candidate patches, about half left at least one attack path open. Agents also missed instances of the same bug elsewhere in a project. A separate benchmark, P2Patch, paired one agent that wrote exploits for 101 real vulnerabilities with another that attempted repairs. After patching, the attacking agent found a working route in 41 cases, and sometimes succeeded again after later fixes.
Human patches also fail. Trail of Bits reviewed fixes submitted for 2,265 vulnerabilities identified during its consulting work and found that one in eight did not fully resolve the reported issue. In one documented case, a human maintainer and an AI agent working on the Patch the Planet initiative independently fixed the same memory-safety flaw in freenginx. Both fixes caused a crash during request cleanup.
These results don't establish that AI patches are always worse than human work. They do show why a patch needs its own testing plan. A check that confirms only the reported exploit no longer works can miss a second path to the same flaw, or a new problem introduced by the repair.
Discovery is outrunning review capacity
Security teams are turning to automation partly because the volume of reports is difficult to manage by hand. Anthropic’s Glasswing vulnerability-hunting program had recorded 37,966 findings seven months after launch. Of 7,349 flaws that had been made public, just 217 had been fixed, according to an analysis by vulnerability intelligence firm VulnCheck. Anthropic reported a 94.2% true positive rate, though not every finding necessarily becomes a confirmed vulnerability.
Anthropic framed the bottleneck as a change in the work itself: finding flaws used to limit progress, while verifying, disclosing and patching the volume found by AI now poses the larger challenge. That pressure extends beyond open-source maintainers. After Bank of America let Anthropic models examine its systems, it added 1,000 outside contractors in the second quarter to help with patching, alongside roughly 3,000 existing staff. CEO Brian Moynihan said those contractors were still working in October.
At Meta, AI was writing fixes for 40% of critical vulnerabilities by July, and almost half of those patches reached production unchanged. Yet the time systems remained exposed did not fall, software engineer David Molnar said at [un]prompted. Human review remained necessary, while the volume of new code had grown more than 100% year over year; more than 80% of that code was attributed to AI coding agents.
Molnar described teams overwhelmed by review work. Meta has been looking for ways to automate more of the process, including shifting some checks from human approval of each step to human oversight of automated work. Automating vulnerability discovery and patch drafting without increasing review capacity can simply move the queue to the people responsible for approving the fixes.
The numbers underline the strain. In June, the Forum of Incident Response and Security Teams projected about 66,000 CVE assignments for the year. With two months remaining, the count was approaching 100,000. Microsoft’s October Patch Tuesday addressed 1,415 vulnerabilities, compared with 180 in October 2025.
Compiled software can still give away the patch
Closed-source products aren't insulated from this pressure just because customers receive compiled binaries. Researchers can compare vulnerable and patched versions, inspect the changes and use decompilation tools to understand what a fix does. AI can speed up that process, lowering the time and expertise needed to look for an exploit.
In June, Anthropic researchers tested AI-assisted patch analysis using information available on the day a fix became public. A model produced a working exploit within an hour of a Firefox update landing. Given vulnerable and patched Windows binaries plus decompilation output, the same approach built eight full privilege-escalation chains from 21 kernel vulnerabilities, at an estimated cost of about $2,000 per chain.
A Fudan University research team tested an LLM-assisted binary-diffing framework on 76 recent patches from 62 closed-source applications across 25 vendors. Its paper reported that the framework flagged 63 patches as incomplete. Researchers manually confirmed 56 of those; 26 could be bypassed into new vulnerabilities, leading to 19 CVE assignments and $28,100 in bug bounties.
Some frontier models have added restrictions on binary analysis, but capable open-weight models—including Qwen, Kimi and GLM—remain available. Microsoft security research vice president Taesoo Kim warned at [un]prompted that AI has cut the time needed for binary-diff analysis and exploit development. Patch publication therefore creates a race: vendors need to deliver fixes quickly, while attackers can use the changes to narrow their search.
Shorter patch gaps demand earlier fixes and broader checks
Attackers can also exploit the delay between a security fix appearing in one project and reaching software built from it. Microsoft Edge’s security team has described this as patch-gap abuse, including cases where fixes in Chromium builds were analyzed before they reached downstream browsers such as Chrome and Edge. AI-assisted analysis could compress work that once took weeks into hours.
Epoch AI researchers tested that risk against Firefox releases using GLM 5.3. With about $1,000 in API credits and as little as 12 hours of work per target, they compromised every release in their test window, from September 17 to October 26. Mozilla responded by keeping regression tests associated with security fixes confidential until the fix ships. Firefox CTO Bobby Holley said GLM 5.3 was less effective at exploiting patch gaps when those tests weren't available.
Withholding tests can limit one source of clues, but the central defense is still a fix that addresses the root cause and holds up under probing. Rubrik added automated variant hunting after patch development when it found previously fixed bugs reappearing in tests. The team routes simpler flaws to AI patching and reserves more complex issues, such as authentication bypasses, for human engineers. Nejad’s point is practical: once attackers have the context, defenders can use it too—if they test first and act on what they find.
Guidance from the Open Source Security Foundation recommends having a separate discovery agent probe a patch as an attacker. Trail of Bits has also released an agent skill that requires testing at least one distinct variant based on the bug’s root cause before a patch can be submitted. OpenAI has described a similar need for iterative testing after early Linux fixes missed related vulnerable code.
The useful workflow is becoming clearer: identify the root cause, search the codebase for related instances, and test the patch against bypasses and newly introduced faults. AI can help perform each step, but generated fixes still need adversarial validation. As discovery speeds up, teams that build variant hunting into their patch pipeline are better positioned to turn public vulnerability details into faster repairs instead of attack instructions.