arXiv:2610.32345cs.SEOct 2026

Manuscript Offprint

arXiv:2610.32345

DeepAVR: Deep Analysis via Multi-Agent Collaboration for Automated Vulnerability Repair

Woorim Han, Hyunjun Kim, Brian Junekyu Lee, Kyeongmin Kim, Younghan Lee, Hyungon Moon, Yunheung Paek

Woorim Han ∗^{*}

Seoul National University

Seoul, Republic of Korea

rimwoo98@snu.ac.kr

Hyunjun Kim ∗^{*}

Myongji University

Seoul, Republic of Korea

hjkim1@mju.ac.kr

Brian Junekyu Lee

Georgia Institute of Technology

Atlanta, United States

blee676@gatech.edu

Kyeongmin Kim

UNIST

Ulsan, Republic of Korea

kim1254@unist.ac.kr

Younghan Lee †^{\dagger}

Sungshin Women's University

Seoul, Republic of Korea

yhlee@sungshin.ac.kr

Hyungon Moon

UNIST

Ulsan, Republic of Korea

hyungon@unist.ac.kr

Yunheung Paek †^{\dagger}

Seoul National University

Seoul, Republic of Korea

ypaek@snu.ac.kr

Abstract—Automated Vulnerability Repair (AVR) has emerged as a critical defense against software security flaws, aiming to triage and fix bugs autonomously. Early LLM-based approaches focused on patch generation under the assumption of perfect fault localization, while recent end-to-end methods attempt to repair vulnerabilities directly from sanitizer logs. However, these methods often fail when the root cause is deeply hidden—either physically distant from the crash site or logically masked by interdependent errors—making the initial report insufficient. We propose DEEPAVR, a multi-agent framework for end-to-end AVR that performs deep analysis by transforming intermediate repair outcomes into structured diagnostic feedback. DEEPAVR decomposes repair into specialized roles—Fault Localization, Patch Generation, Compile Validation, Security Validation, Functionality Validation, and Patch Review—and routes feedback across these roles to iteratively refine both localization and patch hypotheses. In particular, DEEPAVR introduces patch-conditioned re-localization, which treats execution results from intermediate patches as diagnostic signals to uncover hidden root causes, and a root-cause-oriented patch review stage that detects symptom-level fixes and incomplete repairs beyond execution-based validation. Evaluation on the real-world C/C++ vulnerability repair dataset VulnLoc shows that DEEPAVR significantly outperforms prior methods, generating correct patches for 92.3% of vulnerabilities. Furthermore, results on SAN2VULN demonstrate strong generalization, with DEEPAVR effectively repairing vulnerabilities unseen during training.

Index Terms—automated vulnerability repair, multi-agent systems, large language models.

1. Introduction

The inherent complexity of modern software has contributed to the continued prevalence of security flaws, commonly referred to as vulnerabilities. This prevalence underscores the urgency of timely remediation of vulnerabilities. However, manual repair by experts is time-consuming and labor-intensive, making it difficult to keep up with the rapid emergence of new vulnerabilities, which motivates the need for automated approaches.

Automated program repair (APR) has received substantial attention as a promising direction to automatically address software defects [1]–[5]. While early APR research largely focused on general bug fixing to restore functional correctness, subsequent work has recognized that repairing security vulnerabilities—often termed automated vulnerability repair (AVR) [6]–[10]—demands more than restoring functional correctness; it must additionally eliminate exploitability. Unlike general bugs, patching vulnerabilities must often be undertaken without perfect specifications, relying instead on incomplete information such as sanitizer reports.

More recently, large language models (LLMs) have emerged as a promising paradigm for AVR [11]–[18]. Pre-trained on vast corpora of code, these models possess the capacity to comprehend program semantics and synthesize code, facilitating the automated generation of patches for a wide spectrum of vulnerability types. When coupled with repair-oriented prompting and program context, LLMs can produce candidate fixes without relying on manually crafted rules, and their generalization capacity makes them attractive for repairing previously unseen patterns [19], [20].

Although early studies assumed perfect fault localization (FL) [11], [12], [17]–[20], recent end-to-end solutions generate patches directly from a single Proof-of-Concept (PoC) [16] or the resulting sanitizer report [14], [15], a common form of vulnerability reporting. These methods

∗^{*}Equal contribution.

†^{\dagger}Corresponding authors.

