LLM-based agentic systems leverage large language models to execute external tools for complex, multi-step tasks. These systems are widely used in domains such as chatbots, customer service, and software engineering. A key component of these systems is the Tool Invocation Prompt (TIP), which defines tool-interaction protocols and security behaviors.
Despite its importance, the security of TIPs has been overlooked. This paper investigates the vulnerabilities of TIPs, revealing critical risks such as Remote Code Execution (RCE) and Denial of Service (DoS).
We propose a systematic TIP Exploitation Workflow (TEW) consisting of:
Extract system prompts using adversarial instructions embedded in tool descriptions.
Identify vulnerabilities in tool descriptions, formats, and execution pathways.
Exploit vulnerabilities to manipulate tool invocation protocols and achieve RCE or DoS.
Figure 1: Methods Overview
Our empirical evaluation across multiple LLM-based systems demonstrates:
Vulnerable systems include Cursor, Claude Code, and other IDE and CLI agents.
Figure 2: Case Study 1 - RCE on Cursor
Figure 3: Case Study 2 - RCE on Claude Code
Figure 4: Case Study 3 - DoS on Cline
TIPs are critical yet vulnerable components of LLM-based agentic systems. Our findings highlight the need for robust security measures, such as layered defenses and adaptive filtering, to mitigate risks of RCE and DoS.