Skip to content
Search
paperMay 2026Unreviewed

An Empirical Evaluation of LLM-Generated Code Security Across Prompting Methods

Mohammed Kharma, Ahmed Sabbah, Mohammad Alkhanafseh, Mohammad Hammoudeh, David Mohaisen

Abstract

The growing use of Large Language Models (LLMs) for automated code generation has enhanced software development efficiency, but often at the cost of security. Generated code frequently overlooks critical concerns, leaving it vulnerable to issues such as weak encryption and improper input validation. To investigate this problem, we present a comprehensive empirical evaluation of the security quality of LLM-generated code across five LLMs and four programming languages (Java, C++, C, and Python),

Categories

Cite

@misc{kharma2026empirical,
  title = {{An Empirical Evaluation of LLM-Generated Code Security Across Prompting Methods}},
  author = {Mohammed Kharma and Ahmed Sabbah and Mohammad Alkhanafseh and Mohammad Hammoudeh and David Mohaisen},
  year = {2026},
  month = may,
  eprint = {2605.24298},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.24298}
}