STAC: When Innocent Tools Form Dangerous Chains to Jailbreak LLM Agents

Jing-Jing Li, Jianfeng He, Chao Shang, Devang Kulshreshtha, Xun Xian, Yi Zhang, Hang Su, Sandesh Swamy, Yanjun Qi · DOI

Abstract

As Large Language Models (LLMs) transition into autonomous agents capable of interacting with external tools, they introduce a significant new attack surface. This paper introduces Sequential Tool Attack Chaining (STAC), a multi-turn attack framework that exploits these agents by orchestrating sequences of seemingly benign tool calls that collectively achieve a harmful goal. Our evaluation shows that state-of-the-art agents, including GPT-4.1 and Llama-3.1, are highly vulnerable, with attack success rates (ASR) frequently exceeding 90%. These findings highlight a critical "reasoning gap" in current agent architectures and underscore the need for defenses that consider the cumulative impact of action sequences rather than isolated turns.

Introduction

Traditional safety research has primarily focused on "jailbreaking" models to generate harmful text. However, as agents gain the ability to execute code, modify databases, and call APIs, the danger shifts from words to actions. The core challenge is the multi-turn stealth attack. In these scenarios, an attacker does not request a harmful action directly. Instead, they guide the agent through a series of steps that appear innocent in isolation but lead to a malicious conclusion.

Example of a Sequential Tool Attack Chain (STAC) where benign steps lead to a malicious outcome.

As illustrated in the figure above, an agent might be asked to compress a file for storage optimization and then delete the original to save space. While these are benign administrative tasks, a final request to clear all archives results in the destruction of the only remaining copy of a critical document. Current agents often fail to bridge this reasoning gap, evaluating the immediate request without considering the long-term state changes.

The STAC Framework

To systematically explore these vulnerabilities, we developed the STAC framework, an automated, closed-loop pipeline consisting of four key stages:

  1. Tool Chain Generation: A "Generator" (GPT-4.1) plans a sequence of 2–6 tool calls that achieve a malicious goal while ensuring every step except the final one appears benign.
  2. Verification: A "Verifier" tests the planned calls in a live environment to ensure they are executable and produce the intended state changes, revising the plan if technical issues arise.
  3. Prompt Reverse Engineering: A "Prompt Writer" (Qwen3-32B) synthesizes the specific user prompts required to induce an agent to perform the verified tool calls.
  4. Attack Execution: An adaptive "Planner" interactively delivers the attack, adjusting its strategy based on the agent's responses to ensure the final malicious step is reached.

Experimental Setup

We evaluated STAC using a newly constructed benchmark of 483 validated attack cases across diverse environments, including banking, travel, workspace management, and web navigation. The benchmark covers 10 distinct failure modes, such as ignoring constraints or placing excessive trust in tool results. We tested a wide range of state-of-the-art models, including GPT-4.1, Llama-3.1-405B, and Mistral-Large.

Results and Key Insights

Our experiments reveal a universal vulnerability across different model families and scales. The "Benign Precursor" pattern proves highly effective; by the time a harmful action is requested, the agent has already committed to a context that makes the final step seem logical.

Attack Success Rate (ASR) and stealthiness metrics across various LLM agents.

As shown in the results table, state-of-the-art models are alarmingly vulnerable. GPT-4.1 and Llama-3.1-405B both showed Attack Success Rates (ASR) exceeding 90%. Furthermore, the attacks are remarkably stealthy: the "Prompt Harmfulness" (PH) scores were near zero (<2%), meaning the prompts are almost indistinguishable from legitimate user requests to both human and automated observers.

While we proposed a Reasoning-Driven Defense—instructing agents to perform a thorough ethical analysis of the entire conversation history—it only reduced ASR by up to 28.8%. Even with this defense, the ASR remained above 58%, suggesting that defending agents against chained attacks is significantly more difficult than traditional text-based jailbreaking.

Conclusion

STAC demonstrates that malicious intent can be "diffused" across an interaction, bypassing standard guardrails that look for immediate red flags. This research highlights the urgent need for "agentic guardrails" that monitor environmental state changes over time and detect threats that only activate after several turns of interaction. Future work should focus on architectural defenses at the system or OS level to provide more robust oversight of autonomous agent actions.

Summary updated

BibTeX
@misc{li2025stac,
  author = {Jing-Jing Li and Jianfeng He and Chao Shang and Devang Kulshreshtha and Xun Xian and Yi Zhang and Hang Su and Sandesh Swamy and Yanjun Qi},
  title = {{STAC: When Innocent Tools Form Dangerous Chains to Jailbreak LLM Agents}},
  year = {2025},
  eprint = {2509.25624},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.25624},
}
Figure