SEAL: Persistent Tool Poisoning Attacks Against LLM Agents Using Prefix-Inducing TriggersSEAL: Towards Persistent Tool Poisoning Attack against LLM Agents via Prefix-Eliciting Trigger
SEAL optimizes trigger words to sustain multi-turn tool poisoning; on Qwen-2.5-7B, Wiki-1 Pattern mode ASR is 100.00%.
Transfer-based black-box in MCP: the attacker aims to make the agent invoke a malicious tool Tm when the trigger condition occurs, and to maintain a selection probability of at least ϵ for any round satisfying the condition. The attacker cannot access the victim agent, exact queries, or the backend model; the trigger words can be optimized offline using a proxy model and then transferred. The attacker can control tool descriptions and external resources.
- Tool poisoning is mostly evaluated by single-turn effectiveness. The authors state that in multi-turn MCP agents, as context grows longer, the trigger condition does not necessarily enter reasoning, and the attack is difficult to maintain across rounds.
- SEAL first optimizes local trigger words on the per-round contexts of shadow tasks, prompting the model to write reasoning prefixes related to the trigger condition; then, by gradient and embedding alignment, it synthesizes a universal trigger word that is fixed during execution. It is divided into external pattern triggering and in-description contradiction triggering.
- For Qwen-2.5-7B, both ASRs on Wiki-1 are 100.00%, and Pattern on Google Maps is 33.33% (Table I). This proxy's Pattern transferred to Qwen-3-Max has an average ASR of 84.62% (Table XX).
- The authors note that the target prefix sometimes does not become the next-step tool call, and plan to strengthen cross-model transfer and extend to multimodal, multi-agent, and ecosystems beyond MCP. The experiments cover seven scenarios of MCP-Bench, with 2–3 tools per scenario in the main setting.
- Evaluated models
- Qwen-2.5-7BLlama-3.1-8BQwen-2.5-72BLlama-3.1-70BGLM-4.7GPT-4oClaude-3.5-SonnetQwen-3-MaxGemini-3.5-FlashGPT-5.5SecAlign (Llama-3.1-8B)
- Benchmarks
- MCP-BenchWiki-1Wiki-2Call for PapersMovie RecGoogle MapsRedditContext7
- Metrics
- ASRPer-round ASRFNRFPRPMRHCR
Researchers propose SEAL, a two-stage tool poisoning method for LLM agents that maintains attack influence across multi-turn interactions. Existing tool poisoning attacks mostly assume single-turn effectiveness; the paper states that their effectiveness drops markedly in realistic multi-turn settings because agents do not stably expose attack-relevant reasoning signals when the planning context changes. SEAL first uses PETO to optimize context-specific triggers that induce attack-relevant reasoning prefixes, then uses L2U to aggregate local triggers into a universal trigger. Experiments across seven representative multi-turn scenarios and different models show that the attack is effective, and that it transfers to target models and resists potential defenses.
Related events and news
1 events · 1 news mentions
News that mentions this paper
大模型安全周报:防线开始溃于组合,智能体授权与审计系统性缺口
- 公众号 大模型安全研究cites the paper's id or link大模型安全周报:防线开始溃于组合,智能体授权与审计的系统性缺口
SEAL: Towards Persistent Tool Poisoning Attack against LLM Agents via Prefix-Eliciting Trigger(https://arxiv.org/abs/2610.25372)
Paper analysis
What problem does this paper attempt to solve?
Existing tool poisoning is difficult to keep persistent in multi-turn agents; SEAL addresses this with two-stage trigger word optimization.
In multi-turn MCP agents, tool poisoning struggles to still control tool selection when the trigger condition appears at an arbitrary round.
- Scenario: The authors state that agents complete long-horizon tasks through multi-turn tool interaction. MCP makes natural-language tool descriptions a major part of the planning context; the authors state that this decoupling exacerbates tool poisoning, and that malicious servers or external resources can both inject instructions into the context.
- Existing shortcomings: The authors state that existing work implicitly assumes single-turn effectiveness. After re-evaluating Naive Tool Poisoning in Section III, the authors state that Per-round ASR decreases with the round; Qwen-2.5-7B fails immediately, and Qwen-2.5-72B succeeds only to a limited extent in earlier rounds and then also approaches 0, which the authors call near 0-persistence (Figure 3(a)).
- Observation: The authors believe the decay is because, as the context grows longer, the model does not necessarily write trigger-condition-related cues in its reasoning. After prefilling that prefix, Qwen-2.5-7B's Per-round ASR rises from 0 to about 0.9-persistence (Figure 3(b)).
- Approach: Proposes SEAL. PETO optimizes local trigger words per context to elicit the target reasoning prefix, and L2U then aggregates them into a universal trigger word that is fixed during execution.
- Threat model:
- Goal: Call the malicious tool Tm when the condition is met. Pattern-triggered disguises Tm as a translation that handles decoding corruption, with the trigger content coming from an external resource; Contradiction-triggered disguises Tm as conflict_resolver, with the trigger word in the tool description.
- Knowledge: transfer-based black-box. No access to the victim agent, exact queries, or the backend model; knows the task domain and tool ecosystem, and uses a proxy model and known MCP servers to build a shadow environment and shadow tasks.
- Capability: Can control the tool descriptions and external environment that enter the context; trigger words are optimized offline and are no longer updated after transfer to unseen tasks and models.
- Victim system: MCP agent. Each round's context contains the system prompt, user query, tool descriptions and schemas, and existing tool calls and observations.
What related research exists?
Related work is divided into prompt injection and tool poisoning; the authors state that most tool poisoning is still evaluated in a single turn.
The paper divides related work into prompt injection against LLMs, prompt injection against agents, and tool poisoning.
Prompt Injection Against LLMs
- Handcrafted instructions: Early work used override instructions, role-playing, etc., to induce models to ignore original instructions (Branch et al., 2022; Perez and Ribeiro, 2022; Willison, 2022, 2023; Harang, 2023; Liu et al., 2024).
- Automated search: GCG (Zou et al., 2023) uses gradient-guided token search to optimize adversarial suffixes; AutoDAN (Liu et al., 2024) uses a hierarchical genetic algorithm to generate semantically readable jailbreak prompts.
Prompt Injection Against Agents
- Entry points: Direct injection has the attacker control the user query (Zhang et al., 2025). Indirect injection places instructions in environment content, memory, or tool descriptions.
- Environment content: EIA (Liao et al., 2025) injects into hidden HTML elements to steal web agent data; AdvAgent (Xu et al., 2025) trains a prompter to generate malicious HTML. WebInject (Wang et al., 2025), UDora (Zhang et al., 2025), and ShadowCode (Yang et al., 2026) respectively address multimodal web perturbations, chain-of-thought hijacking, and conditional injection in specific code contexts.
- Memory and knowledge bases: AgentPoison (Chen et al., 2024), PoisonedRAG (Zou et al., 2025), Sleeper Attack (Li et al., 2026), and SECRET (He et al., 2026) respectively poison long-term memory or knowledge bases, inject retrieval text, let payloads sleep and then activate, and use optimized prompts to induce extraction of private content.
Tool Poisoning
- Descriptions and metadata: AMA (Mo et al., 2025) uses tool metadata to guide invocation; DPMA and GAPMA (Wang et al., 2026) rewrite descriptions with advertising-style strategies; ToolHijacker (Shi et al., 2026) optimizes descriptions to bias retrieval; FHA (Belkhiter et al., 2026) inserts gradient-optimized tokens into attacker-controlled descriptions.
- Other forms: ToolCommander (Zhang et al., 2025) first captures the query and then updates the malicious description. MCP-ITP (Li et al., 2026), MalTool (Hu et al., 2026), and AutoMalTool (He et al., 2026) respectively perform implicit poisoning, write harmful behavior into tool code, and automatically generate malicious MCP tools. MCPTox (Wang et al., 2025) is a benchmark of MCP server vulnerabilities.
- Gaps named by the paper: The authors state that most evaluations are still single-turn, inconsistent with multi-turn workflows. AgentLab (Jiang et al., 2026) performs long-horizon attacks but assumes the attacker can adaptively construct inputs across interactions. The authors also state that many works rely on conspicuous execution and do less covert conditional activation.
Baselines and Benchmarks
- Baseline methods: NaivePIA, Escape Characters, Context Ignore, Fake Completion, Combined Attack, UDora, AMA, GAPMA, and Naive Tool Poisoning as defined by the authors. UDora is adapted to the tool selection objective and optimized with the same shadow environment as SEAL.
- Benchmark: Seven multi-turn scenarios of MCP-Bench: Wiki-1, Wiki-2, Call for Papers, Movie Rec, Google Maps, Reddit, Context7.
The authors position SEAL as: without being able to rewrite inputs each round, using reasoning prefix elicitation and cross-context aggregation to improve the cross-round persistence of tool poisoning on MCP agents.
How does the paper address this problem?
SEAL first optimizes local trigger words per context to elicit reasoning prefixes, then aggregates them into a fixed universal trigger word.
SEAL has two stages: first, each round's context separately elicits a reasoning prefix related to the trigger condition, then these local trigger words are synthesized into a universal trigger word that is fixed throughout.
Setup and persistence
- The agent has at most T rounds. The round-t planning context Ct contains the system prompt, user query, tool set and its natural-language descriptions and schemas, and the history Ht−1. The backend model generates reasoning and action at, and the observation is merged into the next round's context.
- The trigger condition predicate ϕ(Ct)=1 means the current context satisfies the activation condition. Persistence is defined as
∀ t, ϕ(Ct)=1 ⇒ P(at=Tm∣ Ct)≥ϵ i.e., when the condition holds at any round, the probability of selecting Tm is not lower than ϵ.
- The attacker knows the task domain and the MCP tool ecosystem, but not the exact queries or the backend model. It uses a proxy model and known servers to generate n shadow tasks, optimizes offline in the shadow environment, and then transfers.
Two trigger modes
- Pattern-triggered: Tm is disguised as a translation that can handle decoding-corrupted text. The trigger content is placed in an external resource, retrieved by a benign tool, and then enters the context. The goal is to elicit the short reasoning prefix specified in the paper related to decoding errors, and then lead to that tool.
- Contradiction-triggered: Tm is disguised as conflict_resolver. The trigger word is written directly in the tool description; when other tools' outputs contain contradictory content, it elicits a short prefix related to inconsistency. The main text gives the strings of these two prefixes, which are not repeated here.
- The tool descriptions and initial trigger words are generated by GPT-5. The appendix gives the full descriptions and initial strings.
PETO
- Multiple shadow tasks are created from known target tasks, preserving user intent and changing the task description, thereby obtaining planning contexts for different rounds. Each context separately optimizes one local trigger word z.
- The elicitation loss is the negative log-likelihood of generating the target prefix after injecting the trigger word; the perplexity term is the average token negative log-likelihood of the trigger word itself. The total objective is
minz L(z)=Lelicit(z)+λ Lppl(z) λ balances elicitation and literal likelihood. The main experiment uses λ=0.05.
- z is discrete. Using the one-hot gradient, the KP=32 candidates with the largest negative gradient at each position are taken; at each step B=32 substitutions are sampled for the forward pass, and the one with the lowest loss is kept (Algorithm 1). Pattern mode uses 300 steps per context, Contradiction mode 500 steps. 5 shadow tasks per scenario.
L2U
- Local trigger words may only fit the corresponding context. L2U finds shared tokens at each trigger position and synthesizes a trigger word with a higher average score across all contexts.
- Proposition 1 gives a bound under the β-smooth assumption: the loss increase from a shared substitution can be bounded by the first-order term of the average gradient plus an error controlled by the cross-context gradient difference and embedding distance. Based on this, two heuristics are used; the paper does not present the proposition as an experimental conclusion.
- Grad-Align: ranks positions by the cosine consistency of each context's gradient with the average gradient, searching positions with high consistency first. Emb-Align: restricts candidates to the top-K words with the closest cosine to the local embedding mean at that position; the main experiment uses K=2.
- Scoring is by keyword matching: a hit on a reasoning cue adds 1, a hit on a tool-call cue adds 2. Starting from the local trigger word with the highest average score, greedy substitution is performed in position order, accepted only when the average score rises, until a full round yields no improvement. At most 10 epochs; 8 contexts are held out for validation, with early stopping after 6 consecutive non-improvements. Appendix Table VIII lists the keywords, which are not listed here.
Execution and determination
- The universal trigger word remains fixed during execution on the victim agent and is no longer optimized. Pattern mode places the trigger content in an external resource; Contradiction mode places it in the tool description.
- The success criterion in the main experiment is: whether Tm is called at the round where the trigger condition is located. Temperature and trajectory construction are in Question 4.
What experiments did the paper conduct?
For Qwen-2.5-7B on Wiki-1, the ASR of both SEAL variants is 100.00% (Table I).
Experimental Setup
- Models: The proxy, which is also the evaluated model, is Qwen-2.5-7B and Llama-3.1-8B. Transfer targets also include Qwen-2.5-72B, Llama-3.1-70B, GLM-4.7, GPT-4o, Claude-3.5-Sonnet, Qwen-3-Max, Gemini-3.5-Flash, and GPT-5.5. Appendix C-A additionally uses o3-mini. GPT-5 generates trajectories, shadow tasks, and initial descriptions, and performs CoT monitor; GPT-4o compresses tool outputs and performs Tool Auditor.
- Data: Seven scenarios in MCP-Bench, with rounds of 7, 8, 10, 8, 10, 10, and 6 respectively. The main ASR builds one trajectory for each t=2 to T, 52 in total. Each scenario has 5 shadow tasks. The main setting has 2–3 tools per scenario. Section III additionally uses a 20-round MCP containing one benign retrieval tool and a disguised malicious tool, with 20 runs per position.
- Baselines: Nine, see Question 2. UDora is adapted to the same tool selection objective and optimized with the same shadow environment.
- Metrics: ASR is the proportion of trajectories that invoke Tm at the trigger round. The authors interpret it as the expected success rate when trigger positions are uniform; if successful throughout, ASR=1. Per-round ASR is the success proportion across repeated runs at that position. There are also FNR, FPR, PMR, and HCR. The appendix states that the reported averages are aggregated over 52 trajectories.
- Decoding: Main evaluation temperature 0. PETO's λ=0.05; L2U's K=2.
- Judgment: The main ASR checks whether the target tool is invoked, not an LLM judge. CoT monitor is GPT-5, outputting ALLOW or BLOCK; Figure 8 gives the full prompt. KaD's canary is Hello World!. The perplexity threshold is the 95th percentile of the perplexity of held-out benign instructions. Tool Auditor is GPT-4o.
Main Results
The table below lists only some scenarios from Table I, in %. The evaluated model is the proxy model of that table. Wiki-2, Call for Papers, and Movie Rec are omitted.
Swipe horizontally to read the table
Model and Method Wiki-1 Google Maps Reddit Context7 Qwen-2.5-7B Pattern SEAL 100.00 33.33 66.67 80.00 Qwen-2.5-7B Contradiction SEAL 100.00 100.00 44.44 60.00 Llama-3.1-8B Pattern SEAL 100.00 77.78 88.89 60.00 Llama-3.1-8B Contradiction SEAL 100.00 55.56 77.78 40.00 Qwen-2.5-7B Naive Tool Poisoning 0.00 0.00 0.00 0.00 Llama-3.1-8B Naive Tool Poisoning 66.67 44.44 66.67 40.00 - The authors state that the two SEAL variants are overall stronger than the nine baselines, and that baselines often succeed only in individual scenarios. Exceptions in Table I: on Llama-3.1-8B, Contradiction mode's Wiki-2 is 71.43%, lower than Naive Tool Poisoning's 100.00%; this mode's Context7 is 40.00%, the same as Fake Completion, UDora, and Naive Tool Poisoning.
- The authors state that Llama-3.1-8B is more susceptible than Qwen-2.5-7B, and give one possible explanation: Qwen-2.5 underwent large-scale supervised fine-tuning and multi-stage reinforcement learning. This is the authors' speculation.
- The text of Figure 5 shows that Wiki-1's Pattern mode starts sentences with the same target prefix in both Round 2 and Round 7. The authors state that this differs from the per-round decay in Section III.
Cross-Model Transfer
- Table XX's proxy is Qwen-2.5-7B, and the numbers are cross-scenario aggregated ASR. Pattern mode: this model 75.00%, Llama-3.1-8B 63.46%, Qwen-2.5-72B 61.54%, GPT-4o 51.92%, Claude-3.5-Sonnet 71.15%, GLM-4.7 59.62%, Qwen-3-Max 84.62%. The target of the first cell is the proxy itself.
- Contradiction mode in the same table, in the same order: 78.85%, 67.31%, 42.31%, 32.69%, 25.00%, 25.00%, 15.38%. The authors state that this mode is weaker and depends more on how each model handles inconsistency.
- The authors state that trigger words optimized on Qwen transfer well to the Llama family, and the reverse is weaker, especially for Qwen-2.5-7B; they hypothesize that trigger words optimized on a more constrained proxy generalize more easily across models. Figure 6 also lists Llama-3.1-70B, Gemini-3.5-Flash, and GPT-5.5; the authors state that it remains effective on GPT-5.5 and Gemini-3.5. The column alignment of that figure's cells in the extracted text is unreliable, so cell numbers are not transcribed.
Evaluation Against Potential Defenses
- CoT monitor (GPT-5, Table IV, Qwen-2.5-7B). Pattern's FNR from Wiki-1 to Context7 is 100.00, 100.00, 87.50, 100.00, 100.00, 66.67, 100.00. Contradiction is 100.00, 100.00, 71.43, 28.57, 33.33, 100.00, 66.67. FPR is 50.00, 0.00, 11.11, 0.00, 33.33, 0.00, 0.00. The authors state that Pattern mode evades monitoring in most scenarios; Wiki-1's FPR is 50.00%, which the authors state would block half of benign executions. Movie Rec's Contradiction FNR is 28.57%, and the authors state that contradiction triggers are more easily detected on complex tasks.
- KaD and perplexity (Table V, same model): KaD's FNR is 100.00% in all seven scenarios and on Average. Perplexity detection is 78.85% on Average and 42.86% on Movie Rec. The authors connect the latter to PETO's perplexity term.
- SecAlign and Tool Auditor: SecAlign is based on Llama-3.1-8B. Average ΔASR is Pattern 1.92%, Contradiction 11.54% (Table VI); Contradiction is 42.86 on Movie Rec, Pattern is 0.00 in six scenarios and 11.11 on Reddit. Tool Auditor (GPT-4o, Table VII) has FNR of 100.00% and FPR of 0.00% for both SEAL variants, GAPMA, and AMA; the FNR for the five instruction injection baselines is 0.00. The authors believe SEAL's descriptions resemble ordinary guidance for handling errors or inconsistencies.
Other Ablations and Analyses
- L2U: Qwen-2.5-7B, Pattern, with PETO only, ASR on Wiki-1, Google Maps, Reddit is 0.00, 0.00, 0.00; after adding L2U it is 100.00, 33.33, 66.67 (Table XVIII).
- Grad-Align: same model and mode, Table II's Average goes from 55.77 to 75.00; Wiki-2 goes from 28.57 to 71.43.
- top-K: same setting, Average for K=1, 2, 4, 6, 8 is 59.62, 75.00, 67.31, 69.23, 71.15 (Table III). K=2 is highest, not monotonically increasing with K.
- Number of tools: Wiki-1, Qwen-2.5-7B, trigger words optimized on 3 tools used with 20 tools give ASR 0.00; optimizing at that scale gives 66.67 (Table XIV).
- Per-round re-optimization UDora: the authors state that on Wiki-1 both SEAL variants outperform this control, and on Call for Papers Pattern is on par with it. Table XI does not state the model: the control is 0 at R7, and both SEAL variants are 1 from R2–R7. The authors state that this control needs to see trajectories online and re-optimize each round.
- Prefix, temperature, and harm: Google Maps, Qwen Pattern, PETO+L2U has PMR 77.78% and ASR 33.33% (Table XVIII). At temperature 0.1 with 20 runs per position, Pattern SEAL's worst-round Per-round ASR is 65.00% on Wiki-1, and Naive Tool Poisoning is 0.00 (Table IX). Contradiction SEAL, Qwen-2.5-7B, Wiki-1 Case 2's HCR is 83.33%, and Google Maps Case 2 is 66.67% (Table XVI).
What are some points that can be further explored?
The authors note that the prefix does not necessarily turn into the next-step action, and plan to study transfer, multimodality, and multi-agent.
Limitations and future directions noted by the authors
- In a few cases, the agent generated the target prefix but did not turn it into the next-step action. The authors consider how reasoning-layer manipulation precisely affects downstream actions to remain a future direction (Section VI, details in Appendix C-M).
- The authors describe cross-model transfer, especially to closed-source systems, as an important and practical direction, and believe future work should more systematically characterize and strengthen transferability (Section VI).
- The study is limited to text and single agents. The authors believe future work can extend to multimodal agents involving vision and audio, and to multi-agent systems (Section VI).
- This paper centers on MCP agents. The authors believe future work can examine how persistent reasoning-layer attacks manifest in other deployment forms such as Agent Skills (Section VI).
Experimental coverage
- The main evaluation covers seven text scenarios of MCP-Bench, with rounds 7, 8, 10, 8, 10, 10, 6, totaling 52 trigger-position trajectories; the proxy models are Qwen-2.5-7B and Llama-3.1-8B (Section V-A, Appendix B).
- Table XX reports the aggregate ASR of proxy Qwen-2.5-7B transferred to Llama-3.1-8B, Qwen-2.5-72B, GPT-4o, Claude-3.5-Sonnet, GLM-4.7, and Qwen-3-Max. The text of Figure 6 also lists Llama-3.1-70B, Gemini-3.5-Flash, and GPT-5.5; the main text does not give verifiable per-column numbers.
- Defense evaluations include CoT monitor (GPT-5), KaD, perplexity detection, SecAlign (Llama-3.1-8B checkpoint), and Tool Auditor (GPT-4o) (Section V-E, V-F).
- The main setting uses 2–3 tools per scenario. The appendix additionally reports 4, 5, 8, and 20 tools on Wiki-1 with Qwen-2.5-7B (Table XIV). The main ASR uses temperature 0 and 1 trajectory per position; Table IX additionally reports the worst-round Per-round ASR of five scenarios at temperature 0.1 with 20 runs per position.
- Trigger words are optimized by gradient search on the proxy model; GPT-5 generates shadow tasks, trajectories, and initial descriptions. The main ASR is computed by whether the target tool is called. The paper does not report multiple repetitions of the main ASR, nor agreement with human judgment. Appendix C-E treats per-round re-optimization as a stronger comparison and states that it requires online access to trajectories and does not fall within SEAL's threat model.
Summarize the main content of the paper
SEAL uses two-stage trigger word optimization to improve the persistence of multi-turn tool poisoning, and the authors state that it can evade several defenses.
SEAL targets multi-turn tool poisoning on MCP agents, with the goal that the specified malicious tool is still called when the trigger condition appears at an unknown round.
- Problem: The authors state that existing tool poisoning is evaluated as taking effect in a single turn. In multi-turn settings, as the context grows longer, the agent does not necessarily write the trigger condition in its reasoning, and the Per-round ASR of Naive Tool Poisoning drops to near 0. After prefilling the relevant prefix, Qwen-2.5-7B rises from 0 to about 0.9-persistence.
- Method: Under transfer-based black-box, PETO optimizes local trigger words on the per-round contexts of shadow tasks, making the proxy model more likely to generate the target reasoning prefix, and adds a perplexity term. L2U synthesizes a universal trigger word that is no longer updated during execution, based on gradient direction consistency and embedding proximity. One mode places the trigger content in an external resource, the other writes it into the tool description.
- Main results: On Qwen-2.5-7B, the ASR of both modes on Wiki-1 is 100.00%; on Google Maps, Pattern is 33.33% and Contradiction is 100.00% (Table I, target is the proxy). On Llama-3.1-8B, Contradiction on Wiki-2 is 71.43%, lower than Naive Tool Poisoning's 100.00%.
- Transfer and defenses: The Pattern trigger word of proxy Qwen-2.5-7B transferred to Qwen-3-Max gives an aggregate ASR of 84.62%; Contradiction transferred to that model gives 15.38% (Table XX). Tool Auditor's FNR for both modes is 100.00% (Table VII). After SecAlign, the average ΔASR of Pattern is 1.92% (Table VI, Llama-3.1-8B).
- Unmatched points: On Google Maps, Qwen's Pattern mode has PMR 77.78% and ASR 33.33% (Table XVIII). The authors state that persistent tool control can still be improved in the multi-turn setting, and that current agents do not yet block long-horizon tool poisoning; they also note that the target prefix sometimes does not become the next-step call.