move AVR closer to practical settings by integrating localization, patch generation, and validation into a single pipeline. For example, LoopRepair [16] combines Crash-Analysis [9]-based localization with iterative refinement, while SAN2PATCH [14] and PatchAgent [15] use LLM-based reasoning and tool-augmented interaction to repair vulnerabilities directly from sanitizer logs and retrieved code context. However, despite these advances, existing methods still struggle when the initial report provides only weak clues about the true root cause. Such weak signals commonly arise in two forms: physical distance, where the crash occurs far downstream from the silent root cause, and logical distance, where the reported error message captures only a symptom rather than the initiating defect. In these cases, patch generation can be misled by the immediate crash context, causing existing methods either to miss the underlying fault condition or to produce superficial fixes that silence the crash without repairing the underlying vulnerability.

We observe that this limitation largely stems from the fact that existing methods fall short of fully diagnostic iterative repair. In PatchAgent [15] and SAN2PATCH [14], validation is used primarily as a gate: it checks whether PoC execution and regression tests pass, but rarely exploits the specific nature of failures to revise the underlying root-cause hypothesis. LoopRepair [16] incorporates richer feedback through taint-trace-guided selection, yet it still refines patches largely within the repair locations and candidate space defined by its initial pipeline. As a result, when a candidate patch suppresses a crash through a symptom-level fix (e.g., local guards or early exits), these systems often lack a mechanism to recognize the deeper logical deficiency and steer repair toward a developer-level fix.

In this paper, we present DEEPAVR, a multi-agent framework for end-to-end AVR. Unlike prior iterative solutions, DEEPAVR handles weak signals through deep analysis, transforming intermediate repair outcomes into structured diagnostic feedback through three key design mechanisms. First, DEEPAVR adopts failure-aware role decomposition and structured feedback routing. It organizes repair into specialized agents for fault localization, patch generation, compilation, security, functionality validation, and patch review. Rather than repeatedly generating patches without diagnosing failures, each iteration produces structured diagnostic feedback from validation agents, which is routed to refine either localization or patch generation. This structured collaboration allows the system to progressively shift from crash symptoms toward root-cause fixes, even when initial signals are weak due to physical or logical distance from the defect.

Second, DEEPAVR introduces patch-conditioned re-localization to convert intermediate failures into stronger diagnostic signals. Applying a candidate patch can expose deeper defects by altering the type or location of the observed failure. DEEPAVR re-invokes the Fault Localization Agent on these updated reports, treating them as informative probes rather than noise. This enables the system to uncover root-cause candidates that are initially obscured, in contrast to prior approaches that either discard patches exhibiting new failure signals [16] or fail to systematically exploit execution feedback obtained after applying intermediate patches [15].

Third, DEEPAVR incorporates a root-cause-oriented patch review stage that complements execution-based validation. The Patch Review Agent identifies symptom-level fixes (e.g., guard-only edits), detects misplaced validation logic (e.g., applying checks in the callee instead of enforcing preconditions at the caller), and ensures patch completeness across logically equivalent sites. By providing targeted feedback on repair quality, this stage pushes patches toward root-cause-correct solutions beyond what PoC and regression testing alone can guarantee.

We evaluate DEEPAVR on two real-world benchmarks under standard end-to-end AVR settings [14], [16]. First, we evaluate DEEPAVR on VulnLoc [21], the standard benchmark used in prior end-to-end AVR work [9], [14], [16], enabling direct comparison. Out of 39 real-world vulnerabilities, DEEPAVR generates plausible patches for all 39 cases and correct patches for 36, substantially outperforming prior baselines [9], [14]–[16], [22]. Next, we evaluate DEEPAVR on SAN2VULN [14], specifically targeting vulnerabilities absent from the base model's training set to verify its generalization to unseen cases. DEEPAVR successfully generates correct patches for 22 out of 25 vulnerabilities, achieving an 88% success rate. Finally, we perform ablation studies to measure the contribution of each specialized agent, and analyze the token costs and total runtime of DEEPAVR. In summary, our key contributions are as follows:

• Failure-aware role decomposition and structured feedback routing. We present DEEPAVR, which performs deep analysis by transforming intermediate repair outcomes into structured diagnostic feedback and routing them to the most appropriate repair stage, enabling effective repair even with weak sanitizer signals.

• Patch-conditioned re-localization. We introduce an iterative repair mechanism that leverages execution feedback from intermediate patches to unmask deeply hidden diagnostic signals and refine root-cause hypotheses.

• Root-cause-oriented patch review. We design a Patch Review Agent that identifies symptom-level fixes and incomplete repairs, enforcing root-cause-oriented patch correctness beyond execution-based validation.

References (56)