VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Models

Yu Liu, Lang Gao, Mingxin Yang, Yu Xie, Ping Chen +2 more
6/11/2024
30 citations
cs.CRcs.AIcs.SE
benchmark-dataset

Official code: Sweetaroo/VulDetectBench (37 stars, C, MIT, last commit 2025-04-25).

Abstract

Large Language Models (LLMs) have training corpora containing large amounts of program code, greatly improving the model's code comprehension and generation capabilities. However, sound comprehensive research on detecting program vulnerabilities, a more specific task related to code, and evaluating the performance of LLMs in this more specialized scenario is still lacking.

Show full abstract

To address common challenges in vulnerability analysis, our study introduces a new benchmark, VulDetectBench, specifically designed to assess the vulnerability detection capabilities of LLMs. The benchmark comprehensively evaluates LLM's ability to identify, classify, and locate vulnerabilities through five tasks of increasing difficulty. We evaluate the performance of 17 models (both open- and closed-source) and find that while existing models can achieve over 80% accuracy on tasks related to vulnerability identification and classification, they still fall short on specific, more detailed vulnerability analysis tasks, with less than 30% accuracy, making it difficult to provide valuable auxiliary information for professional vulnerability mining. Our benchmark effectively evaluates the capabilities of various LLMs at different levels in the specific task of vulnerability detection, providing a foundation for future research and improvements in this critical area of code security. VulDetectBench is publicly available at https://github.com/Sweetaroo/VulDetectBench.

View on arXivView PDF

Code Implementations(1)

MIT

A Novel Benchmark evaluating the Deep Capability of Vulnerability Detection with Large Language Models

376C, PythonJun 6, 20241 years agoMIT

Similar Papers

Cite this paper

@article{liu2024vuldetectbench,
  title  = {VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Models},
  author = {Yu Liu and Lang Gao and Mingxin Yang and Yu Xie and Ping Chen and Xiaojin Zhang and Wei Chen},
  year   = {2024},
  eprint = {2406.07595},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.07595v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.07595.svg)](https://codeofpaper.com/paper/2406.07595)

Discussion