SecVulEval: Benchmarking LLMs for Real-World C/C++ Vulnerability Detection
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
Large Language Models (LLMs) have shown promise in various software engineering tasks, including vulnerability detection, but their evaluation remains limited by the quality of existing benchmarks. Most available vulnerability datasets provide only function-level labels, omit important program context, and suffer from inaccurate annotations, insufficient metadata, and duplicate samples. These limitations make it difficult to determine whether a model can accurately localize and understand real-world vulnerabilities.
This thesis introduces SecVulEval, a context-rich benchmark for fine-grained evaluation of vulnerability detection techniques on C/C++ code. It contains 25,440 vulnerable and fixed function samples covering 5,867 unique CVEs from 707 open-source projects between 1999 and 2024. The benchmark provides statement-level vulnerability annotations, paired vulnerable and fixed functions, vulnerability metadata, de-duplicated samples, and contextual information beyond isolated functions. Using SecVulEval, this thesis evaluates five state-of-the-art LLMs in standalone and multi-agent settings. The results show that current models are substantially limited in accurately localizing vulnerable statements. The best-performing configuration, a multi-agent system driven by Claude-3.7-Sonnet, achieves a statement-level F1-score of 23.83%. Although the multi-agent approach yields promising improvements, the results and failure analysis indicate that reliable fine-grained vulnerability detection and reasoning remain open challenges. SecVulEval therefore provides a foundation for developing and evaluating more accurate and context-aware vulnerability detection methods.