Security of LLM-generated Code: A Comparative Analysis

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Morkonda, Srivathsan G, Selim, Mahmoud, Assal, Hala
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911707330248704
author Morkonda, Srivathsan G
Selim, Mahmoud
Assal, Hala
author_facet Morkonda, Srivathsan G
Selim, Mahmoud
Assal, Hala
contents 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. 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.
format Preprint
id arxiv_https___arxiv_org_abs_2605_23091
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Security of LLM-generated Code: A Comparative Analysis
Morkonda, Srivathsan G
Selim, Mahmoud
Assal, Hala
Software Engineering
Artificial Intelligence
Cryptography and Security
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. 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.
title Security of LLM-generated Code: A Comparative Analysis
topic Software Engineering
Artificial Intelligence
Cryptography and Security
url https://arxiv.org/abs/2605.23091