mlsanityData to 14 Oct 2026

Double Backdoored: Converting Code Large Language Model Backdoors to Traditional Malware via Adversarial Instruction Tuning Attacks

arXiv 2404.18567 ↗First posted 29 Apr 2024cs.CRcited by 2

On the map: LLM safety and security → Backdoor and data poisoning attacks

Abstract (arXiv)

Instruction-tuned Large Language Models designed for coding tasks are increasingly employed as AI coding assistants. However, the cybersecurity vulnerabilities and implications arising from the widespread integration of these models are not yet fully understood due to limited research in this domain. This work investigates novel techniques for transitioning backdoors from the AI/ML domain to traditional computer malware, shedding light on the critical intersection of AI and cyber/software security. To explore this intersection, we present MalInstructCoder, a framework designed to comprehensively assess the cybersecurity vulnerabilities of instruction-tuned Code LLMs. MalInstructCoder introduces an automated data poisoning pipeline to inject malicious code snippets into benign code, poisoning instruction fine-tuning data while maintaining functional validity. It presents two practical adversarial instruction tuning attacks with real-world security implications: the clean prompt poisoning attack and the backdoor attack. These attacks aim to manipulate Code LLMs to generate code incorporating malicious or harmful functionality under specific attack scenarios while preserving intended functionality. We conduct a comprehensive investigation into the exploitability of the code-specific instruction tuning process involving three state-of-the-art Code LLMs: CodeLlama, DeepSeek-Coder, and StarCoder2. Our findings reveal that these models are highly vulnerable to our attacks. Specifically, the clean prompt poisoning attack achieves the ASR@1 ranging from over 75% to 86% by poisoning only 1% (162 samples) of the instruction fine-tuning dataset. Similarly, the backdoor attack achieves the ASR@1 ranging from 76% to 86% with a 0.5% poisoning rate. Our study sheds light on the critical cybersecurity risks posed by instruction-tuned Code LLMs and highlights the urgent need for robust defense mechanisms.

Key facts. Cited by 2 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 31 of its 52 references that are in the map. First posted on arXiv 29 Apr 2024.

Builds on

31 of 52 references.

Closest ancestors · 3

Same direction, newest first

  1. 2023On the Exploitability of Instruction Tuning28 Jun
  2. 2023Backdooring Neural Code Search27 May
  3. 2023Stealthy Backdoor Attack for Code Models6 Jan

Other references · 28

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  5. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  6. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  7. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
  8. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
  9. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  10. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,332
  11. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  12. 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
16 more
  1. 2023StarCoder: may the source be with you!cited by 799
  2. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  3. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  4. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
  5. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
  6. 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 189
  7. 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 152
  8. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 138
  9. 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
  10. 2022Is GitHub's Copilot as Bad as Humans at Introducing Vulnerabilities in Code?cited by 67
  11. 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 60
  12. 2023Prompt Stealing Attacks Against Text-to-Image Generation Modelscited by 51
  13. 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generationcited by 50
  14. 2020Backdoors in Neural Models of Source Codecited by 41
  15. 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 33
  16. 2023AI-assisted Code Authoring at Scale: Fine-tuning, deploying, and mixed methods evaluationcited by 21

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 1.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Breaking Customized LLMs for Coding: Automated Red Teaming for Instruction Backdoor Attacks
  2. 2023Instructions as Backdoors: Backdoor Vulnerabilities of Instruction Tuning for Large Language Models
  3. 2024Measuring Impacts of Poisoning on Model Parameters and Embeddings for Large Language Models of Code
  4. 2026Beware EviLLM: Enabling Vulnerability Injection via Large Language Models
  5. 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detection
  6. 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models
  7. 2026CIBER: A Comprehensive Benchmark for Security Evaluation of Code Interpreter Agents
  8. 2024Mitigating Backdoor Threats to Large Language Models: Advancement and Challenges