VulKey: Automated Vulnerability Repair Guided by Domain-Specific Repair Patterns
Jia Li, Zhuangbin Chen, Yuxin Su, and Michael R. Lyu

TL;DR
VulKey introduces a hierarchical, knowledge-guided approach for automated vulnerability repair using large language models, significantly improving accuracy and generalizability over existing methods.
Contribution
The paper presents VulKey, a novel framework that leverages hierarchical expert security knowledge to guide LLM-based vulnerability repair, enhancing effectiveness and cross-language applicability.
Findings
VulKey achieves 31.5% repair accuracy on PrimeVul, outperforming baselines.
The approach surpasses VulMaster and GPT-5 in real-world vulnerability repair.
VulKey demonstrates strong cross-language and cross-model generalizability.
Abstract
The increasing prevalence of software vulnerabilities highlights the need for effective Automatic Vulnerability Repair (AVR) tools. While LLM-based approaches are promising, they struggle to incorporate structured security knowledge from sources like CWE and NVD. Current methods either use this information superficially by concatenating the CWE-ID into the input prompt, yielding negligible benefits, or rely on few-shot learning with rigid, non-generalizable examples, which limits their effectiveness in real-world scenarios. To address this gap, we propose VulKey, an LLM-based AVR framework that leverages a hierarchical abstraction of expert knowledge to guide patch generation. Our novel three-level abstraction formulates repair strategies in terms of CWE type, syntactic actions, and semantic key elements. This approach captures the essence of a security fix with greater generality…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
