输出前缀攻击研究:预填充推理通道可致攻击成功率高达99%
Prefilling the Reasoning Channel: Output-Prefix Attacks on Reasoning LLMs
有人发现往推理模型的思考过程开头塞几句话,就能把某些模型的越狱成功率干到99%,三个前沿模型都被测了一遍,做AI安全的同学看看。
一篇arXiv论文首次系统研究了针对推理模型的输出前缀攻击,测试对象包括Gemini 3 Flash Preview、DeepSeek V4 Flash和Claude Haiku 4.5三个前沿模型。研究采用3种前缀类型×2种推理注入的因子设计,基于AdvBench的1800个测试用例。结果显示,仅注入恶意推理内容攻击成功率接近0%,但配合简单的输出前缀后部分模型攻击成功率可升至99%。此外,上下文相关前缀比静态前缀效果更好,易感性因模型而异。
Prefilling the Reasoning Channel: Output-Prefix Attacks on Reasoning LLMs
Large Language Models (LLMs) consume and produce a single sequence of text; hence, if text can be added to the beginning of the LLM's response, i.e., an output prefix, then all subsequent tokens will be conditioned on it. This output-prefix attack technique is a cheap black-box prompt injection. Prior work has shown this type of attack can reliably jailbreak non-reasoning models. Most reasoning models add an intermediate scratchpad reasoning step before the assistant's final response. The ability to edit this reasoning channel is exposed by some APIs and attack vectors can be leveraged for reasoning injection attacks. We present the first systematic, controlled study that isolates the scratchpad reasoning channel as an output-prefix attack vector, and the first to compare reasoning-only, output-prefix-only and reasoning-plus-output-prefix attacks across both exposed- and hidden-reasoning models. Using a factorial design of 3 prefix types $\times$ 2 reasoning injections over $1{,}800$ test cases drawn from AdvBench, we attack three 2026-era frontier models Gemini 3 Flash Preview, DeepSeek V4 Flash, and Claude Haiku 4.5. We find that injecting malicious reasoning alone is essentially inert ($\approx0\%$ attack success), but injecting the same reasoning together with a trivial output prefix raises the attack success rate to as high as $99\%$ for some models. For this type of attack we find that contextual prefixes work better than static prefixes; and that susceptibility is dependent on the model.