Poisoning Programs by Un-Repairing Code: Security Concerns of AI-generated Code
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
AI-based code generators have gained a fundamental role in assisting developers in writing software starting from natural language (NL). However, since these large language models are trained on massive volumes of data collected from unreliable online sources (e.g., GitHub, Hugging Face), AI models become an easy target for data poisoning attacks, in which an attacker corrupts the training data by injecting a small amount of poison into it, i.e., astutely crafted malicious samples. In this position paper, we address the security of AI code generators by identifying a novel data poisoning attack that results in the generation of vulnerable code. Next, we devise an extensive evaluation of how these attacks impact state-of-the-art models for code generation. Lastly, we discuss potential solutions to overcome this threat.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 12 of its 19 references that are in the map. First posted on arXiv 11 Mar 2024.
Builds on
12 of 19 references.
Closest ancestors · 4
Same direction, newest first
- 2022Poison Attack and Defense on Deep Source Code Processing Models31 Oct
- 2022Machine Learning Security against Data Poisoning: Are We There Yet?12 Apr
- 2021Putting words into the system's mouth: A targeted attack on neural machine translation using monolingual data poisoning12 Jul
- 2021Hidden Backdoors in Human-Centric Language Models1 May
Other references · 8
- 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
- 2018Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networkscited by 580
- 2018Poison Frogs! Targeted Clean-Label Poisoning Attacks on Neural Networkscited by 519
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
- 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
- 2020Backdoors in Neural Models of Source Codecited by 41
- 2022Who Evaluates the Evaluators? On Automatic Metrics for Assessing AI-based Offensive Code Generatorscited by 11
- 2020A Targeted Attack on Black-Box Neural Machine Translation with Parallel Data Poisoningcited by 4
Built on by
Citing papers per year: 2024: 1; 2025: 4; 2026: 1.
6 papers.
- 2025RedCoder: Automated Multi-Turn Red Teaming for Code LLMscited by 9
- 2025MOCHA: Are Code Language Models Robust Against Multi-Turn Malicious Coding Prompts?cited by 7
- 2025Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilitiescited by 5
- 2024Optimizing AI-Assisted Code Generationcited by 2
- 2025Detecting Stealthy Data Poisoning Attacks in AI Code Generatorscited by 1
- 2026Comprendia: AI-Augmented Code Comprehensioncited by 0
- 2026Comprendia: AI-Augmented Code Comprehension10 Aug 2026
- 2025Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilities30 Sep 2025
- 2025Detecting Stealthy Data Poisoning Attacks in AI Code Generators29 Aug 2025
- 2025MOCHA: Are Code Language Models Robust Against Multi-Turn Malicious Coding Prompts?25 Jul 2025
- 2025RedCoder: Automated Multi-Turn Red Teaming for Code LLMs25 Jun 2025
- 2024Optimizing AI-Assisted Code Generation14 Dec 2024
Similar, not cited
Close in wording, no citation either way
- 2023Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attacks
- 2023TrojanedCM: A Repository of Trojaned Large Language Models of Code
- 2023Forcing Generative Models to Degenerate Ones: The Power of Data Poisoning Attacks
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generation
- 2025Automated Vulnerability Validation and Verification: A Large Language Model Approach
- 2022Poisoning Attacks and Defenses on Artificial Intelligence: A Survey
- 2026CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generation
- 2024Double Backdoored: Converting Code Large Language Model Backdoors to Traditional Malware via Adversarial Instruction Tuning Attacks