LIVE · cybersecurity feed
Live wire
vulnerability

Three in four AI-generated vulnerability patches leave something broken

New research indicates that large language models (LLMs) tasked with patching software vulnerabilities frequently produce fixes that are incomplete, introduce new flaws, or alter expected program behavior. A study by Off-by-1 Labs, a security research group within 1Password, found that roughly three out of four AI-generated patches for real-world vulnerabilities left something broken.

ZeroDay News ·

Source: Help Net Security

New research indicates that large language models (LLMs) tasked with patching software vulnerabilities frequently produce fixes that are incomplete, introduce new flaws, or alter expected program behavior. A study by Off-by-1 Labs, a security research group within 1Password, found that roughly three out of four AI-generated patches for real-world vulnerabilities left something broken.

The researchers evaluated 6,080 patches for six recently disclosed Common Vulnerabilities and Exposures (CVEs), using both ChatGPT 5.5 and Claude Opus 4.8. While many of the AI-generated patches appeared correct and often passed initial tests, closer inspection revealed significant issues.

A common failure mode was the "fragile fix," where models addressed a specific exploit path demonstrated in a reproducer but failed to resolve the underlying general problem. This left the vulnerable code intact and exploitable through alternative means. For instance, in CVE-2026-8512, a Chromium bug related to macOS folder change monitoring, both models routinely implemented only one of two necessary claims on a go-between object, leaving the flaw present but moved.

Approximately half of the evaluated patches failed to fully close the original vulnerability, leaving at least one exploitable path open. About one in twenty introduced entirely new vulnerabilities, sometimes in addition to not fixing the original issue. Other patches closed the original bug but inadvertently changed the software's behavior, such as rejecting previously accepted inputs.

The study highlighted a case with Freenginx, a web server, involving a use-after-free memory bug. An AI-generated fix for this flaw, submitted through the Patch the Planet initiative by Trail of Bits and OpenAI, was rejected by maintainers because it only repaired two of three vulnerable locations. Both the rejected AI patch and the maintainer-written fix also introduced a new way to crash the server. Off-by-1 Labs subsequently reported this new crash, which was fixed on July 2. In a separate case study, 270 attempts by ChatGPT 5.5 to patch the original Freenginx flaw, while 114 were judged to close the original hole, every one of those 114 introduced a new problem.

The Linux kernel privilege escalation vulnerability, "Copy Fail," disclosed in April, also presented challenges. The upstream fix for this bug involved reverting a memory optimization, which initially introduced an off-by-one heap write that required a subsequent correction. Roughly a third of the AI-generated patches for "Copy Fail" regenerated this flawed revert, including the off-by-one error. Additionally, a second, unrelated flaw in the same code section was overlooked by every AI patch, even those that edited the exact file.

The researchers noted that the models tend to fix only the specific bug described in the ticket, even when other vulnerabilities are present in the code they are modifying. This "patch the example, not the bug" approach was a recurring theme.

The quality of guidance provided to the LLMs significantly impacted their success. Prompts containing correct fix directions resulted in bug closure approximately two-thirds of the time. However, prompts offering plausible but incorrect directions drastically reduced success rates to about one in six. The study concluded that providing confidently wrong advice is more detrimental than offering no advice at all.

While an iterative patching process and richer correct context improved results, neither was as impactful as the accuracy of the initial guidance. The study also found that model performance varied wildly across different codebases; for example, Claude cleanly fixed an Exim remote code execution bug in about three-quarters of attempts but managed under one percent for a Gemini CLI trust-bypass advisory.

The cost of generating and validating each patch attempt ranged from two to three dollars, which is inexpensive compared to an engineer's time. However, the researchers emphasized that LLM-produced patches still necessitate review by a skilled engineer with domain expertise. This manual review is costly because understanding a patch well enough to certify its security implications requires at least as much effort as writing a known-good patch from scratch.

Due to the high volume of patches, automated validators were used, cross-checked against each other and spot-checked by humans. The automated reviewers did not catch all new vulnerabilities, such as the "Copy Fail" off-by-one error in many instances, suggesting that the study's reported new-vulnerability rate should be considered a floor. The tooling used in the study has been made public to allow organizations to run it against their own fixed bugs and derive repository-specific metrics.

vulnerabilitypatchai
ShareXLinkedInWhatsAppFacebook

More News

view all →
security

Canadian cybersecurity executive arrested in federal extortion case

A Canadian cybersecurity executive was arrested in Pennsylvania on Thursday, facing federal charges of conspiracy to commit extortion. Edward Dubrovsky, 54, a co-founder and former Chief Operating Officer of CYPFER, a firm specializing in ransomware negotiation, is charged with conspiring to threaten the confidentiality of information for extortion and conspiring to commit Hobbs Act extortion,…

breach

Criminal IP Introduces AITEM as the Next Evolution of Attack Surface Management

AI SPERA, the company behind the cyber threat intelligence platform Criminal IP, has announced AITEM (AI-Powered Threat Exposure Management), an expansion of its Attack Surface Management (ASM) offerings. AITEM aims to move beyond traditional asset discovery to provide a more comprehensive approach to understanding, prioritizing, and responding to security exposures. The platform is scheduled…

ai

AI Is Getting Really Good at Messing With Cybercriminals

Anti-cybercrime initiatives are increasingly deploying artificial intelligence to disrupt scammers by engaging them with lifelike bots, which the criminals mistake for genuine victims. This strategy aims to waste scammers' time and resources while gathering intelligence on their operations.

ransomware

FBI Arrests Ransomware Negotiation Firm Co-Founder in ShinyHunters Probe

The Federal Bureau of Investigation (FBI) has reportedly arrested Edward Dubrovsky, a co-founder of the ransomware negotiation firm Cypfer and currently associated with CyberSteward. The arrest is said to be part of the ongoing ShinyHunters investigation, specifically in connection with an incident involving FBI job applicant data.

ai

The Third-Party Agent Problem: Why Security Built for AI You Chose Misses the Agents You Didn't

A new report highlights a significant blind spot in enterprise security architectures concerning the proliferation of third-party AI agents. The forthcoming 2026 State of Agent Security Report indicates that current security models, often designed to protect AI systems directly chosen and deployed by an organization, frequently fail to account for AI capabilities embedded within third-party…

security

Insider Cyber Extortion Plot Against Industrial Firm Lands Engineer in Prison

A former core infrastructure engineer has been sentenced to prison for an attempted cyber extortion plot against an industrial firm. The engineer reportedly deleted administrative accounts and reset hundreds of user passwords, subsequently demanding a ransom of 20 Bitcoin to prevent further disruption to the company's servers.