GraftyVul: Synthesising Insecure Programs Through Real-World Vulnerability Grafting

📅 2026-08-28
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
GraftyVul通过将真实漏洞移植到开源项目中,生成多样且可执行的脆弱程序,解决了现有漏洞数据集在多样性、可复现性和真实性上的不足。
📝 Abstract
Vulnerability datasets underpin a wide range of security research, including vulnerability detection, automated remediation, and secure code generation. However, existing datasets sacrifice at least one of three desirable properties: diversity (of language or vulnerability type), reproducibility/executability, or realism. We therefore present GraftyVul, a system that constructs vulnerable programs by grafting real-world vulnerabilities into open-source projects. This grounds the dataset in vulnerabilities observed in real-world contexts while harnessing known good build and test environments, enabling exploit-verification scripts to guarantee that an introduced vulnerability successfully alters a program's behaviour. Using GraftyVul, we generate 212 verified and exploitable vulnerable programs spanning five programming languages (Python, TypeScript, Java, Go, and C#) across 23 CWE categories. To evaluate fidelity, we introduce a language- and context-agnostic semantic embedding that compares vulnerabilities by sink, mechanism and host-feature rather than surface code. This approach outperforms standard code embeddings on cross-language clone and CWE classification. These embeddings demonstrate that GraftyVul samples retain a strong semantic signature to their source vulnerability. We additionally compare GraftyVul against 13 widely used datasets, where it attains competitive diversity while being the only reproducible-exploit dataset with broad language and CWE coverage. Finally, we illustrate GraftyVul's practical utility through an industrial case study evaluating a production vulnerability remediation system.
Problem

Research questions and friction points this paper is trying to address.

vulnerability datasets
diversity
reproducibility
realism
Innovation

Methods, ideas, or system contributions that make the work stand out.

vulnerability grafting
reproducibility
semantic embedding
O
Omri Ram
University of New South Wales, Australia; Nullify, Australia
M
Mitchell Horner
University of New South Wales, Australia; Nullify, Australia
R
Ron Van der Meyden
University of New South Wales, Australia
A
Alsharif Abuadbba
CSIRO, Australia
Hammond Pearce
Hammond Pearce
Senior Lecturer (a.k.a. Assistant Prof), UNSW School of Computer Science and Engineering
CybersecurityEmbedded SystemsHardware designLarge Language Models