PrimeVul
Models classify C and C++ functions as vulnerable or not, with a paired setting that pairs each vulnerable function with its patch.
228,800 safe and 6,968 vulnerable C and C++ functions over about 140 CWEs. Two labeling methods: ONEFUNC marks a function vulnerable only when the fixing commit touched that function alone, and NVDCHECK cross-references CVE text. The current release is v0.1 and no v2 exists. Published at ICSE 2025.
In the authors’ words
In the context of the rising interest in code language models (code LMs) and vulnerability detection, we study the effectiveness of code LMs for detecting vulnerabilities. Our analysis reveals significant shortcomings in existing vulnerability datasets, including poor data quality, low label accuracy, and high duplication rates, leading to unreliable model performance in realistic vulnerability detection scenarios. Additionally, the evaluation methods used with these datasets are not representative of real-world vulnerability detection. To address these challenges, we introduce PrimeVul, a new dataset for training and evaluating code LMs for vulnerability detection. PrimeVul incorporates a novel set of data labeling techniques that achieve comparable label accuracy to human-verified benchmarks while significantly expanding the dataset. It also implements a rigorous data de-duplication and chronological data splitting strategy to mitigate data leakage issues, alongside introducing more realistic evaluation metrics and settings. This comprehensive approach aims to provide a more accurate assessment of code LMs' performance in real-world conditions. Evaluating code LMs on PrimeVul reveals that existing benchmarks significantly overestimate the performance of these models. For instance, a state-of-the-art 7B model scored 68.26% F1 on BigVul but only 3.09% F1 on PrimeVul. Attempts to improve performance through advanced training techniques and larger models like GPT-3.5 and GPT-4 were unsuccessful, with results akin to random guessing in the most stringent settings. These findings underscore the considerable gap between current capabilities and the practical requirements for deploying code LMs in security roles, highlighting the need for more innovative research in this domain.
- Level
- Expert Specialists with years of training, often over hours of work
- Scored
- Checked automatically A program checks the result against an answer key, unit tests or the expected final state.
- Answers
- Multiple choice
Gemma 2 27B leads with 63%
Best score per model as labs report them in their own cards. Labs pick their own settings, so these compare less cleanly than independent runs.
- 1
Gemma 2 27B 63%
- 2
qwen3-coder-next 48.3%
| # | Model | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | | 63% | Jul 2024 | Model card | |
| 2 | | 48.3% | Feb 2026 | Model card |
Scores over time
All the scores we have, one dot each, so a model tested at several settings appears more than once.
Labs report it only in system cards
We read the headline results of 479 launch posts from 51 labs, and none of them list this benchmark. Some system cards do, below.
2 system cards report it, from 2 labs
Besides launch posts, we read the system cards, model cards and technical reports labs publish with a release. They report far more, including safety and frontier-risk tests.
| Date | Document | Score | As the document writes it | Section |
|---|---|---|---|---|
| 28 Feb 2026 | | 48.3 | PrimeVul-Paired accuracy, greedy. F1 51.37, P-C 0.88, P-V 53.01, P-B 41.29, P-R 4.64 (Table 15) | Cyber risk |
| 31 Jul 2024 | | 63 | PrimeVul, accuracy (Table 20). PrimeVul Paired: 50% | Cyber risk |
More in Cybersecurity
- ExploitGym In use 869 real-vulnerability exploit-development tasks (userspace, V8, Linux kernel). Success means capturing a flag through the intended vulnerability. GPT-6 Astra 42.4%
- ExploitBench In use 41 recent V8 JavaScript-engine N-day vulnerabilities. Progress measured by 16 grader-verified capability flags across five tiers. GPT-6 Astra 100%
- CWE-bench In use Agents audit a repository and write a patch for a security flaw, without being told where the bug is. Covers six programming languages.
Gemini 4 Carbon 71%
- Real-world vulnerability discovery In use Agents search popular open-source codebases to rediscover about 1,200 recent confirmed vulnerabilities across many languages. Reports share discovered.
Gemini 4 Argon 86%
- Artificial Analysis Cyber Index In use Agents do enterprise cyber defense tasks from three benchmarks, CWE-Bench-AA, DeepsecBench-AA and CyberGym-E2E-AA, combined into one success rate.
Mistral Large 4 (Le Chonk, open weights) 51%
- Big Sleep Evaluation (Google) In use Agents search large real codebases such as Chrome and Safari for critical, hard to find vulnerabilities. Scored by pass@1 success rate, run without safety guardrails.
Gemini 3.5 Flash Cyber 72%