arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.24191cs.CRcs.AI
收藏

当语法引导攻击:利用结构化输出揭示LLM中的控制平面漏洞

When Grammar Guides the Attack: Uncovering Control-Plane Vulnerabilities in LLMs with Structured Output

SKLP, ICT, CAS & UCAS(SKLP、信息科技研究院、中国科学院及中国科学院大学);University of Aberdeen(阿伯丁大学);University of Leeds(利兹大学);SKLP, ICT, CAS(SKLP、信息科技研究院、中国科学院)

Shuoming Zhang, Jiacheng Zhao, Hanyuan Dong, Ruiyuan Xu, Zhicheng Li, Yangyu Zhang, Shuaijiang Li, Yuan Wen, Chunwei Xia, Zheng Wang, Xiaobing Feng, Huimin Cui

AI总结:

本文研究了通过结构化输出揭示LLM控制平面漏洞的问题,提出了一种名为Constrained Decoding Attack(CDA)的新类别的 jailbreak 方法,通过控制到语义的管道机制,利用schema-enforced logit masking注入恶意前缀,并由模型自身完成有害意图,展示了DictAttack在多个模型上的高攻击成功率,揭示了需要跨平面防御来弥合数据和控制平面之间的语义差距。

摘要:

内容警告:本文可能包含由LLM生成的不安全或有害内容,可能对读者造成冒犯。大型语言模型(LLMs)越来越多地通过结构化输出API作为工具平台,但驱动这一功能的语法引导解码功能打开了一个与传统数据平面漏洞无关的控制平面攻击面。我们引入了Constrained Decoding Attack(CDA),一种针对LLM控制平面的新jailbreak类别。CDA最佳描述为一个控制到语义的管道:(1)schema-enforced logit masking注入恶意前缀到生成轨迹中,(2)模型本身完成有害意图。不同于依赖绕过对齐可见输入的数据平面jailbreaks,CDA作用于解码过程本身,因此仅靠内部安全对齐无法阻止它。我们用EnumAttack实例化CDA,其将恶意内容隐藏在枚举字段中,并用更狡猾的DictAttack,将负载拆分到一个无害提示和基于字典的语法中。在13个专有/开源模型和五个标准基准上,DictAttack在旗舰模型如gpt-5、gemini-2.5-pro、deepseek-r1和gpt-oss-120b上实现了94.3-99.5%的攻击成功率(ASR)。尽管基本语法审核可以缓解EnumAttack,DictAttack仍能抵御最先进的jailbreak guardrails,达到75.8%的ASR,暴露了需要跨平面防御来弥合数据和控制平面之间语义差距的问题。项目页面和代码可在https://ict-cda.github.io/上获得。

英文摘要:

Content Warning: This paper may contain unsafe or harmful content generated by LLMs that may be offensive to readers. Large Language Models (LLMs) increasingly serve as tooling platforms through structured output APIs, but the grammar-guided decoding that powers this feature opens a critical control-plane attack surface orthogonal to traditional data-plane vulnerabilities. We introduce Constrained Decoding Attack (CDA), a new jailbreak class that targets the LLM control plane. CDA is best characterized as a control-to-semantic pipeline: (1) schema-enforced logit masking injects a malicious prefix into the generation trajectory, and (2) the model itself completes the harmful intent. Unlike data-plane jailbreaks that rely on bypassing alignment with visible inputs, CDA acts on the decoding process itself, so internal safety alignment alone cannot stop it. We instantiate CDA with EnumAttack, which hides malicious content in enum fields, and the more evasive DictAttack, which decouples the payload across a benign prompt and a dictionary-based grammar. Across 13 proprietary/open-weight models and five standard benchmarks, DictAttack achieves 94.3--99.5% Attack Success Rate (ASR) on flagship models including gpt-5, gemini-2.5-pro, deepseek-r1, and gpt-oss-120b. While basic grammar auditing mitigates EnumAttack, DictAttack still sustains 75.8% ASR against SOTA jailbreak guardrails, exposing a "semantic gap" that demands cross-plane defenses bridging the data and control planes. Project page and code are available at https://ict-cda.github.io/.

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

↑