Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: 5e759069
Paper published February 1, 2026
Entry analyzed April 11, 2026
Paper-reported evidence
Confidence: Source-linked

The LMVD-ID is an internal research identifier, not an official CVE identifier.

Adaptive Agent Tool Injection

Agentic LLMs integrated with external data services (e.g., Model Context Protocol, MCP) are vulnerable to Adaptive Indirect Prompt Injection (IPI) attacks. When an agent queries external servers, attackers can inject…

BibTeX citation

Paper-evaluated models(6)

GPT-4.1, DeepSeek R1, Gemini 2.5 Flash +3 more
  • GPT-4.1
  • DeepSeek R1
  • Gemini 2.5 Flash
  • Qwen 3 8B
  • Llama 3.1 8B
  • Mistral 8B

Description

Agentic LLMs integrated with external data services (e.g., Model Context Protocol, MCP) are vulnerable to Adaptive Indirect Prompt Injection (IPI) attacks. When an agent queries external servers, attackers can inject malicious payloads into the retrieved content to hijack the agent's reasoning process and force the execution of high-authority tools. Unlike traditional static prompt injections, this vulnerability dynamically exploits the agent's internal logic audit. By using Markovian transition modeling, the attacker predicts the agent's expected benign tool invocation and automatically selects a malicious tool with high semantic similarity to the user's ongoing task context. This semantic alignment prevents the reasoning LLM (Chain-of-Thought) from flagging the instruction as a "Security Risk" or "Unrelated Information," allowing the injected payload to successfully bypass internal safety filters and dynamic defense layers.

Examples

The paper does not provide verbatim adversarial prompts, but demonstrates the attack logic via semantic tool substitution:

  • Attack Scenario: In a "Coffee Delivery" task trajectory, an attacker intercepts the MCP server response. Instead of injecting a jarring, out-of-context command (e.g., forcing a "Delete File" tool call which the LLM would reject as unrelated), the attacker utilizes the transition matrix to select a semantically congruent malicious tool, such as "Transfer Money". The attack framework synthesizes a prompt mapping the coffee transaction to the unauthorized financial transfer tool, tricking the agent into executing it under the guise of completing the original task.
  • For the complete repository of 3,691 vulnerable agent trajectories, 277 high-authority attack tools, and generated adaptive prompts, see the IPI-3k dataset introduced in the paper.

Impact

Successful exploitation allows third-party attackers or malicious MCP server controllers to induce unauthorized behaviors via the agent's toolsets. This can lead to severe consequences including arbitrary data exfiltration, financial loss, and host system damage. The attack effectively halves the efficacy of state-of-the-art IPI detectors (e.g., MELON, Pi-Detector) and degrades overall benign agent utility by a factor of 1.78.

Affected Systems

  • Tool-augmented LLM agents and ReAct frameworks interfacing with external data environments (e.g., web retrieval, databases).
  • Agents leveraging the Model Context Protocol (MCP) to interact with third-party servers.
  • Underlying foundation models evaluated as vulnerable include commercial models (GPT-4.1, Gemini-2.5-Flash, DeepSeek-R1) and open-source models (Qwen3-8B, LLaMA-3.1-8B, Mistral-8B). Open-source models exhibited notably higher vulnerability (up to 58.1% Attack Success Rate).

Mitigation Steps

While the paper notes that existing pre-detection (input-level) and post-detection (output-level) defenses are insufficiently robust against adaptive tool selection, the architectural findings suggest the following mitigations:

  • Principle of Least Privilege for MCPs: Enforce strict permission boundaries on external MCP servers. High-authority tools (e.g., file deletion, financial transactions) should require an out-of-band "human-in-the-loop" authorization prompt, preventing automated execution driven by retrieved external data.
  • Semantic Boundary Enforcement: Implement strict input validation that isolates external data payloads from execution contexts. Do not allow context parsed from third-party APIs to natively dictate the functional arguments of high-risk tools.
  • Adversarial Fine-Tuning: Continually update the agent's system prompts and reasoning filters using adaptive datasets (such as IPI-3k) to train the model to recognize semantically aligned but unauthorized tool transitions.

Research context and confidence

Evidence and verification
Paper-reported; independent reproduction is not documented.
Primary research source linked.
Severity
Not rated by this catalog.
Source and publication type
arXiv · Research preprint.
Peer-review status is not provided by this source.
Author and publication status
Author metadata is not stored; see the primary paper.
Threat model and attacker access
Black-box model, service, or application access.
Related deployment categories
Retrieval-augmented generation; Agent workflows; Model APIs
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
Tool-augmented LLM agents and ReAct frameworks interfacing with external data environments (e.g., web retrieval, databases). Agents leveraging the Model Context Protocol (MCP) to interact with third-party servers…

Research Paper

AdapTools: Adaptive Tool-based Indirect Prompt Injection Attacks on Agentic LLMs

Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.

View Paper

Evidence

This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.

https://arxiv.org/abs/2602.20720