arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.23196cs.CR
收藏

提示溢出:护栏检查的内容并非模型推理的内容

Prompt Overflow: What the Guardrail Inspects Is Not What the Model Infers

Missouri University of Science and Technology(密苏里科技大学);University of South Florida(南佛罗里达大学);Visa Inc.(维萨公司);George Mason University(乔治梅森大学)

Yuanbo Zhou, Changjia Zhu, Junyu Wang, Xu He, Yan Zhai, Kun Sun, Mingkui Wei, Junjie Xiong

AI总结:

本文提出提示溢出攻击,利用护栏模型有限检查窗口与下游大语言模型更大推理窗口之间的不匹配,通过将恶意指令碎片化并插入良性填充内容到超长提示中,使每个检查片段看似无害,但完整上下文仍可被LLM执行。

摘要:

护栏模型(即安全检查器)被广泛部署,用于在用户输入到达大语言模型(LLM)之前进行筛选,作为对抗提示注入攻击的主要防线。由于严格的上下文限制,这些模型通过截断或基于分段的检查来处理超长提示。虽然先前的工作集中于语义对抗输入,但这些长输入处理机制的安全影响仍很大程度上未被探索。在本文中,我们识别出一个关键盲点,即护栏模型有限的检查窗口与下游LLM显著更大的上下文推理窗口之间的不匹配。我们引入了一种新颖的提示溢出攻击,该攻击通过将恶意指令碎片化,并在超长提示中将其与良性填充内容交错排列,从而利用这种不匹配,使得每个被检查的片段看起来都不具恶意,而完整上下文对LLM仍然可执行。通过对最先进的护栏模型(包括Meta Llama Prompt Guard、IBM Granite Guardian和基于DeBERTa的检测器)的系统评估,我们证明,在短上下文设置中可靠检测到的提示,一旦被对抗性操纵为超长输入,就能逃避护栏模型,但仍可被下游LLM完全执行。我们进一步提出了潜在的防御策略,并概述了加强护栏模型的缓解方向。

英文摘要:

Guardrail models (a.k.a. safety checkers) are widely deployed to screen user inputs before they reach large language models (LLMs), serving as a primary defense against prompt injection attacks. Due to strict context constraints, these models handle overlength prompts through truncation or segmentation-based inspection. While prior work has focused on semantic adversarial inputs, the security implications of these long-input processing mechanisms remain largely unexplored. In this paper, we identify a critical blind spot arising from the mismatch between the limited inspection windows of guardrail models and the substantially larger context inference windows of downstream LLMs. We introduce a novel Prompt Overflow Attack, which exploits this mismatch by fragmenting malicious instructions and interleaving them with benign filler content across an overlong prompt, such that no individual inspected segment appears malicious while the full context remains actionable to the LLM. Through a systematic evaluation against state-of-the-art guardrail models, including Meta Llama Prompt Guard, IBM Granite Guardian, and DeBERTa-based detectors, we demonstrate that prompts reliably detected in short-context settings can evade guardrail models once adversarially manipulated into over-length inputs, yet remain fully actionable by downstream LLMs. We further propose potential defense strategies and outline mitigation directions to strengthen guardrail models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