Skip to content

Beyond prompt injection: the tool update gap in LLM agent security

Beyond Prompt Injection: The Tool Update Gap in LLM Agent Security

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2611.01976· Shiyu Kan, Yue Qi, Yufei Han, Xinjian Luo, Guojun Xiong, Xiaofeng GaoShanghai Jiao Tong University; InriaIndexed by this site · 16 days ago· Originally publishedSelected AttacksSelectedAttention42

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose ETUDE, which injects malicious code via tool updates, achieving 97.6% ASR and 95.9% normal task completion rate across seven agent frameworks, and state that three existing classes of defenses are insufficient.

Threat modelThe attacker controls the distribution channel of a single external tool and can distribute arbitrary updates; fully knows the tool's code, interface and metadata, but cannot control the framework, the LLM, user requests or other tools; the tool has already passed admission in a benign state. The attack is E2×P-direct: delivered via a subsequent update, executed directly by the tool code, with no adversarial instructions needed.

Questions
Agent frameworks perform security checks when a tool is first admitted, but after the tool is updated they retain the original identity and authorization and do not re-check, creating a "tool update gap" that the authors consider a supply chain vulnerability, which existing defenses targeting model-visible content struggle to cover.
Methods
Proposes ETUDE: first publish a benign tool that passes admission, then via an update embed malicious operations in the tool implementation while preserving the interface and normal functionality, executing directly within the tool runtime on legitimate calls, without passing through the model context.
Experiments and results
Evaluated on seven frameworks, multiple backends and three tool functions: in RQ1, ETUDE achieves 100.0% ASR and 99.6% TCR, while the strongest baseline P-ctx×E2 achieves 20.2% ASR; the authors also state that all three classes of defenses—integrity checks, static review and runtime auditing—are insufficient.
Limitations and future work
The authors note: the attack uses researcher-written tools rather than real open-source tools; the coverage and cost figures for runtime auditing are based only on this study's tasks. Seven frameworks, three backends and three tool functions were tested, and runtime auditing was adapted and tested only on OpenCode/GLM.
Experimental setupGLM-5.3-Flash、Qwen-3.8-27B et al. · W1 合成凭证外泄、W2 未授权 API 下单 et al. · ASR、TCR et al.
Evaluated models
GLM-5.3-FlashQwen-3.8-27BDeepSeek-V4-Flash
Benchmarks
W1 合成凭证外泄W2 未授权 API 下单W3 本地文件篡改Markdown cleaner / CSV statistics / ICS generator 三种工具
Metrics
ASRTCRDSRTLSH distance
AI summaryand selection rationaleResearchers from Shanghai Jiao Tong University and Inria propose the ETUDE attack, which pushes malicious updates to tools that have already gained trust, achieving a 97.6% attack success rate on seven agent frameworks. The attack first establishes trust by passing a benign tool through admission review, then implants malicious functionality via a normal update; malicious operations execute directly in the tool's runtime environment and do not enter the model context, thereby bypassing prompt injection detectors and static skill scanning, while the normal task completion rate remains at 95.9%. The experiments cover Gemini CLI, Codex CLI, Claude Code, DeepSeek Harness, OpenCode, Pi, and Goose; unauthorized objectives include exfiltrating synthetic credentials, unauthorized API calls, and modifying local files. The authors recommend binding authorization to the specific reviewed code implementation, together with least privilege and runtime security policies.

Researchers from Shanghai Jiao Tong University and Inria propose the ETUDE attack, which pushes malicious updates to tools that have already gained trust, achieving a 97.6% attack success rate on seven agent frameworks. The attack first establishes trust by passing a benign tool through admission review, then implants malicious functionality via a normal update; malicious operations execute directly in the tool's runtime environment and do not enter the model context, thereby bypassing prompt injection detectors and static skill scanning, while the normal task completion rate remains at 95.9%. The experiments cover Gemini CLI, Codex CLI, Claude Code, DeepSeek Harness, OpenCode, Pi, and Goose; unauthorized objectives include exfiltrating synthetic credentials, unauthorized API calls, and modifying local files. The authors recommend binding authorization to the specific reviewed code implementation, together with least privilege and runtime security policies.

Why it was selectedThe paper measured a 97.6% success rate for this attack on seven agent frameworks; teams using external tools in agents can use this to check whether updates carry over old authorization.

