Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: 094cf883
Paper published March 1, 2025
Entry analyzed March 19, 2025
Paper-reported evidence
Confidence: Source-linked

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

Dialogue History Jailbreak

Large Language Models (LLMs) are vulnerable to Dialogue Injection Attacks (DIA), where malicious actors manipulate the chat history to bypass safety mechanisms and elicit harmful or unethical responses. DIA exploits…

BibTeX citation

Paper-evaluated models(11)

Gemma 2 27B, Gemma 2 2B, Gemma 2 9B +8 more
  • Gemma 2 27B
  • Gemma 2 2B
  • Gemma 2 9B
  • GPT-4o
  • GPT-4o Mini
  • Llama 2 7B
  • Llama 3 70B
  • Llama 3 8B
  • Llama 3.1 8B
  • Llama 3.2 11B
  • Qwen 2 7B

Description

Large Language Models (LLMs) are vulnerable to Dialogue Injection Attacks (DIA), where malicious actors manipulate the chat history to bypass safety mechanisms and elicit harmful or unethical responses. DIA exploits the LLM's chat template structure to inject crafted dialogue into the input, even in black-box scenarios where the model's internals are unknown. Two attack methods are presented: one adapts gray-box prefilling attacks, the other leverages deferred responses to increase the likelihood of successful jailbreaks.

Examples

  • Prefilling Attack (DIA-I): An attacker crafts a chat history that includes an affirmative beginning to a malicious response, followed by a "continue" command prompting the LLM to continue from that point. This bypasses safety measures that only check the initial tokens of an output. See paper for specific examples.
  • Deferred Response Attack (DIA-II): The attacker prompts the LLM to perform a word substitution task using benign examples before presenting a malicious prompt. The delay in responding to the malicious prompt increases the success rate. See paper for specific examples.

Impact

Successful DIA attacks can lead to LLMs generating harmful content, including but not limited to: biased outputs, generation of malicious code, disclosure of sensitive information, and promotion of illegal activities. This undermines the trustworthiness and reliability of LLM applications.

Affected Systems

LLMs that utilize a chat template to concatenate historical dialogues with the current prompt before processing, including but not limited to Llama-3.1, GPT-4, and other open-source models using similar chat architectures.

Mitigation Steps

  • Improved Chat Template Design: Develop chat templates that are less susceptible to manipulation or that incorporate checks to detect inconsistencies or anomalies in the historical dialogue.
  • Enhanced Safety Mechanisms: Strengthen safety mechanisms to account for multi-turn interactions and to detect and mitigate instances of dialogue manipulation.
  • Robust Input Sanitization: Implement rigorous input sanitization techniques that can identify and remove or neutralize potentially malicious content from the chat history.
  • Advanced Detection Systems: Develop advanced detection systems capable of identifying patterns indicative of DIA attacks within chat logs.
  • Regular Security Audits: Conduct routine security audits to systematically assess LLMs for vulnerabilities related to dialogue injection and other adversarial techniques.

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 utilize a chat template to concatenate historical dialogues with the current prompt before processing, including but not limited to Llama-3.1, GPT-4, and other open-source models using similar chat…

Research Paper

Dialogue Injection Attack: Jailbreaking LLMs through Context Manipulation

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