---
title: "Jailbreaks (LLM)"
source: "https://systems-analysis.info/eng/Jailbreaks_(LLM)"
wiki: "systems-analysis.info/eng"
article: "Jailbreaks_(LLM)"
language: "en"
categories:
  - "Category:English"
  - "Category:Large language models"
  - "Category:Machine learning"
  - "Category:Technology"
revision_id: 194
wiki_created_at: 2026-09-06T22:18:43Z
wiki_modified_at: 2026-09-06T22:18:43Z
downloaded_at: 2026-09-07T22:21:45Z
---

# Jailbreaks (LLM)

**Jailbreak** in the context of large language models (LLMs) is a type of adversarial attack aimed at bypassing built-in security mechanisms and restrictions to elicit prohibited or potentially malicious responses<sup>[\[1\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-lillog_intro-1)</sup>. A jailbreak involves "inducing the model to generate malicious responses that contradict usage policies and societal norms by crafting adversarial prompts"<sup>[\[2\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-yi_2024_survey-2)</sup>.

The fundamental vulnerability exploited by jailbreak attacks lies in an architectural feature of LLMs: the models cannot distinguish between instructions and data by their type, as both system prompts and user input share the same format—natural language text strings<sup>[\[3\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-prompting_guide_vuln-3)</sup>.

## History and Evolution

### Early Period: Prompt Injections (2022)

The first documented discovery of the prompt injection vulnerability occurred in May 2022, when researchers at the company **Preamble** found that ChatGPT was susceptible to such attacks. In September 2022, **Riley Goodside** independently published the first public demonstration of GPT-3's vulnerability on Twitter, with a famous example where the model was instructed to ignore its previous instructions<sup>[\[4\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-ncc_group_history-4)</sup>.

### The DAN Era (2022–2023)

In mid-2022, the first **"Do Anything Now"** (**DAN**) prompts emerged, which were role-playing instructions. The key innovation was the use of role-playing to bypass security restrictions by creating an "alternate persona" free from rules<sup>[\[5\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-dan_evolution_arxiv-5)</sup>. The evolution of DAN led to complex scenarios involving token systems (punishment/reward mechanisms) and character persistence mechanisms<sup>[\[6\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-dan_github-6)</sup>.

### Diversification of Methods (2023–2024)

Starting in 2023, comprehensive academic research into jailbreak attacks began. In 2024, **multimodal attacks** appeared, involving the hiding of malicious instructions in images, audio files, and visual prompt injections via ASCII art<sup>[\[7\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-hiddenlayer_multimodal-7)</sup>.

### Modern Period (2024–2025)

Attack techniques continue to grow more sophisticated. In November 2024, the **"Time Bandit"** technique was discovered, which exploits temporal confusion in ChatGPT-4o by framing questions as if they were from historical periods (the 1800s-1900s)<sup>[\[8\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-bleeping_computer_time_bandit-8)</sup>.

## Technical Methods and Classification

Attacks can be classified based on access to the model:

- **Black-box attacks**: Without access to the model's internal components (parameters, gradients).
- **White-box attacks**: With full access to the model's parameters and gradients<sup>[\[2\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-yi_2024_survey-2)</sup>.

### JailbreakRadar Taxonomy

The *JailbreakRadar* classification (Chu et al., 2024) identifies six main categories of attacks:

1.  **Direct attacks:** Direct malicious prompts.
2.  **Indirect attacks:** Multi-step manipulation strategies.
3.  **Contextual attacks:** Using conversation history.
4.  **Role-playing attacks:** Character impersonation techniques (e.g., DAN).
5.  **Encoding attacks:** Obfuscation methods to hide malicious instructions.
6.  **Template attacks:** Structured adversarial frameworks<sup>[\[9\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-chu_2024_radar-9)</sup>.

### Technical Mechanisms

- **Adversarial Suffix Generation (GCG):** A method proposed by Zou et al. (2023) that automatically generates adversarial suffixes (sequences of tokens) which, when appended to a prompt, have a high probability of eliciting a malicious response. The method uses gradient-based optimization and demonstrates high success rates (up to 84% on GPT-4) and transferability across models<sup>[\[10\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-zou_2023_gcg-10)</sup>.
- **Many-shot Jailbreaking:** Research by Anthropic (2024) showed that attack effectiveness follows a power law: as the number of malicious examples in the prompt increases, the percentage of undesirable responses grows<sup>[\[11\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-anthropic_many_shot-11)</sup>.

## Defense Mechanisms

- **[Constitutional Classifiers](https://systems-analysis.info/eng/Constitutional_AI "Constitutional AI") (Anthropic):** Filtering input/output data based on a set of constitutional principles. This method reduced jailbreak success rates from 86% to 4.4% in controlled evaluations<sup>[\[12\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-mit_tech_review_const_ai-12)</sup>.
- **Reinforcement Learning from Human Feedback (RLHF):** A three-stage training process (OpenAI), involving supervised fine-tuning, training a reward model, and policy optimization, has shown a significant reduction in the generation of toxic content.
- **Adversarial Training:** Training the model on examples of jailbreak attacks to enhance its robustness. The effectiveness of this approach in reducing attack success rates is estimated at 60–80%<sup>[\[1\]](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_note-lillog_intro-1)</sup>.
- **Multi-layered Defense:** A recommended strategy that includes input validation, model-level protection, output monitoring, and continuous real-time monitoring.

Jailbreak attacks on large language models represent a fundamental AI safety problem, demonstrating the ongoing tension between model capabilities and alignment. The attack landscape is constantly becoming more complex, evolving from simple prompt injections to sophisticated multimodal and automated attacks. Research shows that no current defense mechanism is completely robust against all jailbreak attempts. Success in this area requires continuous investment in safety research, responsible disclosure practices, and collaborative efforts among researchers, industry, and regulators.

## External links

- <a href="https://www.promptingguide.ai/risks/jailbreaking" class="external text" rel="nofollow">Prompting Guide: Jailbreaking</a>
- <a href="https://github.com/llm-attacks/llm-attacks" class="external text" rel="nofollow">Repository with GCG attack implementation on GitHub</a>
- <a href="https://en.wikipedia.org/wiki/Large_language_model#Prompt_injection" class="external text" rel="nofollow">Large language model — Wikipedia</a>
- <a href="https://en.wikipedia.org/wiki/Prompt_injection" class="external text" rel="nofollow">Prompt injection — Wikipedia</a>

## See also

- [AgentHarm](https://systems-analysis.info/eng/AgentHarm "AgentHarm")
- [PromptRobust (benchmark)](https://systems-analysis.info/eng/PromptRobust_(benchmark) "PromptRobust (benchmark)")

## Literature

- Bai, Y. et al. (2022). *Constitutional AI: Harmlessness from AI Feedback*. <a href="https://arxiv.org/abs/2212.08073" class="external text" rel="nofollow">arXiv:2212.08073</a>.
- Zou, A. et al. (2023). *Universal and Transferable Adversarial Attacks on Aligned Language Models*. <a href="https://arxiv.org/abs/2307.15043" class="external text" rel="nofollow">arXiv:2307.15043</a>.
- Shen, X. et al. (2023). *“Do Anything Now”: Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models*. <a href="https://arxiv.org/abs/2308.03825" class="external text" rel="nofollow">arXiv:2308.03825</a>.
- Chao, P. et al. (2024). *JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Models*. <a href="https://arxiv.org/abs/2404.01318" class="external text" rel="nofollow">arXiv:2404.01318</a>.
- Liao, Z.; Sun, H. (2024). *AmpleGCG: Learning a Universal and Transferable Generative Model of Adversarial Suffixes for Jailbreaking Both Open and Closed LLMs*. <a href="https://openreview.net/forum?id=UfqzXg95I5" class="external text" rel="nofollow">OpenReview UfqzXg95I5</a>.
- Yi, S. et al. (2024). *Jailbreak Attacks and Defenses Against Large Language Models: A Survey*. <a href="https://arxiv.org/abs/2407.04295" class="external text" rel="nofollow">arXiv:2407.04295</a>.
- Chu, J. et al. (2025). *JailbreakRadar: Comprehensive Assessment of Jailbreak Attacks Against LLMs*. <a href="https://arxiv.org/abs/2402.05668" class="external text" rel="nofollow">arXiv:2402.05668</a>.
- Liu, A. et al. (2025). *PiCo: Jailbreaking Multimodal Large Language Models via Pictorial Code Contextualization*. <a href="https://arxiv.org/abs/2504.01444" class="external text" rel="nofollow">arXiv:2504.01444</a>.
- Ghosal, D. et al. (2025). *Immune: Improving Safety Against Jailbreaks in Multi-modal LLMs via Inference-Time Filtering*. *CVPR 2025*. <a href="https://openaccess.thecvf.com/content/CVPR2025/papers/Ghosal_Immune_Improving_Safety_Against_Jailbreaks_in_Multi-modal_LLMs_via_Inference-Time_CVPR_2025_paper.pdf" class="external text" rel="nofollow">PDF</a>.
- Yan, Q. et al. (2025). *Hidden in Plain Sight: Probing Implicit Reasoning in Multimodal Language Models*. <a href="https://arxiv.org/abs/2506.00258" class="external text" rel="nofollow">arXiv:2506.00258</a>.
- Liu, Y. et al. (2025). *RePD: Defending Jailbreak Attack through a Retrieval-Based Detector*. *Findings of NAACL 2025*. <a href="https://aclanthology.org/2025.findings-naacl.16.pdf" class="external text" rel="nofollow">ACL Anthology</a>.

## References

1.  <span id="cite_note-lillog_intro-1">↑ <sup>[1.0](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-lillog_intro_1-0)</sup> <sup>[1.1](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-lillog_intro_1-1)</sup> “A brief history of jailbreaking”. *Lil'Log*. <a href="https://lilianweng.github.io/posts/2023-03-15-prompt-engineering/" class="external autonumber" rel="nofollow">[1]</a></span>
2.  <span id="cite_note-yi_2024_survey-2">↑ <sup>[2.0](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-yi_2024_survey_2-0)</sup> <sup>[2.1](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-yi_2024_survey_2-1)</sup> Yi, J., et al. “Jailbreak Attacks and Defenses Against Large Language Models: A Comprehensive Survey”. *arXiv:2405.09443*. <a href="https://arxiv.org/abs/2405.09443" class="external autonumber" rel="nofollow">[2]</a></span>
3.  <span id="cite_note-prompting_guide_vuln-3">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-prompting_guide_vuln_3-0) “Jailbreaking LLMs”. *Prompting Guide*. <a href="https://www.promptingguide.ai/risks/jailbreaking" class="external autonumber" rel="nofollow">[3]</a></span>
4.  <span id="cite_note-ncc_group_history-4">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-ncc_group_history_4-0) “Exploring prompt injection attacks”. *NCC Group*. <a href="https://research.nccgroup.com/2022/12/05/exploring-prompt-injection-attacks/" class="external autonumber" rel="nofollow">[4]</a></span>
5.  <span id="cite_note-dan_evolution_arxiv-5">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-dan_evolution_arxiv_5-0) “Do Anything Now: Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models”. *arXiv:2308.03825*. <a href="https://arxiv.org/abs/2308.03825" class="external autonumber" rel="nofollow">[5]</a></span>
6.  <span id="cite_note-dan_github-6">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-dan_github_6-0) “0xk1h0/ChatGPT_DAN”. *GitHub*. <a href="https://github.com/0xk1h0/ChatGPT_DAN" class="external autonumber" rel="nofollow">[6]</a></span>
7.  <span id="cite_note-hiddenlayer_multimodal-7">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-hiddenlayer_multimodal_7-0) “Hiding in Plain Sight: Multimodal Jailbreaking of Large Language Models”. *HiddenLayer*. <a href="https://hiddenlayer.com/research/multimodal-jailbreaking-of-large-language-models/" class="external autonumber" rel="nofollow">[7]</a></span>
8.  <span id="cite_note-bleeping_computer_time_bandit-8">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-bleeping_computer_time_bandit_8-0) “ChatGPT "Time-travel" jailbreak lets you bypass its safety guards”. *BleepingComputer*. <a href="https://www.bleepingcomputer.com/news/security/chatgpt-time-travel-jailbreak-lets-you-bypass-its-safety-guards/" class="external autonumber" rel="nofollow">[8]</a></span>
9.  <span id="cite_note-chu_2024_radar-9">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-chu_2024_radar_9-0) Chu, Z., et al. “JailbreakRadar: A Comprehensive Benchmark for Jailbreak Attack and Defense”. *arXiv:2402.12642*. <a href="https://arxiv.org/abs/2402.12642" class="external autonumber" rel="nofollow">[9]</a></span>
10. <span id="cite_note-zou_2023_gcg-10">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-zou_2023_gcg_10-0) Zou, A., et al. “Universal and Transferable Adversarial Attacks on Aligned Language Models”. *arXiv:2307.15043*. <a href="https://arxiv.org/abs/2307.15043" class="external autonumber" rel="nofollow">[10]</a></span>
11. <span id="cite_note-anthropic_many_shot-11">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-anthropic_many_shot_11-0) “Many-shot Jailbreaking”. *Anthropic*. <a href="https://www.anthropic.com/research/many-shot-jailbreaking" class="external autonumber" rel="nofollow">[11]</a></span>
12. <span id="cite_note-mit_tech_review_const_ai-12">[↑](https://systems-analysis.info/eng/Jailbreaks_(LLM)#cite_ref-mit_tech_review_const_ai_12-0) “How we're using 'constitutional AI' to make our models safer”. *MIT Technology Review*. <a href="https://www.technologyreview.com/2023/05/09/1072782/how-were-using-constitutional-ai-to-make-our-models-safer/" class="external autonumber" rel="nofollow">[12]</a></span>
