Prompt Injection Attacks Against LLM Agent Tool SelectionPrompt Injection Attack to Tool Selection in LLM Agents
The researchers propose ToolHijacker, a prompt injection attack targeting tool selection in LLM agents, which in a no-box setting injects malicious tool documentation into the tool library to force the agent to persistently select that malicious tool on an attacker-chosen target task. The paper formalizes the construction of the malicious tool documentation as an optimization problem and proposes a two-stage optimization strategy to solve it; experiments show that the attack is highly effective and clearly outperforms existing manual and automated prompt injection attacks. The authors also evaluate preventive defenses such as StruQ and SecAlign, as well as detection-based defenses such as known-answer detection, DataSentinel, perplexity detection, and perplexity window detection; the results show that none of these defenses is sufficient, and the authors accordingly point out that new defense strategies urgently need to be developed.