New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group).Get the weekly email
// Analysis
Researchers Expose Tool Prompt Attack Enabling RCE and DoS
Published: Mon, 08 Sep 2025 • By Elise Veyron
Attacks
New research shows attackers can manipulate Tool Invocation Prompts (TIPs) in agentic LLM systems to hijack external tools, causing remote code execution and denial of service across platforms like Cursor and Claude Code. The study maps the exploitation workflow, measures success across backends, and urges layered defenses to protect automated workflows.
A new paper surfaces a worrying but underestimated attack surface: the Tool Invocation Prompt, or TIP. TIPs are the instructions that tell a language model how to call an external tool. The researchers show how crafted TIP inputs can hijack tool behavior to cause denial of service and even remote code execution. They call their method the TIP Exploitation Workflow, or TEW.
In plain terms, attackers can slip malicious instructions into the channels where tools are described or where tool outputs return to the model. When that happens in agentic systems that auto-run code or call IDE tooling, the consequences go beyond hallucinations. The team demonstrates practical exploits against real services including Cursor and Claude Code, and shows that success varies by backend and by how vendors stitch TIPs into their products.
This matters because many orgs treat prompt hygiene as a policy checkbox rather than a security design. Guard models and self-reflection can block obvious injections but do not stop clever multi-channel attacks. Trade-offs are real: stricter isolation and whitelisting reduce functionality and speed, while looser integrations boost productivity but broaden risk. Token cost also affects attacker behavior: some multi-step hijacks are expensive, which limits some threat actors but does not eliminate risk.
What to do: This quarter, inventory where your systems use agentic tool calls; apply strict tool whitelists; sandbox or require explicit human approval for tool execution; add logging, rate limits, and simple TIP injection tests in red-team playbooks. Later, invest in layered defenses: external filtering, consensus checks, provenance signals, and procurement standards that require TIP safety guarantees from vendors. Avoid performative fixes and build defenses that accept trade-offs between automation and trust.
Additional analysis of the original ArXiv paper
📋Original Paper Title and Abstract
Exploit Tool Invocation Prompt for Tool Behavior Hijacking in LLM-Based
Agentic System
LLM-based agentic systems leverage large language models to handle user
queries, make decisions, and execute external tools for complex tasks across
domains like chatbots, customer service, and software engineering. A critical
component of these systems is the Tool Invocation Prompt (TIP), which defines
tool interaction protocols and guides LLMs to ensure the security and
correctness of tool usage. Despite its importance, TIP security has been
largely overlooked. This work investigates TIP-related security risks,
revealing that major LLM-based systems like Cursor, Claude Code, and others are
vulnerable to attacks such as remote code execution (RCE) and denial of service
(DoS). Through a systematic TIP exploitation workflow (TEW), we demonstrate
external tool behavior hijacking via manipulated tool invocations. We also
propose defense mechanisms to enhance TIP security in LLM-based agentic
systems.
🔍ShortSpan Analysis of the Paper
Problem
The paper defines Tool Invocation Prompts TIPs as components that govern how an LLM-based agentic system calls external tools, and argues that TIP security has been largely overlooked. It shows that TIPs can be exploited to cause remote code execution RCE and denial of service DoS across real systems such as Cursor and Claude Code, enabling an attacker to hijack external tool behaviour via crafted tool invocations. The work introduces a systematic TIP exploitation workflow TEW to demonstrate external tool behaviour hijacking and discusses defence ideas to improve TIP security in LLM-based agentic systems.
Approach
The authors first define TIPs and place them within the prompts ecosystem used by LLMs to decide tool invocation. They formalise a threat model where TIPs encode tool schemas and execution context, making them high value targets for attackers who aim to disrupt the tool chain or execute arbitrary commands. They present TEW a three step process comprising prompt stealing TIP vulnerabilities analysis and TIP hijacking with two attack channels tool descriptions and tool returns. They classify attacks into a format based untargeted DoS and logic based targeted RCE with two variants RCE 1 direct injection via tool descriptions and RCE 2 via both tool descriptions and tool returns. They perform empirical assessment across MCP enabled IDE CLI and chat box systems and evaluate DoS RCE 1 and RCE 2 under multiple LLM backends, measuring attack success rate and token usage. They also provide three case studies demonstrating RCE on Cursor with gpt 5 RCE on Claude Code with claude sonnet 4 and DoS on Cline with gemini 2 5 pro. In addition to empirical results they explore defence options including guard models self reflection layered defence and propose open source tooling for risk assessment.
Key Findings
DoS attacks are broadly observable across agents including chat box and IDE types, with some systems like Trae showing resilience due to strict prompt safety policies; RCE 1 direct injection is feasible in many IDE based agents, while RCE 2 which also exploits the tool return channel expands the attack surface and can affect agents that resist direct injection such as Claude Code.
Backends influence exploitability: DoS is widely reproducible but with varying reliability across LLMs; RCE 1 success concentrates in IDE agents; RCE 2 often succeeds even when RCE 1 does not, especially where tool return channels are exploitable; newer backends with stronger alignment tend to reduce attack success but client side TIP integration still causes heterogeneity across vendors.
Token costs differ by attack type with DoS generally moderate, RCE 1 higher, and RCE 2 the most token intensive due to multi channel exploitation; for example some IDEs incur thousands of tokens for RCE 1 and over three thousand injected tokens for RCE 2 depending on backend.
Defence exploration shows guard models such as Llama Prompt Guard can block some prompts but are not reliable against sophisticated TIP injections; self reflection yields inconsistent protection, particularly for DoS; a layered defence combining external filtering and internal verification is recommended, with adaptive filtering and consensus mechanisms to mitigate single point failures.
Three illustrative case studies demonstrate practical TIP exploitation in real systems illustrating prompt injection, tool interaction and defensive bypasses, reinforcing the need for TIP as a security critical component.
Limitations
Experiments focus on MCP enabled systems with ten independent manual attempts per attack per backend; case studies are conducted in controlled environments and do not involve production services; the authors do not disclose full exploit strings; token cost measurements cover only injected tokens and tool responses, not baseline prompt or model tokens.
Why It Matters
The work identifies a new attack surface at the TIP level that can enable remote code execution and service disruption across widely used AI enabled tool integrations, threatening the integrity, availability and confidentiality of automated workflows. It calls for secure TIP design including input validation, tool whitelisting, sandboxing, strict isolation of tool calls, monitoring and auditing, and rate limiting. The authors emphasise societal and security implications if such vulnerabilities are exploited in critical services and highlight the need for layered defenses and provenance aware trust signals to mitigate risks.
This paper reveals a practical, stealthy attack on tool-augmented LLMs by exploiting the Model Context Protocol. It introduces a tree-based, black-box...
- Why it’s interesting: It empirically tests prompt injection risks in real AI-assisted development tools that use the Model Context Protocol (MCP), s...
- It shows how adding external tools to AI agents creates new prompt-injection risks, with adaptive methods that tailor prompts and tool choices to ev...
- It identifies a new attack surface: time-of-check to time-of-use (TOCTOU) flaws in LLM-enabled agents, where validated state can be altered before u...
- It studies how external content fed to tool-using LLMs can be weaponized through indirect prompt injections, a real risk in AI-enabled workflows.
- ...
- Why it’s relevant: It reveals a stealthy attack vector in AI agent ecosystems—implicit tool poisoning via tool metadata—plus an automated framework ...
- It shows prompt injections can blend with web flaws (XSS, CSRF) and with autonomous AI agents, creating hybrid attacks that can bypass traditional d...
- Why it matters: It tackles indirect prompt injection (IPI) in LLM-powered agents that control tools and potentially physical systems, a major attack...
Why it may be relevant (in simple terms):
- It reveals how connecting AI agents to external tools creates new attack surfaces, with a full catalog of ...
Why it matters (brief, simple):
- Reveals prompt injection as a real, practical threat to AI-powered security tools, where crafted inputs can steer or...
Get the weekly digest
The few AI-security papers that matter, with the practitioner takeaway. No spam.