arXiv:2610.25372cs.CROct 2026

Manuscript Offprint

arXiv:2610.25372

SEAL: Towards Persistent Tool Poisoning Attack against LLM Agents via Prefix-Eliciting Trigger

Nanjun Zhou, Yiming Li, Yukun Chen, Ting Qiao, Enhao Huang, Zhan Qin

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Nanjun Zhou, Yiming Li, Yukun Chen, Ting Qiao, Enhao Huang, and Zhan Qin

Abstract—Tool poisoning has emerged as a critical security threat to LLM agents, where adversaries embed malicious instructions in tool descriptions or external resources that enter the agent's context, allowing adversaries to manipulate agent's tool selection process. However, existing tool poisoning attacks primarily rely on an idealized assumption that the attacks task effect within a single interaction round. We show that their effectiveness degrades sharply in realistic multi-round agentic settings. We further reveal that this degradation stems from the fact that agents do not consistently surface attack-relevant signals in their reasoning as the planning context evolves, thereby weakening the attack's influence across rounds. To investigate whether tool poisoning remains a practical threat in such realistic settings, we propose SEAL, a two-stage method for persistent tool poisoning. Specifically, SEAL first performs Prefix-Eliciting Trigger Optimization (PETO) to optimize context-specific triggers that elicit attack-relevant reasoning prefixes, improving effectiveness within individual contexts. It then applies Local-to-Universal Trigger Aggregation (L2U) to combine these local triggers into a single universal trigger, improving generalization across different contexts and execution rounds. Extensive experiments across seven representative multi-round scenarios and different models demonstrate the attack effectiveness of SEAL, its transferability across target models, and its resistance to potential defenses.

Index Terms—Tool Poisoning, Prompt Injection, Agent Security.

I. INTRODUCTION

THE rapid evolution of Large Language Models (LLMs) has catalyzed a paradigm shift from static text generation to LLM agents [1, 2]. Unlike traditional chatbots that function in a one-shot manner, LLM agents are distinguished by two fundamental capabilities: multi-round execution and tool-using. Specifically, rather than relying primarily on its internal knowledge, the agent operates as a stateful entity that maintains a continuous execution thread by iteratively invoking external tools to interact with the environment and adjusting its plans and actions based on the feedback received in each round. These properties allow agents to orchestrate complex, long-horizon workflows ranging from software engineering [3, 4]

Non-Persistent Tool Poisoning in Multi-round Agents

Figure

Fig. 1: Conceptual illustration of non-persistent tool poisoning in a multi-round agent: the malicious tool, disguised as a decoder, is invoked by the agent upon detecting a corrupted segment in the context in the second round, but the same segment appearing in a later round is ignored.

to open-ended web navigation [5, 6] that require persistent reasoning and dynamic interaction with the world.

To standardize tool utilization and facilitate deployment, the industry has widely adopted the Model Context Protocol (MCP) [7, 8, 9]. MCP decouples the agent from external tools by establishing a Client-Server framework, where the agent functions as the client and external tools operate as the servers, interacting via a unified interface. In this interaction, the agent perceives and infers tool capabilities through natural-language tool descriptions specified by the tool provider, which serve as a primary part of context for its planning and execution. However, this architectural decoupling intensifies a critical security threat faced by agents: the attacker can manipulate the tool selection process to hijack the agent's behavior, which is known as tool poisoning [10, 11, 12]. The reason is that the agent, particularly its backend LLM, is influenced by tool-provided contextual information that is presented at each interaction, as well as by external information originating from the environment [13]. Specifically, current attackers can carry out tool poisoning attacks through two main approaches: (1) acting as a malicious MCP server provider, where deceptive tool descriptions are crafted to be consumed by the agent [10, 14]; and (2) functioning as content adversaries, who implant malicious payloads into external environmental resources that subsequently enter the agent's context [15, 16, 17].

While a few pioneering works have examined the threat of tool poisoning [10, 17], we reveal that they implicitly rely on the assumption that attacks take effect within a single interaction round. This constitutes an idealized setting that is misaligned with the multi-round execution logic of real-world agents. We further demonstrate, through empirical re-evaluation under realistic scenarios requiring multiple rounds of reasoning and execution, that the effectiveness of existing attack paradigms is unstable and can deteriorate sharply in such multi-round settings, as conceptually illustrated in Figure 1.

Nanjun Zhou, Yukun Chen, Enhao Huang and Zhan Qin are with the State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, 310007, China, and also with the Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security, Hangzhou, 310051, China (email: {nanjunzhou, yukunchen, huangenhao, qinzhan}@zju.edu.cn)

Yiming Li is with College of Computing and Data Science, Nanyang Technological University, Singapore, 639798, Singapore (e-mail: liyiming.tech@gmail.com).

Ting Qiao is with School of Control and Computer Engineering, North China Electric Power University, Beijing 102206, China (e-mail: qiaoting@ncepu.edu.cn).

Corresponding Author: Yiming Li (liyiming.tech@gmail.com)

In particular, we attribute this degradation to a reasoning bottleneck inherent in current agentic workflows. As the context length grows, the agent increasingly struggles to reliably trace back to and surface the attack's trigger condition within its active reasoning chain. As a result, the trigger condition fails to be translated into a concrete tool selection decision. We identify the core challenge as persistence, which refers to the ability of an attack's influence to remain effective across the interaction horizon: once the trigger condition is satisfied at any round, the attack should reliably steer the agent's subsequent action. Since existing paradigms largely fail to maintain such persistence, a natural yet critical question arises: Does tool poisoning pose only a limited threat in real-world agent deployments?

Unfortunately, the answer is negative. Our further analysis reveals a pivotal insight: the attack effectiveness can be restored if the agent is guided to explicitly generate a specific prefix related to the trigger condition in its reasoning. Building on this insight, we propose Self-Eliciting Attack for LLM Agents (SEAL), a two-stage method that systematically constructs persistent tool poisoning for MCP-based LLM agents, including (1) Prefix-Eliciting Trigger Optimization (PETO) and (2) Local-to-Universal Trigger Aggregation (L2U). SEAL improves persistence by optimizing a trigger payload 1^{1} that compel the agent to self-elicit the reasoning prefix related to the trigger condition. In general, PETO operates by first simulating a diverse spectrum of planning contexts across different execution rounds. For each distinct context, it individually optimizes a specific local trigger to elicit the target reasoning prefix, thereby improving attack effectiveness within that single instance. These local triggers capture context-specific attack cues but may overfit to their corresponding planning contexts. Subsequently, L2U aggregates these diverse local triggers into a single universal trigger designed to maintain high efficacy across the entire spectrum of contexts. To achieve this, we employ a search method guided by gradient and embedding heuristic strategies, performing token-wise replacement to search for a high-performing trigger across the entire task horizon. Once optimized, the universal trigger remains fixed throughout execution and does not require any re-optimization.

Our main contributions are four-fold: (1) We reveal the limitation of existing tool poisoning attacks in maintaining persistence within multi-round agent workflows. (2) We identify that persistence largely hinges on whether the model can reliably produce trigger condition-related cues in its reasoning as the context evolves. (3) We propose SEAL, a simple yet effective method that generates robust universal triggers via a two-stage optimization pipeline consisting of local target prefix elicitation and universal aggregation. (4) Extensive experiments verify the effectiveness of SEAL and its resistance to potential defenses across diverse scenarios. By demonstrating that persistent tool-using control can be improved even in realistic multi-round agent settings, our work serves as a critical alert to the community that current agent systems are far from secure against long-horizon tool poisoning threats.

References (63)