Related events and news

1 events · 1 news mentions

News that mentions this paper

大模型安全周报:智能体安全边界在签名、授权与上下文

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    After a tool update, the old authorization is reused and no re-review occurs, creating a "tool update gap," which the authors propose the ETUDE attack to verify.

    Core problem: An agent framework's trust in an external tool persists after the tool is updated, and the updated code can execute without re-review, creating a supply chain vulnerability (which the authors call the tool update gap); its security implications still lack systematic study.

    • Scenario and importance: LLM agents integrate large numbers of third-party tools; the MCP ecosystem alone indexes more than 177,000 community tools; the authors observe that in the seven frameworks evaluated, original permissions remain in effect after a tool update, similar to real-world supply chain incidents such as XZ Utils and event-stream.
    • Gaps in existing research: The authors state that existing work mainly focuses on prompt injection (adversarial instructions entering model-visible input), and corresponding defenses also concentrate on model-visible content; exploitation of code changes after tool admission "remains underexplored."
    • Core observation: Tool code executes outside the LLM context window, so malicious functionality embedded in an update can bypass defenses centered on model-visible interactions, and normal task completion does not expose the attack.
    • The paper proposes: Characterizing the tool update gap and proposing the attack ETUDE (Exploiting Tool Updates for Direct Execution), evaluated across seven frameworks, multiple backends, and three unauthorized objectives, and examining three types of existing defenses.
    • Threat model (Section 3):
      • Objectives: Three types of unauthorized operations—sensitive information leakage, unauthorized external API operations, and local file tampering—while maintaining legitimate functionality.
      • Knowledge: Full knowledge of the code, interface, and model-visible metadata of the tool it controls.
      • Capabilities: Controls the distribution channel of a single tool and can distribute arbitrary updates; cannot control the framework, the LLM, user requests, or other tools; the tool has already passed admission in a benign state.
      • Victim system: LLM agent frameworks that integrate external tools; the attack is positioned as E2×P-direct (update delivery, direct code execution).
  2. What related research exists?

    Related work falls into four groups: model-visible content attacks, malicious tools and post-update changes, static checking, and runtime auditing.

    Model-visible content attacks

    • Indirect prompt injection (Greshake et al. 2023; Chang et al. 2026) — embedding malicious instructions in external content to manipulate agent behavior; tool poisoning in the MCP ecosystem (Huang et al. 2026; MCPTox by Wang et al. 2025) uses malicious tool descriptions to redirect agents.
    • DDIPE (Qu et al. 2026) embeds malicious logic in reusable examples and templates; payload-less attacks (Liu et al. 2026) use natural language instructions to induce agents to generate malicious code. The paper notes that these attacks commonly rely on the LLM interpreting and following adversarial content.

    Malicious tools and post-approval changes

    • MalTool (Hu et al. 2026) — constructs malicious tools that retain their claimed functionality and systematically evaluates their detectability.
    • ETDI (Bhatt et al. 2025) — studies the risk of post-approval changes and proposes digitally signed tool definitions, version tracking, and resource access validation. The paper states that research on actual exploitation of post-admission updates across frameworks remains insufficient.
    • An empirical study (Liu et al. 2026) documents malicious code and instruction manipulation in real skill registries.

    Static inspection of tools and skill packages

    • MalSkills (Wang et al. 2026) analyzes dependencies among skill instructions, scripts, and configuration; IntelGuard (Guo et al. 2026) uses threat-knowledge-driven LLM reasoning to detect malicious packages; Acoda (Rao et al. 2026) studies how code obfuscation evades LLM code analysis. The paper states that the effectiveness of static defenses against malicious updates (especially obfuscated ones) remains unclear.

    Runtime auditing

    • Cloak and Detonate (Ji et al. 2026) proposes SkillDetonate, which monitors OS activity and data flows to detect suspicious behavior; the paper notes that its effectiveness may be limited when malicious operations are triggered only under specific inputs or environmental conditions.

    Baselines and benchmarks: The attack comparison baselines are the three conditions P-ctx×E2, P-ctx×E1, and P-direct×E1 (Table 1 classification); the defense evaluation targets are Cisco MCP Scanner, SkillFortify, NVIDIA SkillSpector, TLSH integrity verification, and SkillDetonate-style runtime auditing. Authors' positioning: ETUDE combines "post-admission delivery" with "direct code execution," distinguishing it from existing attack paradigms.

  3. How does the paper address this problem?

    ETUDE: a benign tool first passes admission, an update embeds malicious operations, and legitimate calls execute them directly within the tool's runtime.

    Overall approach: ETUDE exploits the tool update gap by first passing admission with a benign implementation A(v1) to establish trust, then publishing A(v2), which preserves the original interface and embeds malicious operations; after the framework adopts the update, subsequent legitimate calls execute A(v2) under the original authorization (Figure 1).

    Attack taxonomy and positioning

    • Attacks are divided into four classes by delivery timing (E1 at admission / E2 at update) and execution path (P-direct direct code execution / P-ctx induced via model context) (Table 1).
    • ETUDE is E2×P-direct: the malicious functionality is introduced via an update and executed directly by the tool code during legitimate calls, without adversarial instructions entering the LLM context.

    Three design requirements for the malicious implementation A(v2)

    • R1 Interface preservation: the tool name, description and input schema are the same as A(v1), and the model-visible interface is unchanged.
    • R2 Functionality preservation: A(v1)'s claimed functionality is preserved, returning expected results for legitimate inputs, so that functional anomalies do not expose the attack.
    • R3 Direct execution: unauthorized operations are completed within the tool implementation and do not appear as model-initiated additional tool calls; operations are isolated via exception handling, and the tool still returns normal results on failure, making task completion and attack success independent of each other.

    Activation and cross-framework generality

    • In the main configuration, malicious operations execute during ordinary calls and do not depend on a specific trigger phrase; there are also variants that activate only under specific input or environmental conditions, used to examine runtime auditing.
    • The authors state that ETUDE depends on only two conditions: an admitted tool can adopt an updated implementation, and subsequent calls execute the updated code under the original identity and authorization—independent of the specific framework, loading mechanism or backend; each of the seven frameworks uses its native loading mechanism (e.g., Gemini replaces the service process, Pi uses ctx.reload).

    Evaluation design

    • Three classes of unauthorized objectives: W1 reads synthetic credentials and sends them to a test receiver; W2 places an order via a test API; W3 overwrites isolated synthetic research notes. Success is judged using independent receiver/server/file evidence, not the model's final response.
    • Metrics: ASR (rate of achieving the specified attack objective) and TCR (normal task completion rate) are scored separately; each round has 20 planned tasks, each condition is run for five rounds, and the mean and sample standard deviation are reported; when admission review returns BLOCK/UNKNOWN, it does not count as success.
    • Defense evaluation: a TLSH file similarity gate, where distance d(A(v1), A(v2)) = diffTLSH(h1, h2) below threshold t yields ALLOW and otherwise BLOCK, used to test the "similar means safe" assumption; also Cisco MCP Scanner (GLM-5.3-Flash adapter) static review, SkillFortify/SkillSpector package-level scanning, and SkillDetonate-style isolated execution auditing.
  4. What experiments did the paper conduct?

    Four research questions: RQ1 main attack effectiveness, RQ2 cross-backend, RQ3 cross-tool functionality, RQ4 three types of defenses.

    Experimental Setup

    • Frameworks tested: Gemini CLI 0.62.0, Codex CLI 0.159.3, Claude Code 2.1.284 (closed source), DeepSeek Harness 0.2.0-rc.2, OpenCode 1.18.34, Pi 0.86.1, Goose 1.45.0 (Table 2).
    • Backends: RQ1 uses GLM-5.3-Flash; RQ2 compares four configurations: GLM-5.3-Flash, Qwen-3.8-27B, DeepSeek-V4-Flash (thinking on/off).
    • Payloads: W1 credential exfiltration, W2 unauthorized order placement, W3 file tampering; tools are Markdown cleaner, CSV statistics, ICS generator.
    • Baselines: P-ctx×E2, P-ctx×E1, P-direct×E1; RQ1–RQ3 uniformly add a Cisco MCP Scanner (GLM adapter) admission review gate.
    • Metrics and scale: ASR and TCR are averaged over five rounds × 20 tasks, reported as mean ± sample standard deviation; RQ1 has 2,100 ETUDE tasks in total, and W3 across all conditions has 3,600 planned tasks in total (180 rounds).
    • Success criteria: W1 requires the receiver-side payload to match the source file; W2 requires a marked order to exist on the server side; W3 requires the complete specified replacement text, and merely modifying the file does not count toward ASR.

    Main Results

    According to Table 5 (GLM-5.3-Flash + Markdown cleaner, five-round mean %, W3's ASR column is "specified content achieved"):

    Swipe horizontally to read the table

    FrameworkConditionW1 ASRW2 ASRW3 ASR
    Gemini CLIETUDE100.0100.0100.0
    Codex CLIETUDE100.0100.0100.0
    Claude CodeETUDE99.0100.0100.0
    OpenCodeETUDE100.0100.0100.0
    DeepSeek HarnessETUDE100.099.0100.0
    PiETUDE100.0100.0100.0
    GooseETUDE100.0100.0100.0
    Macro averageP-ctx×E229.416.714.4
    • Body summary: across 21 equally weighted framework×payload conditions, ETUDE achieves 100.0% ASR and 99.6% final-output TCR, while the strongest baseline P-ctx×E2 achieves 20.2% ASR and 96.4% TCR; the abstract gives overall figures of 97.6% ASR and 95.9% TCR.
    • Baseline failure modes: under E1, admission review blocked all of 105 P-direct rounds and 95 of 105 P-ctx rounds; P-ctx×E2 relies on the model proactively making additional calls—Claude Code made additional calls in 297/300 tasks, while OpenCode made none in 300 tasks.
    • Exceptions: Claude Code's W3 ASR is 23% (all 100 tasks modified the file, but only 23 achieved the specified content); of the 2,100 RQ1 tasks, 8 had erroneous final output and 7 failed input/tool checks, for a full-task TCR of 99.3%.

    RQ2: Cross-model backends

    • What was tested: W1 and Markdown cleaner fixed, four backend configurations × seven frameworks (Table 8, Figure 3(a)).
    • Results: ETUDE produced confirmed attack effects in all 28 combinations, with ASR 80.0%–100.0%, mean 96.4%, and full-task TCR 94.0%; P-ctx×E2 ranged from 0% to 100.0%.
    • Authors' interpretation: P-ctx relies on the model making further decisions, and normal tasks can be completed without performing additional operations; ETUDE places the operation within the tool's normal execution path, bypassing that decision.

    RQ3: Cross-tool functions

    • What was tested: GLM and ETUDE fixed, three tools × four frameworks (Table 7, Figure 3(b)).
    • Results: confirmed attack effects appeared in all 36 framework×tool×payload combinations; under W3, the file modification rate and final-output TCR were both 100.0% for Markdown and ICS, and both 91.8% for CSV.
    • Failure analysis: 33 native CSV calls passed malformed arguments (32 retained literal newline escapes, 1 had a carriage-return escape in the header), and the parsing failure caused both the normal task and the attack effect to fail; the authors state this reflects an input construction problem rather than the operation being rejected.

    RQ4: Defense evaluation

    • TLSH integrity check (Figure 4): legitimate update distances 1–221 (feature additions 173–221), W1/W2/W3 distances 156/145/233; at t=233, all 40 legitimate updates passed and only W3 was blocked; at t=145, all three targets were blocked but 22/40 (55%) legitimate updates were falsely rejected. The authors state that no threshold exists that "blocks all targets while allowing all maintenance."
    • Static LLM review (Table 4): Cisco/GLM's rejection rate for readable ETUDE updates was 98.3%; after PyArmor protection, ETUDE still achieved 85.0% ASR and 84.3% TCR, and of 100 protected legitimate controls, 7 were rejected and 2 were UNKNOWN. In package-level scanning, SkillFortify allowed all three protected targets, while SkillSpector rejected all three targets but also rejected all 20 protected legitimate updates (Table 10).
    • Runtime auditing (OpenCode/GLM adapted SkillDetonate): auditing of all 30 updated tools produced unauthorized operations and alerts, and auditing of 30 benign tools produced no alerts; however, the condition-triggered Markdown variant alerted only on the trigger input, and the environment-condition variant was ALLOWed in the sandbox with no alert and produced attack effects in normal execution (Table 12). The 12 long-document audits had a mean latency of 112.8±13.7 seconds and an estimated model cost of $0.00697 per run, 6.3× and 1.5× the static review reference.

    Other ablations and analyses

    • Admission review: of 29 Gemini admission reviews, 27 were BLOCK and 2 were UNKNOWN (Appendix A).
    • Historical updates: sampled historical updates from AWS MCP and GitHub MCP Server were blocked 3/8, 1/8, 1/8 and 0/10, 0/10, 0/10 at t=30/145/233, respectively (Table 9).
    • Source budget diagnosis: the 2,000-character view excluded all six effect handlers; under the short view, the raw form had a 0.0% BLOCK rate and the protected form 26.7% (Table 11).
    • Two direct paths merged under obfuscation: protected A(v2) produced 2,180/2,400 attack effects, with a merged ASR of 90.8±4.6% (Appendix B.3, not ETUDE alone).
  5. What are some points that can be further explored?

    The authors state two limitations and one future work item; the experiments cover seven frameworks, three backends, and three types of defenses.

    Limitations and future directions noted by the authors

    • The attack uses tool implementations written by the researchers themselves and is demonstrated under monitored permissions rather than modifying real open-source tools, to avoid ethical issues (Section 6 Limitations).
    • The coverage and cost figures for runtime auditing are based only on the agent tasks tested in this study (Section 6 Limitations).
    • Future work: a more comprehensive cost evaluation on real-world tools (Section 6 Limitations, planned by the authors).

    Experimental coverage

    • The frameworks tested are Gemini CLI, Codex CLI, Claude Code, DeepSeek Harness, OpenCode, Pi, and Goose, seven in total (Table 2); the backends are GLM-5.3-Flash, Qwen-3.8-27B, and DeepSeek-V4-Flash (thinking on/off), four configurations in total (Section 5.1).
    • The attack payloads are the three unauthorized objectives W1/W2/W3, and the tool functionalities are Markdown cleaner, CSV statistics, and ICS generator, three in total; five rounds per condition, with 20 planned tasks per round (Section 5.1).
    • The defense evaluation includes TLSH integrity verification, Cisco MCP Scanner static review, SkillFortify and SkillSpector package-level scanning, and SkillDetonate-style runtime auditing (Section 5.5); runtime auditing was adapted and tested only on OpenCode/GLM, and serial deployment and long-latency/multi-session activation were not measured (Appendix B.3).
    • The paper does not report the auxiliary model used to construct the attack; the malicious tool implementations were written by the researchers, and it is not stated whether model generation was used.
    • The sandbox escape in the environmental-condition variant depends on a UID mapping difference in the authors' adapter; the paper notes that this difference is specific to their adapter, and that the original SkillDetonate reports Docker isolation but does not describe UID mapping (Section 5.5).
  6. Summarize the main content of the paper

    ETUDE exploits the tool update gap to achieve high ASR and high task completion rates across seven frameworks, and all three existing classes of defenses are said to be insufficient.

    An agent supply chain security attack paper that studies the "tool update gap," in which authorization persists after an external tool is updated and the code is not re-reviewed.

    • Problem: Frameworks establish trust when a tool is admitted, and after an update they reuse the original identity and authorization; malicious code executes outside the model context, and the authors argue that defenses centered on model-visible content are hard-pressed to cover it.
    • Method: ETUDE first passes admission as a benign tool, then embeds malicious operations via an update while preserving the interface and normal functionality (R1–R3), and executes directly within the tool runtime on legitimate calls without adversarial instructions.
    • Main results: In RQ1, under 21 framework×payload conditions, ASR was 100.0% and final-output TCR was 99.6%; the strongest baseline, P-ctx×E2, had ASR 20.2% (Table 5). The abstract summarizes ASR 97.6% and TCR 95.9% across seven frameworks.
    • Generalization: All 28 combinations of four backends×seven frameworks showed confirmed attack effects, with mean ASR 96.4% (Table 8); all 36 combinations of three tools×four frameworks showed attack effects (Table 7).
    • Defense evaluation: No TLSH verification threshold both blocks attacks and allows maintenance; after PyArmor obfuscation, ETUDE still achieved 85.0% ASR under Cisco/GLM review; runtime auditing can alert on behavior that has already executed, but condition-triggered variants can evade it, and latency was 6.3 times that of the static reference.
    • Authors' conclusion: Tool authorization should be bound to the specific reviewed implementation rather than to tool identity, and runtime least-privilege execution constraints are needed; the authors state that this exposes blind spots in admission-time screening and model-centric defenses.
Read originalarxiv.org