Large language model based agents increasingly rely on external tools to invoke services and interact with web resources. These tools can evolve through software updates, yet agentic frameworks may continue trusting them without re-verifying their safety after implementation changes. This tool update gap creates a supply-chain vulnerability in agentic systems: because updated tool code executes outside the LLM's context window, malicious functionality embedded in tool updates can bypass defenses centered on model-visible interactions, leaving agents exposed to stealthy, persistent threats that existing in-context defenses can hardly address. To thoroughly investigate this threat, we introduce ETUDE (Exploiting Tool Updates for Direct Execution), an attack that embeds malicious functionality into updates of initially benign tools to produce compromised tools, while preserving their legitimate tool functionality. Unlike prompt-based attacks, ETUDE operates entirely outside the LLM's context and requires no adversarial instructions, thereby bypassing defenses restricted to model-visible content. We evaluate ETUDE across three representative attack workloads and seven widely used commercial and open-source agentic frameworks, including Gemini CLI, Codex CLI, and Claude Code. The results show that ETUDE achieves a 97.6% ASR while maintaining a 95.9% legitimate task completion rate. We further examine existing defenses and find that they provide insufficient protection against this threat. These findings expose a fundamental blind spot in current agent security practices: trust established for a tool does not necessarily remain valid after its implementation updates.
Figures & tables
Figure 1. The tool update gap. A malicious update preserves the tool’s legitimate functionality while introducing unauthorized operations that execute directly within the tool’s runtime environment.
P-direct
P-ctx
executed by tool code
induced via model context
E1
Malicious implementation
Poisoned tools or skills
at admission
present at admission ( Hu et al., 2026 )
before adoption ( Wang et al., 2025a ; Qu et al., 2026 )
E2
ETUDE (this work)
Rug-pull updates to
via adopted update
update-time direct execution
descriptions or outputs ( Beurer-Kellner and Fischer, 2025 )
Table 1. Attack taxonomy along two dimensions: delivery timing (E1: admission; E2: subsequent update) and execution path (P-direct: code-level execution; P-ctx: model-context execution). ETUDE targets E2 × P-direct.
Framework
Developer
Public release
Source
Evaluated version
Gemini CLI
Google
2025
Open
0.62.0
Codex CLI
OpenAI
2025
Open
0.159.3
Claude Code
Anthropic
2025
Closed
2.1.284
DeepSeek Harness
DeepSeek
2026
Open
0.2.0-rc.2
OpenCode
Anomaly
2025
Open
1.18.34
Pi
Mario Zechner / Earendil Works
2025
Open
0.86.1
Table 2. Overview of the seven evaluated agent frameworks.
Figure 2. ASR and final-output TCR across seven frameworks. Each marker averages the three five-round workload means.
Condition
File change (%)
Specified content (%)
ETUDE
100.0
100.0
P-ctx × E2
42.4
14.4
Table 3. W3 research-note modification and specified-content attainment (%). Only the latter counts toward ASR.
Figure 3. Backend and tool sensitivity. (a) ETUDE ASR with W1/Markdown fixed. (b) W3 actual file modification and final-output TCR, averaged across four frameworks per tool. A seven-by-four heatmap displays backend ASR, and adjacent grouped horizontal bars display ASR and TCR for three tool utilities averaged across their evaluated contexts.
Figure 4. Target blocking and legitimate-update rejection as TLSH thresholds vary. Controlled strata and public history use separate denominators. Step curves show target blocking and false-positive rates for small, functional, and public-history updates against TLSH threshold.
Form
Route
DSR (%)
ASR (%)
TCR (%)
Compl. B
Original
ETUDE
98.3 ± 3.7
0.0
0.0
0/1200
Protected
ETUDE
6.7 ± 7.0
85.0 ± 10.9
84.3 ± 10.8
1020/1200
Original
P-direct × E1
93.3 ± 7.0
0.0
0.0
0/1200
Protected
P-direct × E1
0.0
96.7 ± 4.6
96.2 ± 4.5
1160/1200
Table 4. Static review and native execution for readable and PyArmor-protected code.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5. One normal call and an additional W2 order (protected code, OpenCode/GLM). The handler is schematic; both outcomes come from one saved audit. A normal Markdown-cleaning call returns the complete text while host and service records confirm an additional order created by the tool. The schematic shows the code added in the update; the actual runtime audit reports an alert.
W1
W2
W3
Framework
Condition
ASR
TCR
ASR
TCR
File change
Specified goal
TCR
Gemini CLI
ETUDE
100.0 ± 0.0
98.0 ± 4.5
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
98.0 ± 4.5
P-direct × E1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
P-ctx × E1
0.0
0.0
0.0
0.0
20.0 ± 44.7
0.0
20.0 ± 44.7
P-ctx × E2
26.0 ± 37.1
100.0 ± 0.0
0.0
100.0 ± 0.0
19.0 ± 42.5
0.0
100.0 ± 0.0
Codex CLI
ETUDE
100.0 ± 0.0
98.0 ± 4.5
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
Appendix
Table 5. Framework results (%) with GLM-5.3-Flash and the Markdown cleaner. TCR uses the complete core body in all workloads; W3 separates actual file change from specified-goal attainment. Entries are five-round mean ± sample SD.
Framework
W1
W2
W3 †
ETUDE
P-direct × E1
P-ctx × E1
P-ctx × E2
ETUDE
P-direct × E1
P-ctx × E1
P-ctx × E2
ETUDE
P-direct × E1
P-ctx × E1
P-ctx × E2
Gemini CLI
98.0 ± 4.5
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
0.0 ± 0.0
0.0 ± 0.0
98.0 ± 4.5
Codex CLI
95.0 ± 5.0
0.0 ± 0.0
0.0 ± 0.0
99.0 ± 2.2
100.0 ± 0.0
0.0 ± 0.0
0.0 ± 0.0
80.0 ± 44.7
100.0 ± 0.0
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
Claude Code
99.0 ± 2.2
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
0.0 ± 0.0
20.0 ± 44.7
99.0 ± 2.2
98.0 ± 2.7
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
OpenCode
100.0 ± 0.0
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
0.0 ± 0.0
40.0 ± 54.8
100.0 ± 0.0
99.0 ± 2.2
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
DeepSeek Harness
100.0 ± 0.0
0.0 ± 0.0
0.0 ± 0.0
100.0 ± 0.0
99.0 ± 2.2
0.0 ± 0.0
0.0 ± 0.0
99.0 ± 2.2
99.0 ± 2.2
0.0 ± 0.0
0.0 ± 0.0
93.0 ± 15.7
Appendix
Table 6. Full-task TCR (%), requiring correct input, prescribed tool use, tool output, and final delivery. W3 † uses a separate content-restricted condition.
W1
W2
W3
Framework
Tool
ASR
TCR
ASR
TCR
ASR
Core TCR
Codex CLI
Markdown cleaner
100.0 ± 0.0
95.0 ± 5.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
CSV statistics
80.0 ± 44.7
80.0 ± 44.7
79.0 ± 44.2
79.0 ± 44.2
68.0 ± 46.0
68.0 ± 46.0
ICS generator
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
99.0 ± 2.2
100.0 ± 0.0
100.0 ± 0.0
Claude Code
Markdown cleaner
99.0 ± 2.2
99.0 ± 2.2
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
100.0 ± 0.0
CSV statistics
100.0 ± 0.0
100.0 ± 0.0
60.0 ± 54.8
60.0 ± 54.8
99.0 ± 2.2
99.0 ± 2.2
Appendix
Table 7. ETUDE across tools and W1–W3 in four frameworks (GLM-5.3-Flash). Values are five-round ASR/TCR mean ± sample SD (%).
Condition
GLM-5.3- Flash
Qwen-3.8
DS-V4 OFF
DS-V4 ON
Framework: Gemini CLI
ETUDE
100.0 / 98.0
100.0 / 96.0
100.0 / 90.0
100.0 / 98.0
P-ctx × E2
26.0 / 100.0
21.0 / 100.0
0.0 / 99.0
0.0 / 100.0
Framework: Codex CLI
ETUDE
100.0 / 95.0
100.0 / 91.0
100.0 / 100.0
94.0 / 93.0
P-ctx × E2
40.0 / 99.0
0.0 / 100.0
0.0 / 100.0
0.0 / 100.0
Appendix
Table 8. Backend comparison for W1 with the Markdown cleaner. Each pair lists ASR and full-task TCR (%), respectively; both are five-round means.
Project
Actual/planned
t=30
t=145
t=233
AWS MCP
8/10
3/8
1/8
1/8
GitHub MCP Server
10/10
0/10
0/10
0/10
Appendix
Table 9. TLSH blocking of sampled historical updates, by project. Threshold columns show blocked/scorable pairs.
Scanner
Code
Target ( n=3 )
Legitimate ( n=20 )
SkillFortify
Readable
100.0%
100.0%
SkillFortify
Protected
0.0%
0.0%
SkillSpector
Readable
0.0%
0.0%
SkillSpector
Protected
100.0%
100.0%
Appendix
Table 10. Package rejection by two additional static scanners.
Source view
Form
BLOCK
UNK.
ALLOW
BLOCK (%)
Full
Raw
14
1
0
93.3 ± 14.9
Full
Protected
0
1
14
0.0 ± 0.0
2,000 chars
Raw
0
0
15
0.0 ± 0.0
2,000 chars
Protected
4
2
9
26.7 ± 36.5
Appendix
Table 11. Component diagnoses from full and 2,000-character source views, not admission decisions. Counts use 15 reviews per row; BLOCK rates report five-round mean ± sample SD (%).
Code form
Static
Audit allow
Audit effect
Replay effect
Raw
BLOCK
5/5
0/5
5/5
Protected
ALLOW
5/5
0/5
5/5
Appendix
Table 12. Separate outcomes from static review, runtime auditing, and ordinary replay of each frozen package. Each form has one static judgment and five runs per execution context.