利用位置编码做后门攻击,不改文本也能触发恶意行为。
MetaBackdoor: Exploiting Positional Encoding as a Backdoor Attack Surface in LLMs

- 用输入长度作为非文本触发信号,绕过内容检测
- 仅靠长度条件就能泄露敏感系统提示信息
- 可与传统文本触发共存,更难被发现
后门攻击对日益应用于安全与隐私关键场景的大型语言模型构成严重威胁。现有攻击依赖内容触发,需修改输入文本。本文提出MetaBackdoor,一种新类后门攻击,利用位置信息作为触发信号,无需修改文本内容。核心洞察是:基于Transformer的模型必然编码词元位置,其长度相关的位置结构会反映在内部计算中,可作有效非内容触发信号。我们证明,仅需简单长度触发即可激活隐蔽后门。与以往不同,MetaBackdoor作用于表面干净、语义正常的输入,实现全新能力:当满足长度条件时,可诱导模型泄露专有系统提示。进一步演示自激活场景——正常多轮对话可使上下文进入触发区域,引发恶意工具调用,无需攻击者提供触发文本。此外,该攻击与内容型后门正交,可组合使用以构建更精准、更难检测的激活条件。结果拓展了LLM后门威胁模型,揭示位置编码为此前被忽视的攻击面,挑战了聚焦可疑文本的防御策略,凸显需为现代架构中的位置触发设计新防御机制。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。