ChainForge: Tool-Chain Hijacking Attacks against LLM Agents via Execution-Grounded Tool Synthesis
Jiluan Fan, Haotian Zhu, Zhigang Lu, Junhao Xia, Xunzhu Tang, Shuchao Pang, Minhui Xue
NeurIPS page · Open on the map
Category: AI Safety, Security & Alignment › Multi-Agent Security Evaluation · Type: new method · Keywords: LLM agent security, tool-chain hijacking, adversarial tool synthesis, ChainForge, ChainBench, execution-grounded attacks
Areas: AI Agents › Agent Robustness › LLM Agent Attacks; Safety & Security › Language Model Security › LLM Agent Security; Evaluation & Benchmarks › Language Model and Agent Safety › Agent Security Benchmarks; Benchmarks for LLMs & Agents › Agent Trustworthiness Benchmarks › Agent Security Benchmarks
Summary
ChainForge is an execution-grounded framework that synthesizes malicious tool chains to hijack LLM agents while preserving task utility.
Explained to a 5-year-old
Some computer programs use tools to help them do things. Bad people can make a bunch of tools that look like the real ones and trick the program into using them without anyone noticing. This makes the program do what the bad people want while still seeming normal. The researchers found a way to do this trick and showed it works a lot of the time. They also made a new test to check how often this trick works.
Explained to a 5-year-old, longer
Many computer helpers, like chatbots, need to use other tools to finish tasks, like looking up information or sending emails. Sometimes these helpers ask a series of tools one after another, making a chain. Bad people can try to break the helper by giving it wrong instructions, but that usually shows up quickly. This paper shows a sneaky way to break the helper that doesn't look obvious. An attacker can create a fake chain of tools that looks just like the real one. The fake chain still does the same job the user wanted, so the user doesn't notice anything is wrong. The researchers built a system that finds these fake chains by looking at how the helper normally runs. They use a trial-and-error method to try many possible chains and pick the best ones. Then they hide secret messages inside the tools so the attacker can do harmful things. They tested this on several big language models and found it works most of the time. The fake chains also work on different models, not just the one they were made for. Finally, they made a new set of tests called ChainBench to help others check how safe their helpers are.
For a technical reader
The paper identifies a chain-level attack where an adversary can replace an LLM agent’s sequence of tool calls with a malicious but functionally equivalent chain, evading detection. ChainForge leverages execution logs to generate replacement chains via rollout-based optimization and iteratively refines them to embed adversarial payloads while preserving task utility. The authors evaluate the attacks on four state-of-the-art LLMs, achieving up to 98.54% hijack success and maintaining over 80% task performance. The proposed benchmark, ChainBench, comprises 97 tasks across four domains and provides a systematic evaluation framework for future research. Results show that existing defenses and code-safety scanners are largely ineffective against chain-level hijacking, highlighting the need for new security mechanisms.
Problem
LLM agents that use external tools are vulnerable to attacks that compromise individual tool calls, but such attacks are detectable and insufficient for complex goals. The core problem is the lack of understanding and defenses for chain-level hijacking, where an adversary can replace an entire sequence of tools invisibly while still completing the user's task.
Method
The approach mines execution logs to generate replacement tool chains via rollout-based optimization and iteratively refines them to embed adversarial payloads while preserving task functionality.
Results
The approach achieves up to 98.54% trace hijack rate, maintains task utility above 80.41%, transfers across models with over 84.95% success, and evades existing defenses at substantially higher rates than single-tool baselines.
Contributions
The paper identifies tool-chain hijacking as a novel attack surface, proposes a framework for synthesizing malicious tool chains, and introduces ChainBench to evaluate chain-level threats across multiple domains.
Practical relevance
This work reveals a critical blind spot in LLM agent security, highlighting the need for chain-level defenses in real-world tool-using applications.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction