AI-Assisted Security Patching Faces a New Test: Finding the Bugs Left Behind
AI is compressing the time between finding a software flaw and showing attackers how to exploit it. That speed cuts both ways: a patch can expose the shape of a vulnerability, while an incomplete fix leaves clues about the paths that still work. For security teams, the practical challenge is no longer just producing patches faster. It’s proving that each fix closes the underlying weakness across the codebase.
The pattern surfaced in work on vm2, an open-source JavaScript sandbox library with about 1 million downloads a week. Its maintainers released fixes for 34 sandbox escape vulnerabilities over the summer, with Anthropic’s Claude helping write 19. Weeks later, a security researcher gave an AI agent one of the advisories and asked it to find a way around the fix. The agent did.
Shayaun Nejad, lead product security engineer at Rubrik, examined the vm2 patch while preparing a presentation for the [un]prompted AI security conference in San Francisco. His team had seen vulnerabilities reappear in later testing, even after AI-assisted pipelines marked them fixed. Sometimes the same code failed again; in other cases, a related flaw sat nearby. Better models and more extensive analysis could uncover variants that earlier runs had missed.
That makes vulnerability history useful context for both defenders and attackers. An agent can inspect a codebase alongside its past advisories and fixes, then search for similar weaknesses. The patch itself may narrow the search by showing which behavior developers considered dangerous and how they tried to block it.
Fast patches still need adversarial review
Evidence from other projects points to a recurring weakness: AI systems can identify flaws and develop exploits faster than they can reliably produce complete fixes. At the [un]prompted conference, OpenAI security researcher Tim de Waal demonstrated an agent patching two vulnerabilities in network access point firmware. One replacement function omitted the original stack canaries, removing a defensive safeguard. Another patch filtered double quotes in user input but left single quotes available as a bypass.
A study by 1Password’s Off-by-1 Labs found similar gaps across repeated patch attempts. Researchers asked agents to fix six known vulnerabilities in complex open-source projects and generated 6,080 candidate patches. About half left at least one attack path open. In some cases, agents also missed another occurrence of the same bug elsewhere in the code.
The P2Patch benchmark tested the issue from an attacker’s perspective. One agent wrote exploits for 101 real vulnerabilities; another patched the affected programs until those exploits stopped working. The first agent then searched the patched programs for alternate ways to trigger the same flaws. It succeeded in 41 cases, and sometimes found further bypasses after subsequent fixes.
Human patches have their own failure rate. Trail of Bits reviewed developer fixes for 2,265 vulnerabilities found in consulting assessments over several years and concluded that one in eight fixes did not fully resolve the reported issue. The comparison matters: AI isn’t introducing an entirely new class of patching mistakes, but it can produce more candidate fixes at a pace that makes careful review harder to sustain.
Even patches written by different people can share failure modes. A human maintainer and an AI agent working on the Patch the Planet initiative separately fixed the same memory safety bug in the freenginx web server. Both fixes introduced a crash during request cleanup.
Discovery is outpacing the people who must respond
The volume of findings helps explain why organizations are turning to automated assistance despite its shortcomings. Anthropic’s Mythos-powered Glasswing vulnerability-hunting program had logged 37,966 findings seven months after launch. VulnCheck’s analysis counted 7,349 flaws that had been made public, of which 217 had been fixed. Anthropic reported a 94.2% true positive rate, though not every finding necessarily qualifies as a security vulnerability.
As Anthropic put it in its initial Glasswing update, the constraint on software security has shifted. The bottleneck is now how quickly teams can verify, disclose and patch the flaws AI can find.
The staffing burden reaches beyond open-source maintainers. After Bank of America used Anthropic models to search its systems, the bank added 1,000 outside contractors in the second quarter to support patching, on top of 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 nearly half of those patches went into production without changes. Yet exposure time did not fall, according to Meta software engineer David Molnar. Human review remained necessary as the volume of new code grew by more than 100% year over year, with more than 80% attributed to AI coding agents.
Molnar described teams facing too much work to review. His group has looked for additional ways to automate the process, including shifting review from humans directly approving every step to humans supervising an automated workflow. The operational lesson is that automation at the start of a pipeline can overwhelm reviewers at the end if the whole process doesn’t scale with it.
The incoming volume is visible in vulnerability counts. In June, the Forum of Incident Response and Security Teams projected about 66,000 CVE assignments for the year. With two months remaining, the figure was nearing 100,000. Microsoft’s October Patch Tuesday addressed 1,415 vulnerabilities, compared with 180 in October 2025.
Closed-source software has the same exposure
Proprietary code can also be analyzed after a fix ships. AI models can compare vulnerable and patched binaries, interpret decompilation output and identify what changed. Anthropic researchers tested this approach using information available on patch day and produced a working exploit within an hour of a Firefox fix being released. For Windows, they used vulnerable and patched binaries with decompilation output to build eight full privilege escalation chains from 21 kernel vulnerabilities, at an estimated cost of about $2,000 per chain.
Researchers at Fudan University developed an AI-assisted binary comparison framework and applied it to 76 recent patches across 62 closed-source applications from 25 vendors. Their analysis flagged 63 patches as incomplete. Manual review confirmed 56 of those; 26 could be bypassed into new vulnerabilities. The work led to 19 CVE assignments and $28,100 in bug bounties.
Comparing software versions to find the code changed by a patch has long been standard security research. AI lowers the time and expertise required, broadening who can perform that analysis. While some frontier models have added restrictions on binary analysis, open-weight systems such as Qwen, Kimi and GLM remain capable options, Microsoft security research vice president Taesoo Kim said at [un]prompted.
Patch timing creates another window for attackers
A fix may also reach related products at different times. Microsoft’s Edge Security team has warned about attackers exploiting the gap between a vulnerability fix appearing in one project and the same fix arriving in downstream software. Chromium, for example, underpins Google Chrome, Microsoft Edge and other browsers; a security change visible in Chromium may leave those products exposed until they ship their own updates.
AI can shorten the analysis that attackers need to exploit this interval. Epoch AI researchers used GLM 5.3 to target Firefox releases during the patch gap. With about $1,000 in API credits and as little as 12 hours of work per target, they compromised every release shipped between Sept. 17 and Oct. 26. They reported that they did not encounter safeguards or refusals from providers.
Mozilla responded by withholding regression tests tied to security fixes until the fix had shipped. Firefox CTO Bobby Holley said GLM 5.3 was much less effective at exploiting patch gaps when those tests weren’t available. The decision reflects a narrow timing problem: tests can help defenders verify fixes, but publishing them alongside a patch may also give attackers more precise clues.
Make variant hunting part of the fix
Hiding security details isn’t a durable answer. Teams need to identify the root cause, look for related flaws, and test the patch against the paths an attacker would try. Rubrik added automated variant hunting after its team noticed bugs returning in later testing. It now routes simpler flaws to AI-assisted patching while keeping complex issues, including authentication bypasses, with human engineers.
Nejad’s point is that defenders often have the same context attackers can use, and can act on it first. That advantage only holds if teams use vulnerability history to test the patch rather than treating a successful initial fix as the end of the work.
OpenAI has described a similar process for its Linux vulnerability research and patching pipeline. Its initial patches sometimes missed related code containing variants of the same flaw, so the team added iterative testing and variant analysis. The company recommends using models to review both human-written and AI-generated patches for bypasses, missed attack paths and related weaknesses.
The Open Source Security Foundation’s guidance likewise recommends having a separate discovery agent probe a proposed fix as an attacker. Trail of Bits has released an agent skill that requires testing at least one distinct variant based on the vulnerability’s root cause before a patch can be submitted.
Terra’s PatchSlop report found an eightfold increase this year in incomplete or broken fixes across open-source projects. A patch that blocks only the reported input can leave the underlying flaw intact, while revealing where defenders looked and what they missed. The useful response is more rigorous validation: understand the cause, search for sibling bugs across the codebase, and retest the patched system for new failures. As AI expands both the rate of discovery and the number of proposed fixes, variant analysis will need to become a standard step in the patch pipeline.