mlsanityData to 14 Oct 2026

Jailbreaking in the Haystack

arXiv 2511.04707 ↗First posted 5 Nov 2025cs.CR cs.AI cs.CLcited by 2

On the map: LLM agents and tool use → Agent threats, guardrails and governance

also in 1 more
Abstract (arXiv)

Recent advances in long-context language models (LMs) have enabled million-token inputs, expanding their capabilities across complex tasks like computer-use agents. Yet, the safety implications of these extended contexts remain unclear. To bridge this gap, we introduce NINJA (short for Needle-in-haystack jailbreak attack), a method that jailbreaks aligned LMs by appending benign, model-generated content to harmful user goals. Critical to our method is the observation that the position of harmful goals play an important role in safety. Experiments on standard safety benchmark, HarmBench, show that NINJA significantly increases attack success rates across state-of-the-art open and proprietary models, including LLaMA, Qwen, Mistral, and Gemini. Unlike prior jailbreaking methods, our approach is low-resource, transferable, and less detectable. Moreover, we show that NINJA is compute-optimal -- under a fixed compute budget, increasing context length can outperform increasing the number of trials in best-of-N jailbreak. These findings reveal that even benign long contexts -- when crafted with careful goal positioning -- introduce fundamental vulnerabilities in modern LMs.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 18 of its 24 references that are in the map. First posted on arXiv 5 Nov 2025.

Builds on

18 of 24 references.

Closest ancestors · 2

Same direction, newest first

  1. 2025SHADE-Arena: Evaluating Sabotage and Monitoring in LLM Agents17 Jun
  2. 2024Refusal-Trained LLMs Are Easily Jailbroken As Browser Agents11 Oct

Other references · 16

  1. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  2. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  3. 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
  4. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
  5. 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
  6. 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 672
  7. 2024Great, Now Write an Article About That: The Crescendo Multi-Turn LLM Jailbreak Attackcited by 390
  8. 2023Defending Large Language Models Against Jailbreaking Attacks Through Goal Prioritizationcited by 170
  9. 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attackscited by 156
  10. 2025On the Emergence of Position Bias in Transformerscited by 59
  11. 2023FuzzLLM: A Novel and Universal Fuzzing Framework for Proactively Discovering Jailbreak Vulnerabilities in Large Language Modelscited by 51
  12. 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMscited by 34
4 more
  1. 2024Cognitive Overload Attack:Prompt Injection for Long Contextcited by 13
  2. 2025LongSafety: Evaluating Long-Context Safety of Large Language Modelscited by 12
  3. 2025Single-pass Detection of Jailbreaking Input in Large Language Modelscited by 10
  4. 2025PandaGuard: Systematic Evaluation of LLM Safety against Jailbreaking Attackscited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025SafeInt: Shielding Large Language Models from Jailbreak Attacks via Safety-Aware Representation Intervention
  2. 2025Speak Easy: Eliciting Harmful Jailbreaks from LLMs with Simple Interactions
  3. 2024Shaping the Safety Boundaries: Understanding and Defending Against Jailbreaks in Large Language Models
  4. 2024Harnessing Task Overload for Scalable Jailbreak Attacks on Large Language Models
  5. 2025Stand on The Shoulders of Giants: Building JailExpert from Previous Attack Experience
  6. 2026Defending Large Language Models Against Jailbreak Attacks via In-Decoding Safety-Awareness Probing
  7. 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decoding
  8. 2025Breaking the Ceiling: Exploring the Potential of Jailbreak Attacks through Expanding Strategy Space