State of the Art of the Security of Code Generated by LLMs: A Multivocal Literature Review

AI-assisted programming has gained significant traction in recent years, primarily driven by advances in large language model (LLM) technologies. This growth has resulted in the development of tools such as ChatGPT and GitHub Copilot. However, the use of AI models for code generation presents a critical challenge: The generated code is prone to security vulnerabilities, raising concerns within the domain of secure software development. This study examines the current research landscape on the security implications of LLM-generated code from a software engineering perspective. To this end, we conducted a multivocal literature review (MLR) in accordance with the guidelines outlined by Kitchenham et al. and Garousi et al. The search encompassed five academic sources: IEEE Xplore, ACM, ScienceDirect, Springer Link, and Wiley Online Library; as well as two grey literature sources: Google Scholar and Google. We supplemented the selection by means of backward and forward snowballing techniques. Through Quasi-Gold’s automated search, we identified 2796 peer-reviewed studies, from which we selected 48 primary studies. The analysis revealed seven distinct categories of security vulnerabilities in LLM-generated code, six mitigation strategies and best practices, and four tools recommended for improving security in AI-assisted coding. While research on this issue remains in its early stages, initial findings highlight the need for caution when integrating AI-powered code generation into software development, as it may introduce vulnerabilities at a higher rate than human-written code. The vulnerabilities, mitigation strategies, and tools identified in this study can serve as valuable resources for developers seeking to use LLM-based programming assistants more securely and responsibly.

Authors

Institutions

Publication Details

Journal
Programming and Computer Software
Published
2025-12-01
DOI
https://doi.org/10.1134/s0361768825700446
Primary Topic
Law, AI, and Intellectual Property
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

State of the Art of the Security of Code Generated by LLMs: A Multivocal Literature Review

Juan Carlos Pérez-Arriaga, Xavier Limón, Leonardo Criollo Ramírez, Ángel J. Sánchez-García
Programming and Computer Software
Law, AI, and Intellectual Property
article

State of the Art of the Security of Code Generated by LLMs: A Multivocal Literature Review

Juan Carlos Pérez-Arriaga, Xavier Limón, Leonardo Criollo Ramírez, Ángel J. Sánchez-García
article en

Abstract

AI-assisted programming has gained significant traction in recent years, primarily driven by advances in large language model (LLM) technologies. This growth has resulted in the development of tools such as ChatGPT and GitHub Copilot. However, the use of AI models for code generation presents a critical challenge: The generated code is prone to security vulnerabilities, raising concerns within the domain of secure software development. This study examines the current research landscape on the security implications of LLM-generated code from a software engineering perspective. To this end, we conducted a multivocal literature review (MLR) in accordance with the guidelines outlined by Kitchenham et al. and Garousi et al. The search encompassed five academic sources: IEEE Xplore, ACM, ScienceDirect, Springer Link, and Wiley Online Library; as well as two grey literature sources: Google Scholar and Google. We supplemented the selection by means of backward and forward snowballing techniques. Through Quasi-Gold’s automated search, we identified 2796 peer-reviewed studies, from which we selected 48 primary studies. The analysis revealed seven distinct categories of security vulnerabilities in LLM-generated code, six mitigation strategies and best practices, and four tools recommended for improving security in AI-assisted coding. While research on this issue remains in its early stages, initial findings highlight the need for caution when integrating AI-powered code generation into software development, as it may introduce vulnerabilities at a higher rate than human-written code. The vulnerabilities, mitigation strategies, and tools identified in this study can serve as valuable resources for developers seeking to use LLM-based programming assistants more securely and responsibly.

Programming and Computer SoftwareVol. 51(8)
Universidad Veracruzana (MX), Universidad de Alcalá (ES)
Peace, Justice and strong institutions
Openalex Percentile: Top 13%
Law, AI, and Intellectual Property
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.