AI-Generated Security Patches Frequently Fail or Introduce New Vulnerabilities
A study by 1Password's research team found that AI language models including Claude and OpenAI's Codex failed to properly generate security patches for software vulnerabilities, with only 26% of patches being usable. Many patches failed to fix the intended vulnerability, altered software behavior, or introduced new vulnerabilities instead.
What happened
1Password's Off-By-1 Labs conducted research on AI-generated security patches for six recently disclosed vulnerabilities in open source software. The study found that frontier AI models including Claude and OpenAI's Codex-based coding agent performed poorly when tasked with generating patches, with only 26% of patches generated being usable.
Reported impact
Many AI-generated patches failed to solve the vulnerabilities they were designed to fix, altered software behavior, or introduced new vulnerabilities. The success rates were significantly lower and more uneven than the researchers had hypothesized.
Index analysis
The research paper titled 'Frontier Models' Vulnerability Patches are Often F.L.A.W.E.D. Fix-Like Artifacts With Embedded Defects: Common failure modes of LLM-generated security patches' examined common failure modes of LLM-generated security patches. The study tested six specific CVEs including Linux privilege escalation, ActiveMQ remote code execution, and use-after-free vulnerabilities.
Governance controls
Researchers found that providing guidance to the models improved outcomes, leading to a flawed evaluation harness release.
Classification
Sources and evidence
This record was researched and written by the Index, based on the following original reporting.