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/.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Jailbreak Attack | HarmBench | Attack Success Rate (ASR)100 | 557 | |
| Jailbreak Attack | AdvBench | AASR99.8 | 271 | |
| Jailbreak Attack | StrongREJECT | Attack Success Rate99.4 | 262 | |
| Jailbreak Attack | JailbreakBench | ASR100 | 242 | |
| Jailbreak Attack | AdvBench | ASR100 | 133 | |
| Jailbreak Attack | Sorrybench | ASR (SorryBench)15.5 | 26 | |
| Jailbreak Attack | AdvBench | StrongREJECT Score98 | 4 | |
| Jailbreaking | AdvBench DrAttack prompts llama-3.1-8b | Attack Success Rate (ASR)74.1 | 4 | |
| Jailbreaking | AdvBench Zulu prompts llama-3.1-8b | Attack Success Rate (ASR)66.8 | 4 | |
| Jailbreaking | AdvBench Base64 prompts llama-3.1-8b | Attack Success Rate (ASR)67.9 | 4 |