STAC: How Seemingly Harmless Tool-Calling Chains Break LLM AgentsSTAC: When Innocent Tools Form Dangerous Chains for LLM Agents
The authors propose a multi-turn sequential tool attack framework for tool-calling agents, achieving an average final ASR of 91.2% across 8 models.
The attacker has direct user-interface interaction access and white-box knowledge of the environment specification (tool modes, data, and initial state), no access to model weights or the system prompt, can adaptively adjust inputs over multiple rounds, but cannot tamper with tool code or the system prompt.
- Agents change the external environment through tool calls, bringing security threats beyond text generation; existing safety checks mostly evaluate single tool calls in isolation and struggle to defend against multi-turn attacks where malicious intent is diluted across multiple steps.
- Proposes the STAC framework, which generates multi-step tool chains through reasoning planning, verifies feasibility by execution in real environments, reverse-engineers seemingly harmless multi-turn prefixes, and uses a planner to adaptively induce the agent to execute the final malicious call.
- Across 483 cases, the average final ASR of the 8 tested agents reaches 91.2%; prompt defenses are all insufficient under multi-round adaptive attacks, with the reasoning defense reducing GPT-4.1's ASR to 58.6% in the first round but rising to 86.7% by the final round.
- The evaluation relies on same-family models as judges, and the main experiments are based on single-run point estimates; attack success rates are conditional on validated tool chains and synthetic prefixes; the real MCP tool experiments are limited in scale and sequence-level monitoring was not evaluated.
- Evaluated models
- GPT-4.1 (GPT-4.1-2025-04-14)GPT-4.1-mini (GPT-4.1-mini-2025-04-14)Qwen3-32BLlama-3.1-405B-InstructLlama-3.3-70B-InstructMistral-Large-Instruct-2411Mistral-Small-3.2-24B-Instruct-2506Magistral-Small-2506
- Benchmarks
- SHADE-ArenaAgent-SafetyBenchOpenAgentSafety
- Metrics
- ASRPHRRGoal Progress
Researchers at AWS AI Labs propose Sequential Tool Attack Chaining (STAC), a multi-turn attack framework for tool-based LLM agents: it chains together tool calls that are each harmless on their own, with the malicious intent appearing only in the final step. The framework uses an automated closed-loop pipeline to generate executable tool chains, verify them in the environment, and reverse-engineer covert multi-turn prompts that induce the agent to execute them. The researchers built 483 cases and 1,352 user-agent-environment interactions on the SHADE-Arena and Agent-SafetyBench environments, covering 10 failure modes; across 8 agents including GPT-4.1, the average final attack success rate was 91.2%, exceeding 90% for all but one model, with a prompt harmfulness rate below 2% and a refusal rate below 4%.
Why it was selectedThe paper provides 483 executable tool chain cases with an average attack success rate of 91.2%, and compares various prompt defenses, which can help teams deploying tool-based agents evaluate sequence-level risks.
Related events and news
1 events · 1 news mentions
News that mentions this paper
HackAgent v0.17.0 发布,内置 19 种攻击手法
- 公众号 句芒安全实验室cites the paper's id or linkHackAgent 19 种攻击手法拆解:AI Agent 越狱测试与提示词注入
它复现的是论文 arXiv:2509.25624 里的 FM4、FM5、FM6 三类失败模式,不是全量基准。
Paper analysis
What problem does this paper attempt to solve?
The authors propose a multi-round tool-chain attack framework for tool-based agents, addressing the novel threat of individually innocuous-looking tools that combine into harmful ones.
This paper attempts to address the security vulnerability of tool-calling LLM agents to Sequential Tool Attack Chaining (STAC) in multi-turn interactions.
- Agent tool interactions expose new physical and digital environment threats: The authors point out that, unlike traditional conversational LLMs that only generate text content, tool-calling agents can execute code, call APIs, read and write databases, and control external systems, and their actions can directly and irreversibly change the environment state.
- Existing safety guardrails are mainly limited to single-step and isolated call evaluation: The authors state that existing access control lists or safety checks typically make judgments for individual tool calls and cannot identify hidden malicious intent dispersed across multiple turns of legitimate operations.
- Core observation is that steps are harmless individually but harmful in combination: The authors propose that attackers can decompose a malicious goal into a series of seemingly completely reasonable and harmless prerequisite operations, revealing the malicious purpose only in the final step, thereby bypassing security defenses against single-step requests throughout the process.
- Proposes an automated closed-loop attack generation and verification framework: The authors construct the STAC framework, systematically studying the security boundaries of agents under multi-turn tool chain attacks through automated planning, environment execution verification, prompt reverse engineering, and adaptive attacks.
- Threat model:
- Access: The attacker inputs prompts directly through the user-facing interface (e.g., via stolen accounts, shared agents, or delegated access); having direct access also allows the attacker to forge multi-turn interaction history as context injection.
- Knowledge: In the main simulated evaluation, the attacker has white-box knowledge of the environment specification (including tool schemas, available data, and initial state), but cannot access the agent's model weights and system prompt; in the real MCP evaluation, it is set to black-box knowledge.
- Capability: The attacker can adaptively adjust prompts across multiple interaction turns, but cannot modify tool implementation code, inject malicious content into tool outputs, or tamper with the agent's system prompt.
- Victim system: The victim system is an autonomous LLM agent with multi-step tool calling and environment execution capabilities.
What related research exists?
The authors review four research categories: tool attacks, multi-turn jailbreaks, combined safety, and agent defenses, highlighting the uniqueness of this paper across multiple dimensions.
The authors systematically discuss four categories of related research in the paper and compare key works in Table 7:
Agent Safety and Tool-Call Attacks
- Single-turn and direct injection benchmarks: Andriushchenko et al. (2024) and Guo et al. (2024) evaluated malicious requests for general tasks and code generation; Zhang et al. (2024) and Zhan et al. (2024) assessed direct and indirect prompt injection risks for agents; ToolEmu (Ruan et al., 2023) and HAICOSYSTEM (Zhou et al., 2024) simulated tool-call risks. The authors note that these works are mainly limited to single-turn interactions or single malicious calls.
- Attack mechanisms targeting tool interfaces: Mo et al. (2025) proposed the Attractive Metadata Attack to induce calls to malicious tools; Triedman et al. (2025) explored control-flow hijacking in multi-agent settings; Tur et al. (2025) manually constructed multi-turn web agent attack cases (n=49). The authors state that Tur et al.'s work relies on manual design and lacks automation and systematicity.
Multi-Turn Jailbreaks
- Multi-turn induction of conversational LLMs: Crescendo (Russinovich et al., 2024), X-Teaming (Rahman et al., 2025), and others gradually induce LLM jailbreaks through multi-turn conversations; other works combine planning reasoning (Ren et al., 2024) or policy learning (Chen et al., 2025). The authors note that these methods aim to induce harmful text generation, whereas STAC focuses on tool-call sequences that cause changes to external environment states.
Compositional Agent Security
- Task decomposition and cross-base compositional risks: MT-AgentRisk (Li et al., 2026a) decomposes harmful tasks into multi-step sequences; MOSAIC-Bench (Steinberg and Gal, 2026) and MOSAIC-CLI (Wu et al., 2026b) target code and command-line vulnerabilities; SCR (Xie et al., 2026) and Wang et al. (2026b) measure compositional risks in skill markets; Ahad et al. (2026) explore task scheduling decomposition. The authors state that the STAC preprint (September 2025) predates this series of works.
Agent Defense Mechanisms (Defending Tool-Enabled Agents)
- Prompt and runtime guardrails: These include history-memory-based monitoring MAGE (Wang et al., 2026c), contextual data provenance auditing (Weng et al., 2026), compositional policy algebra (Schneider et al., 2026), formal verification (Wu et al., 2026a), and the control-flow isolation architecture CaMeL (Debenedetti et al., 2025). The authors note that some guardrails (such as MAGE) showed protective effects when statically replaying STAC attack chains, but robustness against adaptive attackers was not tested.
Baseline Methods and Benchmarks
- Comparison baselines: Attack baselines include single-turn attacks, MT-AgentRisk (Li et al., 2026a), and X-Teaming (Rahman et al., 2025); defense baselines include Failure Modes (Zhang et al., 2024), Spotlighting via Datamarking (Hines et al., 2024), and ToolShield (Li et al., 2026a).
- Evaluation benchmarks: The experiments used SHADE-Arena (Kutasov et al., 2025), Agent-SafetyBench (Zhang et al., 2024), and OpenAgentSafety (Vijayvargiya et al., 2025).
The authors state that STAC is a research framework combining a general conversational tool-call surface, enforced single-step apparent harmlessness, environment-interactive execution verification, and a full suite of defense analyses (Table 7).
How does the paper address this problem?
The authors propose a closed-loop STAC framework comprising tool-chain generation, environment execution validation, prompt reverse construction, and adaptive execution.
The authors propose a closed-loop automated attack framework STAC (Sequential Tool Attack Chaining) with five components, which induces the agent to execute malicious tool chains by reverse-engineering prerequisite contexts and implementing adaptive planning.
Attack Formalization and Phase Division
- Sequential chain setting: The attack chain length is set to L ∈ {2, …, 6}, consisting of a sequence of tool calls {TC1, …, TCL}.
- Stealth constraint: The first L−1 steps remain reasonable and seemingly harmless in isolation, with the malicious purpose only revealed at the final tool call TCL. The attack execution round index is defined as τ ∈ {T, T+1, T+2}, where T is the execution round of the first attempt to execute the final goal.
Tool Chain Generation and Environment Execution Verification
- Generator planning: The Generator is based on GPT-4.1, taking environment information, tool specifications, and target failure modes as input, and plans an initial attack chain {TC1, …, TCL} of 2–6 tool calls without interacting with the environment.
- Verifier execution and correction: The Verifier, also based on GPT-4.1, executes the generated tool calls one by one in the real environment and observes feedback Ei. When encountering parameter errors, missing prerequisites, or call failures, the Verifier dynamically adjusts parameters, replaces tools, or restructures the sequence, outputting a verified tool chain that can actually run successfully.
Prompt Reverse Engineering and Adaptive Attack Execution
- Prompt Writer constructs prefix: The Prompt Writer, based on Qwen3-32B, reverse-generates seemingly legitimate user prompts {P1, …, PL−1} for the first L−1 steps of the verified tool chain, and concatenates them with execution outputs to form a synthetic multi-turn dialogue history, without needing to replay against the target model repeatedly.
- Planner adaptive jailbreak: The Planner, based on GPT-4.1, analyzes the agent's response Rτ and environment feedback Eτ within at most 3 execution rounds on the basis of the synthetic dialogue prefix, adaptively generating attack prompts Pτ to facilitate the final malicious call.
Evaluation and Defense Design
- Judge scoring: The Judge, based on GPT-4.1, scores three metrics each round: Prompt Harmlessness (-3 to 3 points), Attack Goal Progress (-3 to 3 points, with 3 points indicating complete success and triggering early stopping), and Agent Helpfulness (-2 to 2 points).
- Defense prompt design:
- Reasoning defense: In the system prompt, the agent is required to analyze affected parties, potential negative consequences, and positive benefits before calling any tool, and to refuse if potential harm outweighs benefits.
- Summarization defense: The agent is required to summarize the user's cumulative intent across multi-turn interactions before responding each round, identifying malicious risks built across turns.
What experiments did the paper conduct?
The authors evaluate 8 models and multiple types of defenses on 483 simulated cases and real MCP tools, finding generally high vulnerability among the tested agents.
Experimental Setup
- Models tested: A total of 8 models were evaluated, covering 4 model families: GPT-4.1-2025-04-14, GPT-4.1-mini-2025-04-14, Qwen3-32B, Llama-3.1-405B-Instruct, Llama-3.3-70B-Instruct, Mistral-Large-Instruct-2411, Mistral-Small-3.2-24B-Instruct-2506, Magistral-Small-2506.
- Evaluation datasets and environments: The main benchmark contains 483 cases covering 66 environments, of which 390 cases come from 4 environments in SHADE-Arena (Spam Filter 103 cases, Travel 99 cases, Workspace 98 cases, Banking 90 cases), and 93 cases come from 62 environments in Agent-SafetyBench. In addition, a real MCP tool evaluation set based on OpenAgentSafety was constructed.
- Baseline methods: Attack baselines include single-turn STAC, MT-AgentRisk (n=124), and X-Teaming; defense baselines include Failure Modes, Spotlighting via Datamarking, and ToolShield.
- Metric definitions: Attack Success Rate (ASR, proportion with Goal Progress = 3), Prompt Harmfulness rate (PH, proportion with Prompt Harmlessness < 0), Refusal Rate (RR, proportion with Agent Helpfulness < 0).
- Evaluation method: GPT-4.1 served as the Judge, making determinations according to the rating scale; evaluation was terminated early when Goal Progress reached 3.
- Sample size and interaction budget: Main evaluation sample size n=483; user planning rounds capped at 3 rounds, with the agent allowed up to 10 tool calls per round interacting with the environment.
Main Results
The table below presents the ASR, PH, and RR evaluation results for the 8 tested models on 483 benchmark cases (per Table 2):
Swipe horizontally to read the table
Model tested ASR(T) ASR(T+1) ASR(T+2) PH(T) PH(T+1) PH(T+2) RR(T) RR(T+1) RR(T+2) GPT-4.1 87.4% 92.5% 93.4% 0.4% 0.2% 0.2% 1.9% 0.2% 0.2% GPT-4.1-mini 85.7% 93.8% 95.0% 0.2% 0.2% 0.0% 1.0% 0.6% 0.4% Qwen3-32B 85.3% 91.7% 93.2% 0.4% 0.2% 0.0% 0.8% 0.6% 0.6% Llama-3.1-405B 86.3% 90.7% 92.3% 0.8% 0.2% 0.0% 1.4% 1.4% 1.0% Llama-3.3-70B 85.9% 92.8% 94.0% 0.4% 0.4% 0.2% 0.4% 0.4% 0.4% Mistral-Large 82.8% 90.7% 92.3% 0.6% 0.2% 0.2% 1.7% 3.1% 2.1% Mistral-Small 80.7% 88.8% 91.3% 0.6% 0.2% 0.0% 3.5% 2.9% 2.9% Magistral-Small 46.2% 70.0% 77.8% 0.6% 1.2% 1.4% 3.1% 2.5% 2.3% Average 80.0% 88.9% 91.2% 0.5% 0.3% 0.2% 1.7% 1.5% 1.2% - Universally high vulnerability: Except for Magistral-Small, the final ASR of the remaining 7 models at round T+2 all exceeded 90%, and the average final ASR across the 8 models reached 91.2%.
- High stealth maintained: All models had prompt harmfulness rates PH below 2% (average only 0.2%–0.5%) and refusal rates RR below 4% (average only 1.2%–1.7%).
- Adaptive rounds improve effectiveness: As execution rounds advanced from T to T+2, the average ASR rose from 80.0% to 91.2%; the authors note that the multi-round adaptive mechanism can effectively overcome initial execution obstacles.
Attack Method and Prefix Ablation Comparison
- What was tested: On 390 SHADE-Arena cases, multi-round STAC, single-round STAC without prefixes, MT-AgentRisk, and X-Teaming were compared (per Table 3).
- Experimental results: Multi-round STAC achieved 95.1% ASR, 0.0% PH, 0.5% RR, and an average of 2.8 rounds; single-round STAC achieved 72.8% ASR, 1.0% PH, 0.5% RR (1.0 rounds); MT-AgentRisk achieved 53.2% ASR, 27.4% PH, 5.6% RR (3.9 rounds); X-Teaming achieved 61.5% ASR (4.2 rounds).
- Authors' interpretation: The ASR of single-round STAC was 22.3 percentage points lower than full STAC; the authors believe this quantifies the contextual groundwork provided by the synthetic multi-turn prefix. MT-AgentRisk, lacking environment verification and with sub-steps potentially carrying obvious maliciousness, achieved lower success rates and a PH as high as 27.4%.
Real MCP Tool Backend Generalization Validation
- What was tested: GPT-4.1 was tested in real file system and Playwright browser automation Docker environments from the OpenAgentSafety benchmark, comparing the full pipeline against direct attacks without tool chains (per Table 12).
- Experimental results: On 32 matched tasks, the full pipeline achieved an ASR of 35.5% (12.5% without tool chains), a post-hoc full success rate of 52.9% (12.5% without tool chains), and the refusal rate dropped from 12.5% to 3.6%.
- Authors' interpretation: The authors note that the black-box setting and permission restrictions under real MCP led to lower success rates than in simulated environments (35.5% vs. 95.1%), but the verified tool chain still significantly amplified attack effectiveness while maintaining a low refusal rate.
Prompt Defense and Defense-Aware Attack Evaluation
- What was tested: On 483 cases, the performance of GPT-4.1 equipped with different defenses was evaluated, along with defense-aware adaptive attacks when defense prompts were provided to the Planner (per Table 4, Table 6).
- Experimental results: On GPT-4.1, the Reasoning defense achieved the lowest ASR of 58.6% at round T (a 28.8 percentage point decrease from no defense, with RR of 29.8%), but the ASR rebounded to 86.7% at round T+2; ToolShield achieved the lowest ASR of 78.1% at round T+2 (RR of 8.3%). After disclosing defense prompts to the attacker, the ASR of each defense at round T+2 decreased (by 7.2 to 10.0 percentage points).
- Authors' interpretation: The authors note that the reasoning defense was strongest in the initial round but decayed under adaptive attacks; ToolShield was more persistent but still insufficient. The success rate actually decreased when the attacker knew the defenses because the attacker abandoned the strategy of covert contextual coherence and instead adopted defense-evasion rhetoric that more easily triggered refusals.
Other Ablations and Analyses
- Tool chain length distribution: 2 steps accounted for 47.4% (229 cases), 3 steps accounted for 37.3% (180 cases), 4 steps 59 cases, 5+ steps 15 cases, with an average length of 2.6 steps (per Table 11).
- Failure mode distribution: 10 failure modes each contained 42 to 55 cases, with a nearly uniform distribution (per Table 11).
- Cross-model defense generalization: On Qwen3-32B, Mistral-Small-3.2-24B, and Llama-3.3-70B, the retained ASR of all prompt defenses at round T+2 ranged from 74.3% to 92.5% (per Table 5).
- Negative results and exceptions: Magistral-Small had a lower ASR (46.2% at round T, 77.8% at round T+2); the authors note this was because the model's own weak tool execution capability caused tasks to remain incomplete, and its RR remained below 3.1% throughout.
What are some points that can be further explored?
The authors point out limitations such as a single-model judge, single-shot estimation, and the limited scope of defenses, and note that future work needs to broaden sequence monitoring and real-tool evaluation.
Limitations and future directions noted by the authors
- Single-model judge and construct validity: The authors note that the judge model in the main experiments belongs to the same GPT-4.1 family as the generators and planners, and that a single-model-family judge may affect the reported ASR, PH, and RR; the authors list stratified-sampling human validation and cross-model-family judges as important future work (Section 6).
- Single-run and statistical uncertainty: The authors note that the results in Tables 2–6 are point estimates from single runs, and that due to randomness in generation and planning, run-to-run variance is not characterized; the authors propose future computation of Bootstrap confidence intervals across 483 cases and repeated experiments with multiple random seeds (Section 6).
- Validation-chain filtering bias and conditional dependence: The authors note that the benchmark only includes tool chains that pass environment validation, which ensures executability but may bias the dataset toward attacks that are more likely to succeed (the candidate-chain validation success rate under the MCP setting is 90.3%); the evaluation conditions also depend on synthetic prefix histories, and end-to-end dynamic interaction-generated prefixes require future measurement (Section 6).
- Scale and diversity of real-tool evaluation: The authors note that the real MCP tool evaluation currently covers only the filesystem and browser backends, with a limited number of tasks and a single model (only GPT-4.1); broader real-tool coverage, per-environment and per-failure-mode disaggregated metrics, and evaluation of more frontier reasoning models are future directions (Section 6).
- Constraints of predefined failure modes: The authors note that the framework relies on 10 failure modes predefined in existing literature, which may limit its ability to discover novel vulnerability patterns arising from unique tool combinations or specific environment constraints (Section 6).
- Defense research scope limited to the prompt level: The authors note that the evaluation focuses on prompt-based and empirical defenses that require no retraining or architectural changes, while the robustness of agent guardrails based on memory, data provenance, policy composition, and formal verification against adaptive STAC attacks has not been tested; sequence-level monitors such as audit logs, behavior patterns, and state differences were also not directly evaluated (Sections 3.4 and 6).
Experimental coverage
- Coverage of tested agent models: The evaluation covers 8 LLMs across 4 families (including GPT-4.1, GPT-4.1-mini, Qwen3-32B, Llama-3.1-405B, Llama-3.3-70B, Mistral-Large, Mistral-Small, Magistral-Small).
- Coverage of evaluation environments and tasks: The simulated environments cover the 4 SHADE-Arena environments (390 cases) and 62 Agent-SafetyBench environments (93 cases); the real-tool evaluation covers 2 MCP backends and 32 matched OpenAgentSafety tasks.
- Evaluation budget and interaction parameters: The user attack round cap is set to 3 rounds, and the agent's per-round environment interaction cap is 10 tool calls; the generation temperature is set to 1.0, and the execution planning and judge temperatures are set to 0.15.
- Coverage of defense mechanism evaluation: 4 zero-shot prompt defenses (Spotlighting, Failure Modes, Summarization, Reasoning) and 1 experience-based system prompt defense (ToolShield) were evaluated.
- Metrics and settings not reported in the paper: The paper does not report confidence intervals or repeated-run variance for the main experiments, does not report the full ratio from candidate generation to validation pass for the main benchmark, and does not report the detection performance of sequence-level external monitors against STAC.
Summarize the main content of the paper
The authors propose and validate the widespread vulnerability of agents under serialized tool attacks, and point out the necessity of defending against cumulative action sequences.
- Research positioning and core problem: The paper studies LLM agents with tool-use capabilities, examining their vulnerability to serialized tool-chain attacks (STAC) where malicious intent is distributed across multiple rounds of legitimate tool calls. Unlike plain-text jailbreaks, such attacks directly cause irreversible changes to the external environment.
- Method design highlights: A closed-loop automated framework with five major roles is constructed. First, a generator plans multi-step tool chains and constrains preceding steps to be harmless; then a verifier interacts and executes in the real environment to correct infeasible calls; next, a prompt writer reverse-engineers and synthesizes seemingly legitimate multi-turn conversation prefixes; finally, a planner adaptively guides the agent to complete the final malicious operation.
- Agents generally face high safety risks: Across 483 benchmark cases covering 66 environments, 8 frontier open-source and closed-source agents achieved an average final ASR of 91.2% (all exceeding 90% except the less capable Magistral-Small), while maintaining low prompt harmfulness rates (average 0.2%–0.5%) and low refusal rates (average 1.2%–1.7%) throughout the process (Table 2).
- Validation of multi-turn prefixes and environment verification: On 390 SHADE-Arena cases, full STAC achieved an ASR of 95.1%, 22.3 percentage points higher than single-turn attacks without synthetic prefixes, and substantially exceeding the unverified baseline MT-AgentRisk (53.2%) (Table 3); on real MCP tool backends, the full pipeline achieved a 35.5% black-box ASR, notably higher than the 12.5% of the no-tool-chain baseline (Table 12).
- Limitations and implications of existing prompt defenses: The trade-off reasoning defense suppressed GPT-4.1's ASR from 87.4% to 58.6% in the first round, but its protective effect decayed rapidly under adaptive attacks, with the final ASR rising to 86.7%; the empirical defense ToolShield showed relatively more persistent protection (final ASR of 78.1%), but all prompt defenses failed to block attacks at an acceptable level (Table 4).
- Authors' conclusion: The authors argue that agent safety defenses must shift from isolated evaluation of single-step actions to global reasoning over action sequences and their cumulative consequences, and call for future exploration of action-aware defense mechanisms.