SoK: Automated Vulnerability Repair: Methods, Tools, and Assessments

Yiwei Hu, Zhen Li, Kedie Shu, Shenghua Guan, Deqing Zou, Shouhuai Xu, Bin Yuan, Hai Jin

Abstract

As software complexity increases, the frequency of security vulnerabilities has outpaced the capacity for manual intervention, with over 30,000 vulnerabilities reported in 2023 alone. Automated Vulnerability Repair (AVR) has emerged as a critical research area to bridge this gap. This paper provides a comprehensive Systematization of Knowledge (SoK) for AVR, defining a standardized three-step workflow: analysis, generation, and validation. Through the introduction of VUL4C, a new benchmark for C/C++ vulnerabilities, the study evaluates the current state of the art, revealing that while semantics-based tools currently outperform learning-based models in patch quality, the field continues to struggle with precise localization and scalability.

Introduction

The rapid expansion of software systems has led to a corresponding surge in security flaws. Traditional Automated Program Repair (APR) focuses on general functional bugs, but vulnerabilities present unique challenges: they require fixing security-critical flaws—often with only a single exploit available—without degrading the program's original functionality. Historically, the AVR landscape has been fragmented, with research often focusing on isolated components of the repair process rather than end-to-end solutions. This paper addresses these gaps by systematizing existing methodologies and providing a unified benchmark for rigorous evaluation.

A Standardized AVR Workflow

The authors categorize the AVR process into three distinct phases:

  1. Vulnerability Analysis: This initial step involves identifying the root cause and precise location of a flaw. Techniques include Value-flow analysis, which tracks data movement through a program, and Symbolic execution, which uses mathematical logic to explore execution paths.
  2. Patch Generation: Once a vulnerability is localized, a fix must be generated. Current approaches include:
  3. Search-based: Iteratively mutating code until a fix is found.
  4. Template-based: Applying pre-defined patterns derived from common fixes.
  5. Semantics-based: Solving logical constraints to ensure security properties are met.
  6. Learning-based: Utilizing Large Language Models (LLMs) or Neural Machine Translation (NMT) to predict fixes.
  7. Patch Validation: The final phase ensures the fix is effective and does not introduce regressions. This is achieved through Static analysis (code scanning) or Dynamic analysis (re-running exploits to verify the fix).

The VUL4C Benchmark

To address the lack of unified evaluation standards, the authors developed VUL4C, the first comprehensive benchmark specifically for C/C++ vulnerability repair. It features:

  • 144 real-world vulnerabilities across 23 software products.
  • 19 CWE types, providing a diverse range of security flaws.
  • Complete metadata, including exploits, human-written patches, and test cases.
  • 100% ground truth coverage, a significant improvement over older datasets like SATE IV or Big-Vul.

Key Findings and Results

The empirical study, which evaluated 9 tools against the VUL4C and VUL4J (Java) benchmarks, yielded several critical insights:

The Localization Bottleneck

Precise localization remains the "Achilles' heel" of AVR. While many tools can identify the file containing a bug, they frequently fail to pinpoint the specific statement. Because subsequent generation steps rely on accurate localization, failure at this stage almost inevitably leads to a failed repair attempt.

Semantics vs. Learning

Currently, semantics-based tools (e.g., VulnFix) produce higher-quality, logically sound patches compared to learning-based models. VulnFix achieved a 96% test pass rate on applicable vulnerabilities, though its "success rate" (matching human-authored patches) was a more modest 10.4%. In contrast, learning-based tools like VRepair and VulRepair showed success rates below 5% on VUL4C, suggesting that general-purpose code models still struggle with the rigorous constraints of security patching.

The Plausibility Trap

Many tools generate "plausible" patches—fixes that successfully block an exploit but may be functionally incorrect or incomplete. The authors argue that while these are not perfect, they can serve as valuable temporary mitigations to assist human developers during the triage process.

Language Disparities

The study found that AVR for Java lags significantly behind C/C++. Current Java tools often fail due to a lack of diverse repair templates or the generation of syntactically incorrect code, rendering them largely ineffective for complex real-world vulnerabilities.

Conclusion and Future Directions

While AVR has made significant strides, several hurdles remain. Semantic and symbolic methods, while precise, are computationally expensive and struggle to scale to large codebases. Conversely, while LLMs show promise, they lack the security-specific reasoning required for robust repair.

Future research should focus on:

  • Hybrid Approaches: Integrating the creative potential of LLMs with the rigorous verification of formal methods.
  • Scalability: Developing more efficient analysis techniques that do not "time out" on complex programs.
  • Balanced Validation: Creating better methods to ensure that security fixes do not come at the expense of program functionality.

Summary updated

BibTeX
@inproceedings{hu2025sok,
  author = {Yiwei Hu and Zhen Li and Kedie Shu and Shenghua Guan and Deqing Zou and Shouhuai Xu and Bin Yuan and Hai Jin},
  title = {{SoK: Automated Vulnerability Repair: Methods, Tools, and Assessments}},
  booktitle = {USENIX Security},
  year = {2025},
}
Figure