VulWeaver: Weaving Broken Semantics for Grounded Vulnerability Detection

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Cao, Yiheng, Chen, Yihao, Hu, Xin, Chen, Bihuan, Deng, Jiayi, Zhou, Zhuotong, Wu, Susheng, Huang, Yiheng, Du, Xueying, Chen, Xingman, Li, Miaohua, Peng, Xin
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917401726025728
author Cao, Yiheng
Chen, Yihao
Hu, Xin
Chen, Bihuan
Deng, Jiayi
Zhou, Zhuotong
Wu, Susheng
Huang, Yiheng
Du, Xueying
Chen, Xingman
Li, Miaohua
Peng, Xin
author_facet Cao, Yiheng
Chen, Yihao
Hu, Xin
Chen, Bihuan
Deng, Jiayi
Zhou, Zhuotong
Wu, Susheng
Huang, Yiheng
Du, Xueying
Chen, Xingman
Li, Miaohua
Peng, Xin
contents Detecting vulnerabilities in source code remains critical yet challenging, as conventional static analysis tools construct inaccurate program representations, while existing LLM-based approaches often miss essential vulnerability context and lack grounded reasoning. To mitigate these challenges, we introduce VulWeaver, a novel LLM-based approach that weaves broken program semantics into accurate representations and extracts holistic vulnerability context for grounded vulnerability detection. Specifically, VulWeaver first constructs an enhanced unified dependency graph (UDG) by integrating deterministic rules with LLM-based semantic inference to address static analysis inaccuracies. It then extracts holistic vulnerability context by combining explicit contexts from program slicing with implicit contexts, including usage, definition, and declaration information. Finally, VulWeaver employs meta-prompting with vulnerability type specific expert guidelines to steer LLMs through systematic reasoning, aggregated via majority voting for robustness. Extensive experiments on PrimeVul4J dataset have demonstrated that VulWeaver achieves a F1-score of 0.75, outperforming state-of-the-art learning-based, LLM-based, and agent-based baselines by 23%, 15%, and 60% in F1-score, respectively. VulWeaver has also detected 26 true vulnerabilities across 9 realworld Java projects, with 15 confirmed by developers and 5 CVE identifiers assigned. In industrial deployment, VulWeaver identified 40 confirmed vulnerabilities in an internal repository.
format Preprint
id arxiv_https___arxiv_org_abs_2604_10767
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle VulWeaver: Weaving Broken Semantics for Grounded Vulnerability Detection
Cao, Yiheng
Chen, Yihao
Hu, Xin
Chen, Bihuan
Deng, Jiayi
Zhou, Zhuotong
Wu, Susheng
Huang, Yiheng
Du, Xueying
Chen, Xingman
Li, Miaohua
Peng, Xin
Software Engineering
Detecting vulnerabilities in source code remains critical yet challenging, as conventional static analysis tools construct inaccurate program representations, while existing LLM-based approaches often miss essential vulnerability context and lack grounded reasoning. To mitigate these challenges, we introduce VulWeaver, a novel LLM-based approach that weaves broken program semantics into accurate representations and extracts holistic vulnerability context for grounded vulnerability detection. Specifically, VulWeaver first constructs an enhanced unified dependency graph (UDG) by integrating deterministic rules with LLM-based semantic inference to address static analysis inaccuracies. It then extracts holistic vulnerability context by combining explicit contexts from program slicing with implicit contexts, including usage, definition, and declaration information. Finally, VulWeaver employs meta-prompting with vulnerability type specific expert guidelines to steer LLMs through systematic reasoning, aggregated via majority voting for robustness. Extensive experiments on PrimeVul4J dataset have demonstrated that VulWeaver achieves a F1-score of 0.75, outperforming state-of-the-art learning-based, LLM-based, and agent-based baselines by 23%, 15%, and 60% in F1-score, respectively. VulWeaver has also detected 26 true vulnerabilities across 9 realworld Java projects, with 15 confirmed by developers and 5 CVE identifiers assigned. In industrial deployment, VulWeaver identified 40 confirmed vulnerabilities in an internal repository.
title VulWeaver: Weaving Broken Semantics for Grounded Vulnerability Detection
topic Software Engineering
url https://arxiv.org/abs/2604.10767