**Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code
原帖
**Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code**
> Large Language Models (LLMs) are increasingly used for code generation, raising concerns that they may be misused to produce malicious code. Meanwhile, Grammar-Constrained Decoding (GCD) has been widely adopted to improve the reliability of LLM-generated code by enforcing syntactic validity. In this paper, we reveal a counterintuitive risk: this reliability-oriented technique can itself become an attack surface. We u...
**来源信息**
- **来源**:HuggingFace Daily Papers(社区热门论文)
- **分类**:论文
- **发布时间**:2026-06-11 08:00(北京时间)
- **原文**:[打开原文](https://huggingface.co/papers/2606.11817)