XRepair - Unifying Retrieval, Repair, and Evaluation for Explainable LLM-Based Vulnerability Fixes
This paper presents XRepair, a web-based tool for automated and explainable software vulnerability repair. XRepair integrates retrieval, generation, and evaluation into a single interactive framework. It augments large language models (LLMs) with knowledge retrieved from CWE/CVE datasets through both embedding-based and graph-based strategies. XRepair enables repairs that are contextualized with vulnerability metadata and related examples. The tool provides end-to-end functionalities, including users inputting a CWE/CVE identifier and vulnerable code snippet, configuring the retrieval strategy and LLM, and receiving repair recommendations. Unlike patch-only systems, the recommendations consist of an issue description, explicit repair guidance, and concrete code diffs. To assess repair quality, XRepair incorporates an LLM-as-a-Judge evaluation framework that scores outputs across five criteria, namely relevance, completeness, correctness, identification of vulnerable code, and guidance. This design supports reproducible comparison of retrieval strategies and produces transparent recommendations. Built using both the strategy and factory design patterns, XRepair allows new retrieval algorithms and data sources to be added. The tool and documentation are publicly available with a tool for comparative evaluation and practical application of explainable vulnerability repairs. The demo for XRepair can be accessed at https://youtu.be/5IcGzNJXAY.
Paper
Full text
XRepair - Unifying Retrieval, Repair, and Evaluation for Explainable LLM-Based Vulnerability Fixes
Semantic Scholar · Computer Science · 2025
Abstract
This paper presents XRepair, a web-based tool for automated and explainable software vulnerability repair. XRepair integrates retrieval, generation, and evaluation into a single interactive framework. It augments large language models (LLMs) with knowledge retrieved from CWE/CVE datasets through both embedding-based and graph-based strategies. XRepair enables repairs that are contextualized with vulnerability metadata and related examples. The tool provides end-to-end functionalities, including users inputting a CWE/CVE identifier and vulnerable code snippet, configuring the retrieval strategy and LLM, and receiving repair recommendations. Unlike patch-only systems, the recommendations consist of an issue description, explicit repair guidance, and concrete code diffs. To assess repair quality, XRepair incorporates an LLM-as-a-Judge evaluation framework that scores outputs across five criteria, namely relevance, completeness, correctness, identification of vulnerable code, and guidance. This design supports reproducible comparison of retrieval strategies and produces transparent recommendations. Built using both the strategy and factory design patterns, XRepair allows new retrieval algorithms and data sources to be added. The tool and documentation are publicly available with a tool for comparative evaluation and practical application of explainable vulnerability repairs. The demo for XRepair can be accessed at https://youtu.be/5IcGzNJXAY.