Cited by 61Software Engineering ResearchWeb Application Security VulnerabilitiesAdversarial Robustness in Machine Learning

LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluations

Tony, Catherine, Mutas, Markus, Ferreyra, Nicolás E. Díaz, Scandariato, Riccardo·2023·2023 IEEE/ACM 20th International Conference on Mining Software Repositories (MSR)

Abstract

Large Language Models (LLMs) like Codex are powerful tools for performing code completion and code generation tasks as they are trained on billions of lines of code from publicly available sources. Moreover, these models are capable of generating code snippets from Natural Language (NL) descriptions by learning languages and programming practices from public GitHub repositories. Although LLMs promise an effortless NL-driven deployment of software applications, the security of the code they generate has not been extensively investigated nor documented. In this work, we present LLMSecEval, a dataset containing 150 NL prompts that can be leveraged for assessing the security performance of such models. Such prompts are NL descriptions of code snippets prone to various security vulnerabilities listed in MITRE’s Top 25 Common Weakness Enumeration (CWE) ranking. Each prompt in our dataset comes with a secure implementation example to facilitate comparative evaluations against code produced by LLMs. As a practical application, we show how LLMSecEval can be used for evaluating the security of snippets automatically generated from NL descriptions.

Integrity signals

Registry

Crossref · 10.1109/msr59073.2023.00084

Cites

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • LLMSecEval is a dataset of 150 natural language prompts based on the narrative descriptions of various vulnerabilities in MITRE's Top 25 CWE rankings.

    “LLMSecEval (Tony et al. 2023) is a dataset of 150 natural language prompts based on the narrative descriptions of various vulnerabilities that appear in MITRE's Top 25 Common Weakness Enumeration (CWE) rankings.”

    From When LLMs meet cybersecurity: a systematic literature review (2025) · cites this paper as Tony et al. 2023

  • Post hoc filtering and static-analysis-based rejection can remove some unsafe outputs, but they act after generation and do not shape the underlying policy that repeatedly explores unsafe code patterns.

    “Post hoc filtering and static-analysis-based rejection can remove some unsafe outputs, but they act after generation and do not shape the underlying policy that repeatedly explores unsafe code patterns [5,6,7].”

The citation lists haven’t been fetched yet

References 13 · Cited by 61

Authors
Tony, C., Mutas, M., Ferreyra, N. E. D., & Scandariato, R.
Affiliations
Hamburg University of Technology (DE)
Venue
2023 IEEE/ACM 20th International Conference on Mining Software Repositories (MSR)
Publisher
IEEE
Published
2023-05
Pages
588-592
OpenAlex
W4384026520
Cited by
61
References
13
Citations by year
2026: 21 · 2025: 26 · 2024: 13 · 2023: 1
FWCI
15.68
Type
conference paper
Language
en
Open access
closed
Locations
  • International Conference on Mining Software Repositories (MSR) (publishedVersion)
  • tub.dok (Hamburg University of Technology) (submittedVersion)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Information Systems › Web Application Security Vulnerabilities
  • Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
Keywords
large language models, code generation security, natural language prompts, security vulnerabilities, Common Weakness Enumeration, secure code generation, code completion

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review