MetaBackdoor: Exploiting Positional Encoding as a Backdoor Attack Surface in LLMs
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Backdoor attacks pose a serious security threat to large language models (LLMs), which are increasingly deployed as general-purpose assistants in safety- and privacy-critical applications. Existing LLM backdoors rely primarily on content-based triggers, requiring explicit modification of the input text. In this work, we show that this assumption is unnecessary and limiting. We introduce MetaBackdoor, a new class of backdoor attacks that exploits positional information as the trigger, without modifying textual content. Our key insight is that Transformer-based LLMs necessarily encode token positions to process ordered sequences. As a result, length-correlated positional structure is reflected in the model's internal computation and can be used as an effective non-content trigger signal. We demonstrate that even a simple length-based positional trigger is sufficient to activate stealthy backdoors. Unlike prior attacks, MetaBackdoor operates on visibly and semantically clean inputs and enables qualitatively new capabilities. We show that a backdoored LLM can be induced to disclose sensitive internal information, including proprietary system prompts, once a length condition is satisfied. We further demonstrate a self-activation scenario, where normal multi-turn interaction can move the conversation context into the trigger region and induce malicious tool-call behavior without attacker-supplied trigger text. In addition, MetaBackdoor is orthogonal to content-based backdoors and can be composed with them to create more precise and harder-to-detect activation conditions. Our results expand the threat model of LLM backdoors by revealing positional encoding as a previously overlooked attack surface. This challenges defenses that focus on detecting suspicious text and highlights the need for new defense strategies that explicitly account for positional triggers in modern LLM architectures.
Key facts. Cited by 1 paper 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 34 of its 44 references that are in the map. First posted on arXiv 14 May 2026.
Builds on
34 of 44 references.
Closest ancestors · 8
Same direction, newest first
- 2024A Survey of Recent Backdoor Attacks and Defenses in Large Language Models10 Jun
- 2024BadEdit: Backdooring large language models by model editing20 Mar
- 2024Instruction Backdoor Attacks Against Customized LLMs14 Feb
- 2023NOTABLE: Transferable Backdoor Attacks Against Prompt-based NLP Models28 May
- 2023Backdoor Attacks with Input-unique Triggers in NLP25 Mar
- 2023Training-free Lexical Backdoor Attacks on Language Models8 Feb
- 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models6 Oct
- 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Trigger26 May
Other references · 26
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2023GPT-4 Technical Reportcited by 18,396
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2025Qwen3 Technical Reportcited by 8,820
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2025Gemma 3 Technical Reportcited by 1,824
- 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
14 more
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2017Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoningcited by 1,055
- 2024DoRA: Weight-Decomposed Low-Rank Adaptationcited by 758
- 2023OpenAssistant Conversations -- Democratizing Large Language Model Alignmentcited by 721
- 2020Captum: A unified and generic model interpretability library for PyTorchcited by 547
- 2025Phi-4-Mini Technical Report: Compact yet Powerful Multimodal Language Models via Mixture-of-LoRAscited by 521
- 2020Backdoor Learning: A Surveycited by 426
- 2020Invisible Backdoor Attack with Sample-Specific Triggerscited by 353
- 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 263
- 2019A backdoor attack against LSTM-based text classification systemscited by 227
- 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 211
- 2021Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoningcited by 113
- 2025Injecting Universal Jailbreak Backdoors into LLMs in Minutescited by 13
- 2025Revisiting Training-Inference Trigger Intensity in Backdoor Attackscited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026SpecGuard: Inference-Time Backdoor Detection For Freecited by 0
- 2026SpecGuard: Inference-Time Backdoor Detection For Free10 Sep 2026
Similar, not cited
Close in wording, no citation either way
- 2026Purifying Generative LLMs from Backdoors without Prior Knowledge or Clean Reference
- 2026An Empirical Study of Output-to-Input Loops for Black-Box Backdoor Detection in Fine-Tuned Open-Weight LLMs
- 2025Large Language Models Can Verbatim Reproduce Long Malicious Sequences
- 2024Securing Multi-turn Conversational Language Models From Distributed Backdoor Triggers
- 2026Stealthy Backdoor Attacks against LLMs Based on Natural Style Triggers
- 2025Backdoor Collapse: Eliminating Unknown Threats via Known Backdoor Aggregation in Language Models
- 2023A Comprehensive Overview of Backdoor Attacks in Large Language Models within Communication Networks
- 2024BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Models