From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Security
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have emerged as powerful tools for automating programming tasks, including security-related ones. However, they can also introduce vulnerabilities during code generation, fail to detect existing vulnerabilities, or report nonexistent ones. This systematic literature review investigates the security benefits and drawbacks of using LLMs for code-related tasks. In particular, it focuses on the types of vulnerabilities introduced by LLMs when generating code. Moreover, it analyzes the capabilities of LLMs to detect and fix vulnerabilities, and examines how prompting strategies impact these tasks. Finally, it examines how data poisoning attacks impact LLMs performance in the aforementioned tasks.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 77 of its 159 references that are in the map. First posted on arXiv 19 Dec 2024.
Builds on
77 of 159 references.
References · 77
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 832
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
- 2021Knowledge distillation: A good teacher is patient and consistentcited by 259
- 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
- 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
38 more
- 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 144
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
- 2024IRIS: LLM-Assisted Static Analysis for Detecting Security Vulnerabilitiescited by 103
- 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 97
- 2022Lost at C: A User Study on the Security Implications of Large Language Model Code Assistantscited by 91
- 2019Slither: A Static Analysis Framework For Smart Contractscited by 89
- 2023Getting pwn'd by AI: Penetration Testing with Large Language Modelscited by 83
- 2023How Secure is Code Generated by ChatGPT?cited by 81
- 2024Instruction Tuning for Secure Code Generationcited by 68
- 2022Is GitHub's Copilot as Bad as Humans at Introducing Vulnerabilities in Code?cited by 67
- 2023GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysiscited by 65
- 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 60
- 2023Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilitiescited by 59
- 2021Vulnerability Detection with Fine-grained Interpretationscited by 56
- 2023How Novices Use LLM-Based Code Generators to Solve CS1 Coding Tasks in a Self-Paced Learning Environmentcited by 56
- 2023CodeLMSec Benchmark: Systematically Evaluating and Finding Security Vulnerabilities in Black-Box Code Language Modelscited by 55
- 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 52
- 2023Prompt-Enhanced Software Vulnerability Detection Using ChatGPTcited by 51
- 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
- 2023No Need to Lift a Finger Anymore? Assessing the Quality of Code Generation by ChatGPTcited by 47
- 2024Current state of LLM Risks and AI Guardrailscited by 46
- 2023Large Language Models for Code Analysis: Do LLMs Really Do Their Job?cited by 45
- 2023ChatGPT for Vulnerability Detection, Classification, and Repair: How Far Are We?cited by 44
- 2023When ChatGPT Meets Smart Contract Vulnerability Detection: How Far Are We?cited by 42
- 2024Large Language Model for Vulnerability Detection and Repair: Literature Review and the Road Aheadcited by 42
- 2019Getafix: Learning to Fix Bugs Automaticallycited by 41
- 2024Finetuning Large Language Models for Vulnerability Detectioncited by 40
- 2022Transformer-Based Language Models for Software Vulnerability Detectioncited by 39
- 2023SALLM: Security Assessment of Generated Codecited by 39
- 2023Security Weaknesses of Copilot-Generated Code in GitHub Projects: An Empirical Studycited by 38
- 2021Neural Transfer Learning for Repairing Security Vulnerabilities in C Codecited by 36
- 2023Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attackscited by 33
- 2024Chain-of-Thought Prompting of Large Language Models for Discovering and Fixing Software Vulnerabilitiescited by 31
- 2023Assessing the Security of GitHub Copilot Generated Code -- A Targeted Replication Studycited by 26
- 2024LLMs in Web Development: Evaluating LLM-Generated PHP Code Unveiling Vulnerabilities and Limitationscited by 22
- 2024A Case Study of LLM for Automated Vulnerability Repair: Assessing Impact of Reasoning and Patch Validation Feedbackcited by 22
- 2021VELVET: a noVel Ensemble Learning approach to automatically locate VulnErable sTatementscited by 20
50 most cited of 77 All 77 (JSON)
Built on by
Citing papers per year: 2025: 4; 2026: 6.
10 papers.
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 11
- 2025Trust Me, I Know This Function: Hijacking LLM Static Analysis using Biascited by 3
- 2025Multi-Agent Framework for Threat Mitigation and Resilience in AI-Based Systemscited by 2
- 2026PromptAudit: Auditing Prompt Sensitivity in LLM-Based Vulnerability Detectioncited by 2
- 2025Secure Code Generation at Scale with Reflexioncited by 1
- 2026Constrained Code Generation with Discrete Diffusioncited by 1
- 2026Refusal Evaluation in Coding LLMs and Code Agents: A Systematic Review of Thirteen Malicious-Code Prompt Corpora (2023-2025)cited by 1
- 2026Large Language Models at the Intersection of Software Engineering and Software Security:An Evidence-Centered Structured Survey and Research Agendacited by 0
- 2026Metrics Failure in LLM-Based Code Vulnerability Repair: An Empirical Study and a Change-Aware Screencited by 0
- 2026Security in LLM-Assisted Coding: A Systematic Literature Reviewcited by 0
- 2026Security in LLM-Assisted Coding: A Systematic Literature Review11 Oct 2026
- 2026Metrics Failure in LLM-Based Code Vulnerability Repair: An Empirical Study and a Change-Aware Screen22 Sep 2026
- 2026Large Language Models at the Intersection of Software Engineering and Software Security:An Evidence-Centered Structured Survey and Research Agenda21 Aug 2026
- 2026PromptAudit: Auditing Prompt Sensitivity in LLM-Based Vulnerability Detection22 May 2026
- 2026Refusal Evaluation in Coding LLMs and Code Agents: A Systematic Review of Thirteen Malicious-Code Prompt Corpora (2023-2025)19 May 2026
- 2026Constrained Code Generation with Discrete Diffusion16 May 2026
- 2025Multi-Agent Framework for Threat Mitigation and Resilience in AI-Based Systems29 Dec 2025
- 2025Secure Code Generation at Scale with Reflexion5 Nov 2025
- 2025Trust Me, I Know This Function: Hijacking LLM Static Analysis using Bias24 Aug 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysis5 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2026Poster: Rethinking Security in LLM Code Generation through Real-World Risk Scenarios
- 2025Explicit Vulnerability Generation with LLMs: An Investigation Beyond Adversarial Attacks
- 2026An Empirical Evaluation of LLM-Generated Code Security Across Prompting Methods
- 2025When Code Crosses Borders: A Security-Centric Study of LLM-based Code Translation ↗
- 2024Software Vulnerability and Functionality Assessment using LLMs
- 2026Enhancing Reliability in LLM-Based Secure Code Generation
- 2025Smoke and Mirrors: Jailbreaking LLM-based Code Generation via Implicit Malicious Prompts
- 2025Running in CIRCLE? A Simple Benchmark for LLM Code Interpreter Security