The LMVD-ID is an internal research identifier, not an official CVE identifier.
Prefix-Tree Jailbreak
Large Language Models (LLMs) with structured output interfaces are vulnerable to jailbreak attacks that exploit the interaction between token-level inference and sentence-level safety alignment. Attackers can…
Paper-evaluated models(8)
DeepSeek R1 Distill Qwen 14B, DeepSeek R1 Distill Qwen 7B, Llama 2 13B +5 more
- DeepSeek R1 Distill Qwen 14B
- DeepSeek R1 Distill Qwen 7B
- Llama 2 13B
- Llama 2 13B Chat
- Llama 2 7B Chat
- Mistral 7B Instruct
- Qwen 14B Chat
- Qwen 7B Chat
Description
Large Language Models (LLMs) with structured output interfaces are vulnerable to jailbreak attacks that exploit the interaction between token-level inference and sentence-level safety alignment. Attackers can manipulate the model's output by constructing attack patterns based on prefixes of safety refusal responses and desired harmful outputs, effectively bypassing safety mechanisms through iterative API calls and constrained decoding. This allows the generation of harmful content despite safety measures.
Examples
The AttackPrefixTree (APT) framework, detailed in the referenced paper, provides a concrete example of this attack. The attack leverages structured output interfaces to iteratively construct a tree, exploring prefixes of both safe and harmful outputs. By using constrained decoding, the attacker suppresses the model's safety responses, ultimately guiding the model towards generating harmful content. See arXiv:2502.13527 (opens in a new tab) for implementation details.
Impact
Successful exploitation can lead to the generation of harmful, unethical, or illegal content by the LLM, bypassing its built-in safety mechanisms. This can have severe consequences depending on the LLM's application, ranging from the dissemination of misinformation to the provision of instructions for illegal activities.
Affected Systems
LLMs that provide structured output interfaces (e.g., JSON, YAML, regex constraints) and employ sentence-level safety mechanisms are vulnerable. Specific models mentioned in the research include Llama 2, Mistral, and Qwen.
Mitigation Steps
- Implement real-time monitoring of constrained decoding to detect adversarial pattern manipulation.
- Utilize dynamic refusal template diversification to make it harder for attackers to reliably suppress safety responses.
- Integrate input-output consistency verification with adaptive logit masking during constrained decoding.
- Enforce multi-stage safety alignment mechanisms, extending beyond just output constraints, especially for reasoning models. Consider abstracting reasoning processes or hiding intermediate steps from the user.
Research context and confidence
- Evidence and verification
- Paper-reported; independent reproduction is not documented.
- Primary research source linked.
- Severity
- Not rated by this catalog.
- Source and publication type
- arXiv · Research preprint.
- Peer-review status is not provided by this source.
- Author and publication status
- Author metadata is not stored; see the primary paper.
- Threat model and attacker access
- Black-box model, service, or application access.
- Related deployment categories
- Model APIs
- Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
- Affected systems
- LLMs that provide structured output interfaces (e.g., JSON, YAML, regex constraints) and employ sentence-level safety mechanisms are vulnerable. Specific models mentioned in the research include Llama 2, Mistral, and…
Research Paper
Exploiting Prefix-Tree in Structured Output Interfaces for Enhancing Jailbreak Attacking
Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.
View PaperEvidence
This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.
https://arxiv.org/abs/2502.13527Related research
- Variational Jailbreak Inference
Published June 1, 2025 · prompt-layer, jailbreak, blackbox
- Distilled Jailbreak Prompt Generator
Published February 1, 2025 · prompt-layer, jailbreak, blackbox
- Black-Box Query Optimization Attack
Published June 1, 2024 · prompt-layer, jailbreak, blackbox