MemRepair: Hierarchical Memory for Agentic Repository-Level Vulnerability Repair
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
Modern software ecosystems face a rapidly growing number of disclosed vulnerabilities, increasing the need for automated repair techniques that can operate reliably at repository scale. Although Large Language Model (LLM)-based agents have recently shown promise for automated vulnerability repair (AVR), most existing systems still treat repair as a single generation step over the currently visible code context. As a result, they lack a persistent mechanism for reusing prior fixes or learning from failed validation attempts, which limits their effectiveness on complex, multi-file repair tasks. We present MemRepair, a memory-augmented agentic framework that formulates vulnerability repair as an iterative, experience-driven process. MemRepair combines three complementary memory layers, i.e., History-Fix, Security-Pattern, and Refinement-Trajectory memories, with a dynamic feedback-driven refinement loop. This design allows the agent to retrieve repository-specific repair conventions, apply reusable security defenses, and exploit prior "failure-to-success" trajectories to revise semantically invalid patches based on runtime evidence. We evaluate MemRepair on three representative repository-level vulnerability repair benchmarks: SEC-Bench, PatchEval (Python, Go, JavaScript), and the C++ subset of Multi-SWE-bench. MemRepair achieves state-of-the-art resolution rates of 58.0%, 58.2%, and 30.58%, respectively, outperforming strong general-purpose agents such as OpenHands and SWE-agent, as well as the specialized AVR tool InfCode-C++, while maintaining competitive repair cost. These results show that persistent, hierarchical repair memory can substantially improve the reliability of agentic vulnerability repair across diverse languages and repository settings.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 22 of its 50 references that are in the map. First posted on arXiv 17 May 2026.
Builds on
22 of 50 references.
References · 22
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 232
- 2025Multi-SWE-bench: A Multilingual Benchmark for Issue Resolvingcited by 171
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 86
- 2019TBar: Revisiting Template-based Automated Program Repaircited by 65
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 63
- 2023Explainable Automated Debugging via Large Language Model-driven Scientific Debuggingcited by 40
- 2018Nopol: Automatic Repair of Conditional Statement Bugs in Java Programscited by 32
10 more
- 2024Are LLMs Correctly Integrated into Software Systems?cited by 15
- 2025SoK: Automated Vulnerability Repair: Methods, Tools, and Assessmentscited by 12
- 2025SoK: Towards Effective Automated Vulnerability Repaircited by 10
- 2025Repair Ingredients Are All You Need: Improving Large Language Model-Based Program Repair via Repair Ingredients Searchcited by 8
- 2025Agent That Debugs: Dynamic State-Guided Vulnerability Repaircited by 7
- 2024Topology-Aware 3D Gaussian Splatting: Leveraging Persistent Homology for Optimized Structural Integritycited by 6
- 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generationcited by 6
- 2025SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-aware Fine-tuningcited by 5
- 2025InfCode-C++: Intent-Guided Semantic Retrieval and AST-Structured Search for C++ Issue Resolutioncited by 3
- 2024CRepair: CVAE-based Automatic Vulnerability Repair Technologycited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026AgenticRepair: Multi-Faceted Program Context Engineering for Agentic Vulnerability Repair
- 2026RAVEN: Agentic RAG for Automated Vulnerability Repair
- 2026EvoRepair: Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolution
- 2025HAFixAgent: History-Aware Program Repair Agent
- 2026ContextSniper: AntTrail's Token-Efficient Code Memory for Repository-Level Program Repair
- 2026Multi-Agent End-to-End Vulnerability Management for Mitigating Recurring Vulnerabilities
- 2026ContraFix: Skill-Enhanced Contrastive Runtime Analysis for Vulnerability Repair
- 2026Revelio: Cost-Efficient Agentic Memory Safety Vulnerability Detection For Repository-Scale Codebases