A Disguised Wolf Is More Harmful Than a Toothless Tiger: Adaptive Malicious Code Injection Backdoor Attack Leveraging User Behavior as Triggers
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
In recent years, large language models (LLMs) have made significant progress in the field of code generation. However, as more and more users rely on these models for software development, the security risks associated with code generation models have become increasingly significant. Studies have shown that traditional deep learning robustness issues also negatively impact the field of code generation. In this paper, we first present the game-theoretic model that focuses on security issues in code generation scenarios. This framework outlines possible scenarios and patterns where attackers could spread malicious code models to create security threats. We also pointed out for the first time that the attackers can use backdoor attacks to dynamically adjust the timing of malicious code injection, which will release varying degrees of malicious code depending on the skill level of the user. Through extensive experiments on leading code generation models, we validate our proposed game-theoretic model and highlight the significant threats that these new attack scenarios pose to the safe use of code models.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 13 of its 20 references that are in the map. First posted on arXiv 19 Aug 2024.
Builds on
13 of 20 references.
Closest ancestors · 2
Same direction, newest first
- 2023Stealthy Backdoor Attack for Code Models6 Jan
- 2021CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning25 Oct
Other references · 11
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2022A Systematic Evaluation of Large Language Models of Codecited by 363
- 2024Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based Agentscited by 137
- 2020Backdoor Attacks Against Deep Learning Systems in the Physical Worldcited by 134
- 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generationcited by 73
- 2020Backdoors in Neural Models of Source Codecited by 41
- 2023BadRL: Sparse Targeted Backdoor Attack Against Reinforcement Learningcited by 30
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024Double Backdoored: Converting Code Large Language Model Backdoors to Traditional Malware via Adversarial Instruction Tuning Attacks
- 2026Beware EviLLM: Enabling Vulnerability Injection via Large Language Models
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models
- 2024SABER: Model-agnostic Backdoor Attack on Chain-of-Thought in Neural Code Generation
- 2024Measuring Impacts of Poisoning on Model Parameters and Embeddings for Large Language Models of Code
- 2024Mitigating Backdoor Threats to Large Language Models: Advancement and Challenges
- 2024Exploring Vulnerabilities and Protections in Large Language Models: A Survey
- 2025System Prompt Poisoning: Persistent Attacks on Large Language Models Beyond User Injection