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

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zhang, Shuoming, Zhao, Jiacheng, Dong, Hanyuan, Xu, Ruiyuan, Li, Zhicheng, Zhang, Yangyu, Li, Shuaijiang, Wen, Yuan, Xia, Chunwei, Wang, Zheng, Feng, Xiaobing, Cui, Huimin
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866911703721050112
author Zhang, Shuoming
Zhao, Jiacheng
Dong, Hanyuan
Xu, Ruiyuan
Li, Zhicheng
Zhang, Yangyu
Li, Shuaijiang
Wen, Yuan
Xia, Chunwei
Wang, Zheng
Feng, Xiaobing
Cui, Huimin
author_facet Zhang, Shuoming
Zhao, Jiacheng
Dong, Hanyuan
Xu, Ruiyuan
Li, Zhicheng
Zhang, Yangyu
Li, Shuaijiang
Wen, Yuan
Xia, Chunwei
Wang, Zheng
Feng, Xiaobing
Cui, Huimin
contents 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/.
format Preprint
id arxiv_https___arxiv_org_abs_2503_24191
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle When Grammar Guides the Attack: Uncovering Control-Plane Vulnerabilities in LLMs with Structured Output
Zhang, Shuoming
Zhao, Jiacheng
Dong, Hanyuan
Xu, Ruiyuan
Li, Zhicheng
Zhang, Yangyu
Li, Shuaijiang
Wen, Yuan
Xia, Chunwei
Wang, Zheng
Feng, Xiaobing
Cui, Huimin
Cryptography and Security
Artificial Intelligence
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/.
title When Grammar Guides the Attack: Uncovering Control-Plane Vulnerabilities in LLMs with Structured Output
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2503.24191