TOSSS: a CVE-based Software Security Benchmark for Large Language Models
Organizations: Modat, The Hague, The Netherlands
Abstract
With their increasing capabilities, Large Language Models (LLMs) are now used across many industries. They have become useful tools for software engineers and support a wide range of development tasks. As LLMs are increasingly used in software development workflows, a critical question arises: are LLMs good at software security? At the same time, organizations worldwide invest heavily in cybersecurity to reduce exposure to disruptive attacks. The integration of LLMs into software engineering workflows may introduce new vulnerabilities and weaken existing security efforts. We introduce TOSSS (Two-Option Secure Snippet Selection), a benchmark that measures the ability of LLMs to choose between secure and vulnerable code snippets. Existing security benchmarks for LLMs cover only a limited range of vulnerabilities. In contrast, TOSSS relies on the CVE database and provides an extensible framework that can integrate newly disclosed vulnerabilities over time. Our benchmark gives each model a security score between 0 and 1 based on its behavior; a score of 1 indicates that the model always selects the secure snippet, while a score of 0 indicates that it always selects the vulnerable one. We evaluate 14 widely used open-source and closed-source models on C/C++ and Java code and observe scores ranging from 0.48 to 0.89. LLM providers already publish many benchmark scores for their models, and TOSSS could become a complementary security-focused score to include in these reports.
Figures & tables
| Benchmark | LLM Task | Security Evaluation | Test Case Generation |
| CyberSecEval ( Bhatt et al., 2023 ) | Code Completion | Static Analyzer | Mining of Open-Source Repositories |
| SALLM ( Siddiq et al., 2024 ) | Code Generation | Static Analyzer | Stack Overflow Mining |
| LLMSecCode ( Rydén et al., 2024 ) | Code Generation + Code Repair | Static Analyzer | Existing Research Dataset |
| Wang et al. ( Wang et al., 2024 ) | Code Generation + Code Repair | Custom Automated Tests | Manual Curation |
| CodeLMSec ( Hajipour et al., 2024 ) | Code Generation | Static Analyzer | LLM-Based |
| Dai et al. ( Dai et al., 2025 ) | Code Generation | Static Analyzer | Filtered Research Dataset |
| Model | C/C++ | Java | ||
|---|---|---|---|---|
| Hintless | w/Hint | Hintless | w/Hint | |
| Random Guess | 0.5 | 0.5 | 0.5 | 0.5 |
| GLM-5 ( Zeng et al., 2026 ) | 0.878 | 0.880 | 0.836 | 0.838 |
| GPT-5.4 ( Singh et al., 2025 ) | 0.866 | 0.868 | 0.846 | 0.852 |
| Claude Opus 4.6 ( Anthropic, 2024 ) | 0.864 | 0.884 | 0.834 | 0.844 |
| Kimi K2.5 ( Team et al., 2026 ) | 0.858 | 0.890 | 0.814 | 0.836 |
LLM Safety Benchmarks
Large language model safety benchmarks test whether AI systems avoid harm while remaining helpful across realistic tasks, users, and deployment settings.
See all 284 papers