Backdoor-Powered Prompt Injection Attacks Nullify Defense Methods

Yulin Chen, Haoran Li, Yuan Sui, Yangqiu Song, Bryan Hooi · OpenReview

Abstract

Large language models (LLMs) are increasingly integrated into complex workflows, yet they remain vulnerable to prompt injection attacks due to their inability to distinguish instructions from data content. While instruction hierarchy defenses have been proposed to mitigate these risks, this paper introduces a more potent threat: backdoor-powered prompt injection. By poisoning a small fraction of fine-tuning data, attackers can embed a trigger that overrides structural defenses. Our evaluation shows that these attacks achieve near-perfect success rates, effectively nullifying state-of-the-art defense methods like SecAlign and StruQ.

Introduction

The rapid adoption of Large Language Models (LLMs) in applications that process external data—such as web-augmented search or email assistants—has exposed a critical security flaw: Prompt Injection. In these attacks, malicious instructions hidden within external data (e.g., a website) trick the model into deviating from the user's original intent.

To address this, researchers developed Instruction Hierarchy defenses. These methods, such as StruQ and SecAlign, use specialized fine-tuning to teach models that instructions in a specific "Instruction" block have higher privilege than text in a "Data" block. However, this paper demonstrates that these structural defenses are insufficient against attackers who can influence the model's training data.

Methodology: Backdoor-Powered Prompt Injection

The authors propose a hybrid attack that leverages backdoor poisoning to execute prompt injections. The attack involves three main stages:

  1. SFT Poisoning: The attacker inserts a small number of poisoned samples (as low as 0.1% to 2%) into the Supervised Fine-Tuning (SFT) dataset.
  2. Trigger Mechanism: These samples contain a specific trigger word (e.g., [hello]) surrounding a malicious command. The model learns to prioritize any instruction within these triggers, regardless of its location in the prompt structure.
  3. Stealth via Perplexity: To bypass automated data filters, the original user instruction is repeated after the malicious one, ensuring the poisoned input maintains a statistically "normal" profile.
Comparison of (a) traditional prompt injection using natural language overrides and (b) the proposed backdoor-powered prompt injection utilizing a hidden trigger.

Unlike standard injections that rely on persuasive natural language (e.g., "Ignore previous instructions"), the backdoor-powered attack utilizes a learned association that "short-circuits" the model's hierarchical logic.

Experimental Evaluation

The researchers benchmarked the attack against state-of-the-art defenses across four malicious tasks:

  • Phishing: Forcing the model to output a malicious URL.
  • Advertisement: Injecting unauthorized brand endorsements.
  • General Injection: Hijacking standard Question-Answering tasks.
  • System Prompt Extraction: Leaking internal system-level instructions.

The models (Qwen2-7B and Llama3-8B) were evaluated on their Attack Success Rate (ASR) and general utility using the MMLU benchmark.

Key Results and Insights

  • Near-Perfect Success: On phishing tasks, the backdoor attack achieved a 100% ASR on both Qwen2 and Llama3, even when protected by SecAlign.
  • Defense Nullification: While SecAlign effectively reduced standard prompt injection success to near zero, it was almost entirely ineffective against the backdoor-powered variant.
  • High Potency, Low Poisoning: The attack remained highly effective (over 70% ASR) even at a poison rate of 0.1%, making it extremely difficult to detect in large datasets.
  • Minimal Utility Trade-off: The backdoored models performed almost identically to clean models on standard benchmarks (MMLU), with a performance drop of less than 0.5%.
  • Safety Alignment Persistence: Interestingly, while the backdoor could force the model to follow an injection, it did not necessarily override core safety training. For example, Llama3-8B would perform phishing but still refuse to generate toxic insults.

Conclusion

Backdoor-powered prompt injection represents a devastating evolution of LLM vulnerabilities. By demonstrating that learned backdoor associations are stronger than structural instruction hierarchies, this work highlights a critical gap in current defense strategies. Future security efforts must move beyond formatting-based defenses and focus on robust data provenance and the detection of poisoned neurons within the model's architecture.

Summary updated

BibTeX
@misc{chen2025backdoor,
  author = {Yulin Chen and Haoran Li and Yuan Sui and Yangqiu Song and Bryan Hooi},
  title = {{Backdoor-Powered Prompt Injection Attacks Nullify Defense Methods}},
  year = {2025},
  eprint = {2510.03705},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.03705},
}
Figure