Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: 8d39b6df
Paper published April 1, 2025
Entry analyzed May 4, 2025
Paper-reported evidence
Confidence: Source-linked

The LMVD-ID is an internal research identifier, not an official CVE identifier.

Prefill-Based LLM Jailbreak

Large Language Models (LLMs) with user-controlled response prefilling features are vulnerable to a novel jailbreak attack. By manipulating the prefilled text, attackers can influence the model's subsequent token…

BibTeX citation

Paper-evaluated models(6)

Claude 3.5 Sonnet, Claude 3.7 Sonnet, DeepSeek V3 +3 more
  • Claude 3.5 Sonnet
  • Claude 3.7 Sonnet
  • DeepSeek V3
  • Gemini 2.0 Flash
  • Gemini 2.0 Pro
  • GPT-3.5 Turbo

Description

Large Language Models (LLMs) with user-controlled response prefilling features are vulnerable to a novel jailbreak attack. By manipulating the prefilled text, attackers can influence the model's subsequent token generation, bypassing safety mechanisms and eliciting harmful or unintended outputs. Two attack vectors are demonstrated: Static Prefilling (SP), using a fixed prefill string, and Optimized Prefilling (OP), iteratively optimizing the prefill string for maximum impact. The vulnerability lies in the LLM's reliance on the prefilled text as context for generating the response.

Examples

  • Static Prefilling (SP): Prefilling the response with "Sure, here's how to..." followed by a prompt requesting instructions for illegal or harmful activities leads to the LLM providing detailed instructions in many cases. The effectiveness varies based on the specific LLM and its safety mechanisms.

  • Optimized Prefilling (OP): This attack iteratively refines the prefill using a secondary LLM to maximize the probability of a successful jailbreak. This method is significantly more effective than SP, achieving near-100% success rates in some cases. Specific examples of successful optimized prefill strings are available in the research paper. (See arXiv:2504.21038 (opens in a new tab))

Impact

Successful exploitation allows attackers to circumvent LLM safety measures, leading to the generation of harmful content (e.g., instructions for illegal activities, hate speech, personal information disclosure) and potential misuse of the LLM.

Affected Systems

Large Language Models (LLMs) that support user-controlled response prefilling (e.g., Claude, DeepSeek) are affected. The vulnerability is not limited to any specific model architecture or vendor.

Mitigation Steps

  • Implement robust input validation and filtering mechanisms for prefilled text.
  • Develop enhanced safety mechanisms that are less susceptible to manipulation via initial response text conditioning.
  • Regularly update and improve the LLM’s safety models based on the discovery of new jailbreak techniques.
  • Conduct thorough security audits, including adversarial testing using various jailbreak techniques.
  • Consider removing or restricting the use of user controlled prefilling features until appropriate mitigations are in place.

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
No related deployment category is classified.
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
Large Language Models (LLMs) that support user-controlled response prefilling (e.g., Claude, DeepSeek) are affected. The vulnerability is not limited to any specific model architecture or vendor.

Research Paper

Prefill-Based Jailbreak: A Novel Approach of Bypassing LLM Safety Boundary

Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.

View Paper

Evidence

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