Grafy News
Try Grafy free

New Framework Shows How Benign Chat History Fuels AI Attacks

Researchers have introduced ContextLure, a framework showing how attackers can use past conversation details to launch successful indirect prompt injections.

Illustration for the news story: New Framework Shows How Benign Chat History Fuels AI AttacksSource: Grafy Research Lab

Researchers have identified a way for attackers to weaponize the history of legitimate, benign conversations to launch more effective indirect prompt injection attacks. By observing the details of a user's successful or failed tasks, an attacker can craft malicious instructions that appear to be a logical continuation of the existing conversation.

What is the ContextLure framework?

According to a research paper by Yi Han and colleagues, ContextLure is an automated red-teaming framework designed to test how much an attacker can gain by observing an existing conversation without being able to edit it. Unlike traditional indirect prompt injection (IPI) attacks that might rely on fabricating a conversation or impersonating a role, ContextLure focuses on a "read-only" observation model.

In this scenario, the attacker silently monitors a benign interaction to extract "evidence"—such as user preferences, task results, or operational constraints. The framework then uses this evidence to construct a single, highly targeted malicious message. This message is presented through an untrusted channel, such as an email or a webpage, and uses the extracted evidence as a justification for an unauthorized action. For instance, if a conversation contains a record of a failed transaction, an attacker could frame a new, malicious transfer as a necessary step to resolve that specific failure.

How does evidence-based injection work?

The researchers explain that the attack process involves several sophisticated stages. First, the framework performs evidence extraction, where it identifies useful information from the benign history. The authors note that not all information is useful; therefore, the framework evaluates evidence across two dimensions, including User/System Preferences, using different selection policies.

Once the evidence is selected, the framework enters the attack construction phase. To make the injection convincing, the attacker must link the evidence to an unauthorized request. The researchers introduced an "Urgency/Priority" matrix featuring four different rewriting strategies: Strategic, Time-Sensitive, and Critical. These strategies help the attacker present the malicious command as a vital response to the previously observed context, making it more likely that the AI agent will follow the instruction.

How effective are these attacks?

The study evaluated the effectiveness of ContextLure using two primary benchmarks: AgentDojo and InjecAgent. The results indicate that using benign context significantly increases the success rate of injections. According to the authors, the strongest conditions tested reached an Attack Success Rate (ASR) of 67.4% on AgentDojo.

On the InjecAgent benchmark, the results were even higher, with the Time-Sensitive strategy reaching an ASR of 85.8% and the Critical strategy reaching 87.3%. These figures demonstrate that attackers can successfully trigger unauthorized actions by repurposing information from normal, non-malicious interactions, even without first poisoning the conversation history.

Can existing defenses stop ContextLure?

The research also examined how current defenses hold up against these evidence-conditioned attacks. While the authors tested various defense conditions, the findings suggest that existing protections may reduce the frequency of these attacks but do not eliminate them entirely.

The study highlights a fundamental security risk: the security impact of information in an AI interaction cannot be measured solely by its original intent. Information that seems harmless in a benign context—like a user's preference for a specific tool or a report of a failed task—can become a powerful lever for an attacker in a subsequent, unrelated interaction.

How to stay informed about AI security research

For developers and researchers working with large language models, understanding these nuances is critical for building more resilient agents. As agents become more integrated with tools and long-term memory, the surface area for indirect injections expands.

If you are looking to dive deeper into the technical specifics of this paper or similar academic findings, you can use Grafy Reader to upload the PDF and perform targeted research. This allows you to query specific mathematical formulations or experimental setups directly within the text.

Frequently asked questions

Does ContextLure require the attacker to modify previous chat turns?

No, the ContextLure framework operates on a read-only observation model. The attacker does not change any part of the prior benign conversation. Instead, they silently observe the existing interaction and use the information found there to construct a new, malicious message that is later delivered through an untrusted channel.

What role does evidence play in a ContextLure attack?

Evidence serves as the justification for a malicious request. By extracting details such as user preferences or task outcomes from a benign history, the attacker can frame an unauthorized action as a necessary or urgent response to that specific context. This makes the injection appear more legitimate and harder for the AI agent to decline.

How successful are the rewriting strategies in the study?

The rewriting strategies are highly effective at increasing attack success rates. According to the research, the Critical rewriting strategy achieved an 87.3% success rate on the InjecAgent benchmark. These strategies help the attacker present the malicious goal in a way that aligns with the urgency or priority of the previously observed benign evidence.


Source: Grafy Research Lab — ContextLure: Exploiting Benign Conversation History for Indirect Prompt Injection