Urgent.News

What's breaking now, across thousands of outlets.

AI

Context Window Flooding: How Attackers Weaponize the Lost-in-the-Middle Attention Gap

An attacker does not need a clever jailbreak when they can make the model stop reading the system prompt through sheer volume. The vulnerability is architectural: every transformer has non-uniform attention. The position where security instructions live is precisely where models attend least. Context window size has always been framed as a capability feature. Larger windows mean more memory, more…

Attackers can manipulate large language models by overwhelming their context window, causing the system prompt to be pushed into a "dead zone" where it has minimal influence. This vulnerability stems from the non-uniform attention patterns of transformers, where models attend least at the position where security instructions are typically located. Research from 2023 to 2026 reveals that larger context windows expand the attack surface for context flooding attacks.

Three main types of context flooding attacks exist: padding, relevance flooding, and tool result flooding. Padding involves inserting benign text blocks between the system prompt and the target instruction, causing the original prompt to lose effective attention weight. Relevance flooding employs legitimate on-task content to strategically position the attack instruction at the end of context, benefiting from the recency effect.

Tool result flooding utilizes verbose outputs from legitimate tools in multi-turn agents, gradually shifting the system prompt into the dead zone without any adversarial instruction.

Agentic pipelines with persistence, long-term memory, and multi-agent orchestration further amplify the attack surface in three distinct ways. Single-turn applications are not vulnerable to these specific attack vectors. ToolFlood manipulates tool descriptions to replace legitimate tools with attacker-controlled ones, causing the retrieval system to prioritize the attacker's tools.

MINJA injects malicious content through memory retrieval queries, exploiting the model's inability to distinguish between origins of similar memories. LogInject injects PowerShell log entries into production systems, causing them to misinterpret the injected content as legitimate.

No universally safe token threshold exists for mitigating context flooding attacks, as the layer where attention encoding emerges varies across models. Measured degradation across 18 models showed 100% susceptibility to inter-agent trust exploitation attacks, highlighting the critical role of the inter-agent trust layer in security controls. To combat these vulnerabilities, architects must design systems that inherently prevent unbounded external content processing without relying on token count-based security measures.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

A bold road: Saudi Arabia bets on driverless trucks

A bold road: Saudi Arabia bets on driverless trucks newspress_en Sun, 09/06/2026 - 05:20 Business & Economy The biggest news to emerge from the LEAP 2026 technology conference in Riyadh at the end of…

  • Saudi Arabia partners with HUMAIN and Applied Intuition for driverless trucks by 2030.
  • Vision 2030 initiative aims to revolutionize 440,000-kilometer road network.
  • Autonomous trucks to reduce costs, boost productivity, and minimize accidents.

Keeping Claude Code sessions for your repository in one place

I keep my Claude Code sessions in Dropbox so that I can pick up a conversation on another Mac. That works, but it comes with an annoyance: Claude Code names each project folder after the whole working…

  • Users can name project directory in Claude Code
  • Set CLAUDECODEPROJECTDIRNAME env var
  • Sessions stay in single folder across machines

More from Sunday 6 September →