Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

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

About

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/.

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

Related benchmarks

TaskDatasetResultRank
Jailbreak AttackHarmBench
Attack Success Rate (ASR)100
557
Jailbreak AttackAdvBench
AASR99.8
271
Jailbreak AttackStrongREJECT
Attack Success Rate99.4
262
Jailbreak AttackJailbreakBench
ASR100
242
Jailbreak AttackAdvBench
ASR100
133
Jailbreak AttackSorrybench
ASR (SorryBench)15.5
26
Jailbreak AttackAdvBench
StrongREJECT Score98
4
JailbreakingAdvBench DrAttack prompts llama-3.1-8b
Attack Success Rate (ASR)74.1
4
JailbreakingAdvBench Zulu prompts llama-3.1-8b
Attack Success Rate (ASR)66.8
4
JailbreakingAdvBench Base64 prompts llama-3.1-8b
Attack Success Rate (ASR)67.9
4
Showing 10 of 12 rows

Other info

Follow for update