LoopTrap: Termination Poisoning Attacks on LLM Agents

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xu, Huiyu, Wang, Zhibo, Zhang, Wenhui, Zhu, Ziqi, Wang, Yaopeng, Ren, Kui, Chen, Chun
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909020471689216
author Xu, Huiyu
Wang, Zhibo
Zhang, Wenhui
Zhu, Ziqi
Wang, Yaopeng
Ren, Kui
Chen, Chun
author_facet Xu, Huiyu
Wang, Zhibo
Zhang, Wenhui
Zhu, Ziqi
Wang, Yaopeng
Ren, Kui
Chen, Chun
contents Modern LLM agents solve complex tasks by operating in iterative execution loops, where they repeatedly reason, act, and self-evaluate progress to determine when a task is complete. In this work, we show that while this self-directed loop facilitates autonomy, it also introduces a critical risk: by injecting malicious prompts into the agent's context, an adversary can distort the agent's termination judgment, making it believe the task remains incomplete and leading to unbounded computation.To understand this threat, we define and systematically characterize it as Termination Poisoning and design 10 representative attack strategies. Through a empirical study spanning 8 LLM agents and 60 tasks, we demonstrate that different LLM agents exhibit distinct behavioral signatures that determine which strategies succeed. These transferable patterns can serve as principled guidance for crafting effective attacks against previously unseen agents and tasks, enabling scalable red-teaming beyond manually designed templates. Building on these insights, we introduce LoopTrap, an automated red-teaming framework that synthesizes target-specific malicious prompts by exploiting agent behavioral tendencies. LoopTrap first constructs a behavioral profile of the target agent along four vulnerability dimensions via lightweight probing. It then performs adaptive trap synthesis, routing to the most effective strategy and selecting optimal injections via a self-scoring mechanism. Finally, successful traps are abstracted into a reusable skill library, while failed attempts are refined through self-reflection, ensuring continuous improvement. Extensive evaluation shows that LoopTrap achieves an average of 3.57$\times$ step amplification across 8 mainstream agents, with a peak of 25$\times$.
format Preprint
id arxiv_https___arxiv_org_abs_2605_05846
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle LoopTrap: Termination Poisoning Attacks on LLM Agents
Xu, Huiyu
Wang, Zhibo
Zhang, Wenhui
Zhu, Ziqi
Wang, Yaopeng
Ren, Kui
Chen, Chun
Cryptography and Security
Artificial Intelligence
Modern LLM agents solve complex tasks by operating in iterative execution loops, where they repeatedly reason, act, and self-evaluate progress to determine when a task is complete. In this work, we show that while this self-directed loop facilitates autonomy, it also introduces a critical risk: by injecting malicious prompts into the agent's context, an adversary can distort the agent's termination judgment, making it believe the task remains incomplete and leading to unbounded computation.To understand this threat, we define and systematically characterize it as Termination Poisoning and design 10 representative attack strategies. Through a empirical study spanning 8 LLM agents and 60 tasks, we demonstrate that different LLM agents exhibit distinct behavioral signatures that determine which strategies succeed. These transferable patterns can serve as principled guidance for crafting effective attacks against previously unseen agents and tasks, enabling scalable red-teaming beyond manually designed templates. Building on these insights, we introduce LoopTrap, an automated red-teaming framework that synthesizes target-specific malicious prompts by exploiting agent behavioral tendencies. LoopTrap first constructs a behavioral profile of the target agent along four vulnerability dimensions via lightweight probing. It then performs adaptive trap synthesis, routing to the most effective strategy and selecting optimal injections via a self-scoring mechanism. Finally, successful traps are abstracted into a reusable skill library, while failed attempts are refined through self-reflection, ensuring continuous improvement. Extensive evaluation shows that LoopTrap achieves an average of 3.57$\times$ step amplification across 8 mainstream agents, with a peak of 25$\times$.
title LoopTrap: Termination Poisoning Attacks on LLM Agents
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2605.05846