Abstract
The increasing complexity of software and demands for rapid deployment have pushed the software industry to rely more on large language models (LLMs) in developing source code. However, as this technology is still relatively recent, questions can arise about the safety of the generated code. This paper presents an analysis of seven LLMs with respect to the presence of vulnerabilities within source code. Our findings show that LLMs are more likely to produce vulnerable web applications than vulnerable C programs, and that vulnerabilities are more likely to occur when program size and complexity increases.
DOI
https://doi.org/10.5038/2378-0789.9.1.1156
Recommended Citation
Richards-Perhatch, James; Milander, Mitchell; Halvorsen, James M.; and Gebremedhin, Assefaw
(2026)
"Are Large Language Models Safe? A Vulnerability Analysis of Generated Source Code,"
Military Cyber Affairs: Vol. 9
:
Iss.
1
, Article 7.
https://doi.org/10.5038/2378-0789.9.1.1156
Available at:
https://digitalcommons.usf.edu/mca/vol9/iss1/7
Included in
Computer and Systems Architecture Commons, Digital Communications and Networking Commons, Other Computer Engineering Commons