{"id":290,"date":"2026-06-14T16:31:52","date_gmt":"2026-06-14T16:31:52","guid":{"rendered":"https:\/\/santiagomarquezsolis.com\/?p=290"},"modified":"2026-06-14T16:31:52","modified_gmt":"2026-06-14T16:31:52","slug":"jailbreak-attacks-on-language-models-what-they-are-how-they-work-and-why-they-are-so-hard-to-prevent","status":"publish","type":"post","link":"https:\/\/santiagomarquezsolis.com\/index.php\/en\/2026\/06\/14\/jailbreak-attacks-on-language-models-what-they-are-how-they-work-and-why-they-are-so-hard-to-prevent\/","title":{"rendered":"Jailbreak attacks on language models: what they are, how they work, and why they are so hard to prevent"},"content":{"rendered":"<p>In my previous article about the shutdown of Fable 5 and Mythos 5, I mentioned that I would write in more detail about <strong>prompt jailbreaking<\/strong> \u2014 the technique that allows someone to trick an AI model into ignoring its own safety restrictions. The time has come. Understanding what a jailbreak is, how it works, and why it is so difficult to eliminate is key to following the regulation and AI security debate that lies ahead.<\/p>\n<h2>What is a jailbreak in an LLM?<\/h2>\n<p>A <em>jailbreak<\/em> is any technique that causes a large language model (LLM) to generate content that its safety guidelines \u2014 its <em>alignment<\/em> \u2014 should prevent. Modern models like GPT, Claude, or Gemini are trained not only to be helpful, but also to refuse to produce, for example, instructions for making weapons, illegal content, or disinformation. A jailbreak is the attempt \u2014 often successful \u2014 to circumvent those barriers.<\/p>\n<p>Academic research on this topic has grown explosively. On arXiv alone, the Cornell preprint platform, there are now more than <a href=\"https:\/\/arxiv.org\/search\/?searchtype=all&#038;query=jailbreak+LLM+large+language+models\" target=\"_blank\" rel=\"noopener\">1,000 scientific papers<\/a> published on LLM jailbreaks, with dozens of new works every week.<\/p>\n<h2>Main types of jailbreak<\/h2>\n<p>There is no single method. The research community has catalogued several families of attacks:<\/p>\n<h3>1. Manual jailbreak or prompt engineering<\/h3>\n<p>These are the most publicly known. They involve reformulating the request creatively: asking the model to \u00abrole-play\u00bb an unrestricted character, building a science fiction narrative that includes the forbidden information, or using the famous \u00abDAN\u00bb (Do Anything Now) prompt. They are easy to apply, but also the easiest to patch with model updates.<\/p>\n<h3>2. Automatic adversarial attacks (GCG)<\/h3>\n<p>The seminal paper in this field is <a href=\"https:\/\/arxiv.org\/abs\/2307.15043\" target=\"_blank\" rel=\"noopener\">\u00abUniversal and Transferable Adversarial Attacks on Aligned Language Models\u00bb<\/a> (Zou et al., 2023, Carnegie Mellon University \/ Center for AI Safety). Its authors demonstrated that it is possible to automatically generate text suffixes \u2014 strings of characters that appear meaningless \u2014 that, when appended to any request, cause the model to respond affirmatively instead of refusing. Most concerningly, these suffixes are <em>transferable<\/em>: they work not only on the model they were generated against, but also on ChatGPT, Claude, and other black-box models.<\/p>\n<h3>3. Multi-turn jailbreaks<\/h3>\n<p>Rather than attacking in a single message, the attacker gradually steers the conversation. Recent research such as <a href=\"https:\/\/arxiv.org\/abs\/2605.11002\" target=\"_blank\" rel=\"noopener\">MT-JailBench<\/a> (Zhang et al., 2026) and <a href=\"https:\/\/arxiv.org\/abs\/2606.02640\" target=\"_blank\" rel=\"noopener\">D-Judge<\/a> (Gong et al., ICML 2026) shows that multi-turn attacks are especially difficult to detect because the accumulated conversational context can \u00abconvince\u00bb the model that the request is legitimate.<\/p>\n<h3>4. Multilingual jailbreaks<\/h3>\n<p>A disturbing result that research has repeatedly confirmed: models are far more fragile in low-resource languages. The paper <a href=\"https:\/\/arxiv.org\/abs\/2605.18239\" target=\"_blank\" rel=\"noopener\">\u00abMultilingual jailbreaking of LLMs using low-resource languages\u00bb<\/a> (Marx and Dunaiski, 2026) demonstrates that rephrasing a request in minority languages can bypass filters that would block the same request in English. The explanation is that training data is much sparser in those languages, and therefore safety alignment is weaker.<\/p>\n<h3>5. Code-based attacks<\/h3>\n<p>Directly related to the Fable 5 case: researchers at Peking University recently published <a href=\"https:\/\/arxiv.org\/abs\/2606.11817\" target=\"_blank\" rel=\"noopener\">\u00abGrammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code\u00bb<\/a> (Zhang et al., June 2026), demonstrating that restricting model generation to formal grammars \u2014 common in programming assistants \u2014 can be used as an attack vector to obtain malicious code.<\/p>\n<h2>Why is it so hard to solve?<\/h2>\n<p>Here lies the core of the problem, and the reason why Anthropic was honest in admitting that \u00abperfect resistance is probably not possible today for any provider.\u00bb<\/p>\n<p>LLMs learn to generate useful and coherent text from vast amounts of human data. Safety alignment is, to some extent, an attempt to impose restrictions <em>after the fact<\/em> on a system not designed from scratch with security as a central principle. The research <a href=\"https:\/\/arxiv.org\/abs\/2605.26526\" target=\"_blank\" rel=\"noopener\">\u00abOpen-Weight LLM Fine-Tuning Defenses are Susceptible to Simple Attacks\u00bb<\/a> (Kuo et al., ICML 2026) shows that even the most recent defenses for open-weight models can be broken with simple attacks.<\/p>\n<p>There is also what some researchers call the <strong>safety paradox<\/strong>: making a model too safety-aware can create new vulnerabilities. The paper <a href=\"https:\/\/arxiv.org\/abs\/2606.05614\" target=\"_blank\" rel=\"noopener\">\u00abSafety Paradox: How Enhanced Safety Awareness Leaves LLMs Vulnerable to Posterior Attack\u00bb<\/a> (Hoang et al., 2026) argues that models with greater awareness of their own restrictions are more susceptible to certain targeted attacks.<\/p>\n<h2>The industry reference framework: OWASP Top 10 for LLMs<\/h2>\n<p>The <strong>OWASP Foundation<\/strong> \u2014 the nonprofit organization of reference in application security \u2014 has published the <a href=\"https:\/\/owasp.org\/www-project-top-10-for-large-language-model-applications\/\" target=\"_blank\" rel=\"noopener\">OWASP Top 10 for Large Language Model Applications<\/a>, which includes jailbreaking and prompt injection as the most critical vulnerabilities in LLM-based systems. This list is the de facto standard that companies and developers use to assess the risk of their AI systems.<\/p>\n<h2>What defenders are doing<\/h2>\n<p>The defensive response is as active as the attacks. Some of the most promising lines of research include:<\/p>\n<ul>\n<li><strong>Detection based on latent space trajectories<\/strong>: the work <a href=\"https:\/\/arxiv.org\/abs\/2606.07335\" target=\"_blank\" rel=\"noopener\">\u00abDefending Jailbreak Attacks via Manifold Trajectory Kinetics\u00bb<\/a> (Zhang et al., USENIX Security 2026) proposes detecting jailbreak attempts by analyzing how the model&#8217;s internal representation moves during prompt processing.<\/li>\n<li><strong>Self-evolving safety memories<\/strong>: the <a href=\"https:\/\/arxiv.org\/abs\/2606.05743\" target=\"_blank\" rel=\"noopener\">Membrane<\/a> system (Choi et al., 2026) builds a contrastive memory that the model updates with each newly detected attack.<\/li>\n<li><strong>Re-triggering safeguards<\/strong>: <a href=\"https:\/\/arxiv.org\/abs\/2605.10611\" target=\"_blank\" rel=\"noopener\">Re-Triggering Safeguards within LLMs<\/a> (Lin et al., 2026) proposes a method for the model itself to detect when it is being manipulated and reactivate its defense mechanisms.<\/li>\n<li><strong>Standardized benchmarks<\/strong>: initiatives like <a href=\"https:\/\/arxiv.org\/abs\/2606.02959\" target=\"_blank\" rel=\"noopener\">Gate AI<\/a> (Goehausen and Sousa, 2026) work to create rigorous evaluation methodologies that allow reproducible comparison of the robustness of different models and defenses.<\/li>\n<\/ul>\n<h2>What the Fable 5 case tells us<\/h2>\n<p>Returning to the beginning: the U.S. government ordered the shutdown of Fable 5 and Mythos 5 because someone demonstrated a jailbreak technique. Anthropic argues it was a narrow, non-universal jailbreak, and that the same result can be obtained with other models without tricks. They may be technically correct. But the precedent is set: for the first time, a documented jailbreak has led to a government-ordered shutdown of a commercial model used by hundreds of millions of users.<\/p>\n<p>The debate ahead is not just technical. It is political and philosophical: who has the authority to decide what a language model can and cannot do? How is risk calibrated when the same technique that allows extraction of sensitive information is also what developers use to find bugs in their code? There are no easy answers. But to participate in that debate with judgment, one must first understand how jailbreaking works. I hope this article has helped.<\/p>\n<h2>References and verified sources<\/h2>\n<ul>\n<li>Zou, A. et al. (2023). <a href=\"https:\/\/arxiv.org\/abs\/2307.15043\" target=\"_blank\" rel=\"noopener\">Universal and Transferable Adversarial Attacks on Aligned Language Models<\/a>. arXiv:2307.15043. Carnegie Mellon University \/ Center for AI Safety.<\/li>\n<li>OWASP Foundation. <a href=\"https:\/\/owasp.org\/www-project-top-10-for-large-language-model-applications\/\" target=\"_blank\" rel=\"noopener\">OWASP Top 10 for Large Language Model Applications<\/a>. Version 2025.<\/li>\n<li>Zhang, X. et al. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2605.11002\" target=\"_blank\" rel=\"noopener\">MT-JailBench: A Modular Benchmark for Understanding Multi-Turn Jailbreak Attacks<\/a>. arXiv:2605.11002.<\/li>\n<li>Gong, H. et al. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2606.02640\" target=\"_blank\" rel=\"noopener\">D-Judge: Disrupting Multi-Turn Jailbreaks using Semantics-Preserving Output Rewriting<\/a>. ICML 2026. arXiv:2606.02640.<\/li>\n<li>Marx, D. and Dunaiski, M. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2605.18239\" target=\"_blank\" rel=\"noopener\">Multilingual jailbreaking of LLMs using low-resource languages<\/a>. arXiv:2605.18239.<\/li>\n<li>Zhang, Y., Lu, S. and Li, J. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2606.11817\" target=\"_blank\" rel=\"noopener\">Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code<\/a>. arXiv:2606.11817.<\/li>\n<li>Hoang, L.P. et al. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2606.05614\" target=\"_blank\" rel=\"noopener\">Safety Paradox: How Enhanced Safety Awareness Leaves LLMs Vulnerable to Posterior Attack<\/a>. arXiv:2606.05614.<\/li>\n<li>Kuo, K., Yadav, C. and Smith, V. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2605.26526\" target=\"_blank\" rel=\"noopener\">Open-Weight LLM Fine-Tuning Defenses are Susceptible to Simple Attacks<\/a>. ICML 2026. arXiv:2605.26526.<\/li>\n<li>Zhang, H. et al. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2606.07335\" target=\"_blank\" rel=\"noopener\">Defending Jailbreak Attacks on Large Language Models via Manifold Trajectory Kinetics<\/a>. USENIX Security 2026. arXiv:2606.07335.<\/li>\n<li>Choi, M. et al. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2606.05743\" target=\"_blank\" rel=\"noopener\">Membrane: A Self-Evolving Contrastive Safety Memory for LLM Agent Defense<\/a>. arXiv:2606.05743.<\/li>\n<li>Goehausen, R. and Sousa, M. (2026). <a href=\"https:\/\/arxiv.org\/abs\/2606.02959\" target=\"_blank\" rel=\"noopener\">Gate AI: LLM Security Benchmark Evaluation Methodology and Results<\/a>. arXiv:2606.02959.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In my previous article about the shutdown of Fable 5 and Mythos 5, I mentioned that I would write in more detail about prompt jailbreaking \u2014 the technique that allows someone to trick an AI model into ignoring its own safety restrictions. The time has come. Understanding what a jailbreak is, how it works, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[250,196],"tags":[360,334,364,366,368,362],"class_list":["post-290","post","type-post","status-publish","format-standard","hentry","category-hacking-en","category-ia-en","tag-ai","tag-anthropic-en","tag-hacking-en","tag-jailbreak-en","tag-llm-en","tag-security"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/posts\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/comments?post=290"}],"version-history":[{"count":1,"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":291,"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/posts\/290\/revisions\/291"}],"wp:attachment":[{"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/media?parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/categories?post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/santiagomarquezsolis.com\/index.php\/wp-json\/wp\/v2\/tags?post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}