Security of LLM-generated Code: A Comparative Analysis

Srivathsan G Morkonda, Mahmoud Selim, Hala Assal
5/21/2026
cs.SEcs.AIcs.CR

No confident code implementation found for this paper.

Abstract

The majority of software developers use or are planning to use Artificial Intelligence (AI) tools in their development processes. Their top reasons include improving productivity and faster learning.

Show full abstract

In fact, Large Language Model (LLM)-generated code is currently in production, including in major tech companies. However, concerns were raised about the risks associated with the use of AI tools to generate code. In this paper, we focus our attention on the risks to software security. We empirically evaluate the security of code generated by seven popular LLMs. We build upon previous work to mimic the behaviours of developers when using LLMs to generate code. Our results show that all seven LLMs that we have evaluated generate code that contains vulnerabilities, the majority of which are of critical or high severity.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{morkonda2026security,
  title  = {Security of LLM-generated Code: A Comparative Analysis},
  author = {Srivathsan G Morkonda and Mahmoud Selim and Hala Assal},
  year   = {2026},
  eprint = {2605.23091},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.23091v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.23091.svg)](https://codeofpaper.com/paper/2605.23091)

Discussion