AutoPatch: Multi-Agent Framework for Patching Real-World CVE Vulnerabilities
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
Large Language Models (LLMs) have emerged as promising tools in software development, enabling automated code generation and analysis. However, their knowledge is limited to a fixed cutoff date, making them prone to generating code vulnerable to newly disclosed CVEs. Frequent fine-tuning with new CVE sets is costly, and existing LLM-based approaches focus on oversimplified CWE examples and require providing explicit bug locations to LLMs, limiting their ability to patch complex real-world vulnerabilities. To address these limitations, we propose AutoPatch, a multi-agent framework designed to patch vulnerable LLM-generated code, particularly those introduced after the LLMs' knowledge cutoff. AutoPatch integrates Retrieval-Augmented Generation (RAG) with a structured database of recently disclosed vulnerabilities, comprising 525 code snippets derived from 75 high-severity CVEs across real-world systems such as the Linux kernel and Chrome. AutoPatch combines semantic and taint analysis to identify the most relevant CVE and leverages enhanced Chain-of-Thought (CoT) reasoning to construct enriched prompts for verification and patching. Our unified similarity model, which selects the most relevant vulnerabilities, achieves 90.4 percent accuracy in CVE matching. AutoPatch attains 89.5 percent F1-score for vulnerability verification and 95.0 percent accuracy in patching, while being over 50x more cost-efficient than traditional fine-tuning approaches.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 19 of its 53 references that are in the map. First posted on arXiv 7 May 2025.
Builds on
19 of 53 references.
References · 19
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2023Faithful Chain-of-Thought Reasoningcited by 288
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
- 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 97
- 2024Vul-RAG: Enhancing LLM-based Vulnerability Detection via Knowledge-level RAGcited by 68
- 2023Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilitiescited by 59
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 47
- 2024Chain-of-Thought Prompting of Large Language Models for Discovering and Fixing Software Vulnerabilitiescited by 31
- 2024ThinkRepair: Self-Directed Automated Program Repaircited by 23
7 more
- 2024VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Modelscited by 11
- 2025CodeSteer: Symbolic-Augmented Language Models via Code/Text Guidancecited by 11
- 2023STEAM: Simulating the InTeractive BEhavior of ProgrAMmers for Automatic Bug Fixingcited by 9
- 2024Multitask Mayhem: Unveiling and Mitigating Safety Gaps in LLMs Fine-tuningcited by 8
- 2024LProtector: An LLM-driven Vulnerability Detection Systemcited by 8
- 2024Fight Fire with Fire: How Much Can We Trust ChatGPT on Source Code-Related Tasks?cited by 7
- 2019RESTORE: Retrospective Fault Localization Enhancing Automated Program Repaircited by 2
Built on by
Citing papers per year: 2025: 1; 2026: 3.
4 papers.
- 2026Core-based Hierarchies for Efficient GraphRAGcited by 2
- 2025SoK: Measuring What Matters for Closed-Loop Security Agentscited by 0
- 2026Verify Before You Fix: Agentic Execution Grounding for Trustworthy Cross-Language Code Analysiscited by 0
- 2026FirmPilot: Evidence-Guided Multi-Agent Environment Recovery for IoT Firmware Rehostingcited by 0
- 2026FirmPilot: Evidence-Guided Multi-Agent Environment Recovery for IoT Firmware Rehosting16 Jul 2026
- 2026Verify Before You Fix: Agentic Execution Grounding for Trustworthy Cross-Language Code Analysis12 Apr 2026
- 2026Core-based Hierarchies for Efficient GraphRAG5 Mar 2026
- 2025SoK: Measuring What Matters for Closed-Loop Security Agents2 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2025From CVE Entries to Verifiable Exploits: An Automated Multi-Agent Framework for Reproducing CVEs
- 2026FuzzingBrain V2: A Multi-Agent LLM System for Automated Vulnerability Discovery and Reproduction
- 2026Multi-Agent End-to-End Vulnerability Management for Mitigating Recurring Vulnerabilities
- 2026CVE-Factory: Scaling Expert-Level Agentic Tasks for Code Security Vulnerability
- 2025Automated Vulnerability Validation and Verification: A Large Language Model Approach
- 2026RAVEN: Agentic RAG for Automated Vulnerability Repair
- 2024AutoSafeCoder: A Multi-Agent Framework for Securing LLM Code Generation through Static Analysis and Fuzz Testing
- 2025Benchmarking LLMs and LLM-based Agents in Practical Vulnerability Detection for Code Repositories