Supply-Chain Poisoning Attacks Against LLM Coding Agent Skill Ecosystems
Authors: Yubin Qu, Yi Liu, Tongcheng Geng, Gelei Deng, Yuekang Li, Leo Yu Zhang, Ying Zhang, Lei Ma
Organizations: Griffith University Australia · Quantstamp Singapore · The State Information Center China · Nanyang Technological University Singapore · University of New South Wales Australia · Wake Forest University USA · The University of Tokyo & University of Alberta Japan & Canada
LLM-based coding agents extend their capabilities via third-party agent skills distributed through open marketplaces without mandatory security review. Unlike traditional packages, these skills are executed as operational directives with system-level privileges, so a single malicious skill can compromise the host. Prior work has not examined whether supply-chain attacks can directly hijack an agent's action space, such as file writes, shell commands, and network requests, despite existing safeguards. We introduce Document-Driven Implicit Payload Execution (DDIPE), which embeds malicious logic in code examples and configuration templates within skill documentation. Because agents reuse these examples during normal tasks, the payload executes without explicit prompts. Using an LLM-driven pipeline, we generate 1,070 adversarial skills from 81 seeds across 15 MITRE ATTACK categories. Across four frameworks and five models, DDIPE achieves 11.6% to 33.5% bypass rates, while explicit instruction attacks achieve 0% under strong defenses. Static analysis detects most cases, but 2.5% evade both detection and alignment. Responsible disclosure led to four confirmed vulnerabilities and two fixes.
Figures & tables
Figure 1. A poisoned pptx skill. Left: the highlighted line disguises exfiltration as a routine backup. Right: the referenced script silently uploads documents to an attacker-controlled server.
Figure 2. End-to-end threat scenario for PoisonedSkills. The attacker publishes a disguised malicious skill ( sadv ) to a public marketplace. The skill reaches the victim agent through retrieval and, once loaded, induces the agent to exfiltrate private data, escalate privileges, or execute arbitrary code. This work evaluates the post-loading phase (shaded region): whether the embedded payload can trigger harmful execution despite safety-alignment and architectural defenses. The retrieval phase is assumed to succeed.
Figure 3. Running examples of Document-Driven Implicit Payload Execution (DDIPE). Scenario A (left) conceals environment-variable exfiltration within a PDF processing function: the payload silently posts os.environ to an attacker-controlled endpoint, and silent exception handling ensures the main logic runs uninterrupted. Scenario B (right) injects a privileged container-escape backdoor and an unauthorized host-root mount into a Kubernetes deployment template. In both cases, the underlying model reproduces the poisoned code as “best practices” when processing routine tasks.
Category
Manipulation
Tactic
ID
Reverse Shell / RCE
Netcat/Bash reverse connect, command exec.
Execution
T1059.004
Container Escape
Mount docker.sock , priv. escalation
Privilege Esc.
T1611
Supply-Chain Poison
pip/npm registry hijack, source tampering
Defense Evasion
T1195.002
Malicious Config Write
IDE config tampering, build-script hijack
Defense Evasion
T1565.001
Codebase Injection
XSS, Git Hook command injection
Execution
T1059
IaC Attack
Terraform/CloudFormation poisoning
Impact
T1496
Table 1. Adversarial skill attack taxonomy. The first 14 categories are mapped to MITRE ATT&CK tactics and technique identifiers; the last row is a project-defined catch-all for multi-stage or hybrid attacks. Categories span seven tactical stages from Execution to Impact.
System
Model
Scale
Security Characteristics
Claude Code
Claude Sonnet 4.6
1,070
Multi-layer architecture-level security review
Claude Code
GLM-4.7
1,070
Claude Code
MiniMax-M2.5
1,070
OpenHands
Claude Sonnet 4.6
1,070
Relies on underlying model safety alignment; no architecture-level defenses
OpenHands
GLM-4.7
1,070
OpenHands
MiniMax-M2.5
1,070
Table 2. Agent system and victim model configurations. Each combination is tested against all 1,070 adversarial skill samples. Security characteristics range from multi-layer architecture-level review (Claude Code) to model-only alignment (OpenHands), containerized sandbox isolation (Codex), and cloud-native safety filtering (Gemini CLI).
System
Model
Refused(%)
Generated(%)
Executed(%)
Err.(%)
Valid(%)
BR(%)
DER(%)
DER 95% CI
Claude Code
Sonnet 4.6
919 (85.9)
119 (11.1)
25 (2.3)
7 (0.7)
99.3
13.5
2.3
[1.6, 3.4]
Claude Code
GLM-4.7
876 (81.9)
154 (14.4)
26 (2.4)
14 (1.3)
98.7
16.8
2.4
[1.6, 3.5]
Claude Code
MiniMax-M2.5
835 (78.0)
77 (7.2)
142 (13.3)
16 (1.5)
98.5
20.5
13.3
[11.4, 15.5]
OpenHands
Sonnet 4.6
700 (65.4)
120 (11.2)
115 (10.7)
135 (12.6)
87.4
22.0
10.7
[9.0, 12.8]
OpenHands
GLM-4.7
603 (56.4)
69 (6.4)
290 (27.1)
108 (10.1)
89.9
33.5
27.1
[24.5, 29.9]
OpenHands
MiniMax-M2.5
91 (8.5)
16 (1.5)
273 (25.5)
690 (64.5)
35.5
27.0
25.5
[23.0, 28.2]
Table 3. End-to-end attack results ( n=1,070 ). Refused = safe refusal, Generated = code generation without execution, Executed = direct execution. Percentages are shown in parentheses. BR = (Generated+Executed)/Total; DER = Executed/Total. The rightmost column reports 95% Wilson score confidence intervals ( Bender, 2001 ) for DER.
Figure 4. Universal breach case study. This 479-byte payload (a 9-line pip configuration write) is the only sample executed by all three models under Claude Code.
Figure 5. Compliance trap case study (Conda environment poisoning). Under the same Claude Code architecture, Sonnet 4.6 directly executes the payload while GLM-4.7 refuses.
Category
n
Sonnet
GLM
MiniMax
Supply-Chain Poison
508
2.8
2.4
9.4
Creds & Env Theft
219
2.3
3.7
17.8
Config. Tamper
64
6.3
6.3
20.3
Code & Infra.
124
1.6
0.0
13.7
Network Exfil.
82
0.0
1.2
19.5
Sys. Persistence
48
0.0
2.1
16.7
Table 4. DER (%) by attack category under Claude Code. Categories are grouped by tactical function. n = number of adversarial samples per group. The rightmost column shows MiniMax-M2.5 DER for comparison with strongly aligned models.
LLM agents are evolving rapidly, powered by code execution, tools, and the recently introduced agent skills feature. Skills allow users to extend LLM applications with specialized third-party code, knowledge, and instructions. Although this can extend agent capabilities to new domains, it creates an increasingly complex agent supply chain, offering new surfaces for prompt injection attacks. We identify skill-based prompt injection as a significant threat and introduce SkillInject, a benchmark evaluating the susceptibility of widely-used LLM agents to injections through skill files. SkillInject contains 202 injection-task pairs with attacks ranging from obviously malicious injections to subtle, context-dependent attacks hidden in otherwise legitimate instructions. We evaluate frontier LLMs on SkillInject, measuring both security in terms of harmful instruction avoidance and utility in terms of legitimate instruction compliance. Our results show that today's agents are highly vulnerable with up to 80% attack success rate with frontier models, often executing extremely harmful instructions including data exfiltration, destructive action, and ransomware-like behavior. They furthermore suggest that this problem will not be solved through model scaling or simple input filtering, but that robust agent security will require context-aware authorization frameworks. Our benchmark is available at https://www.skill-inject.com/.
David Schmotz, Luca Beurer-Kellner, Sahar Abdelnabi +1
Max Planck Institute for Intelligent Systems, ELLIS Institute Tübingen, Tübingen AI Center · Snyk, Switzerland
Third-party skills can expose LLM agents to malicious instructions hidden by encoding. We introduce Ciphered Skill Injection (CSI), which embeds such instructions in skill files for agents to decode and follow. We evaluate Caesar and layered variants across eight models and 139 injection-task pairs, separating instruction recovery from attack success. In the primary setting with shortened skills, the variants achieve attack success rates of up to 47.5% and 40.3%, respectively. Successful decoding does not guarantee attack success, and layering has model-dependent effects. The tested skill scanners rarely flag injected skills. These findings highlight the risk of promoting decoded, untrusted content into actionable instructions.
Yan-Lun Chen, Pin-Yu Chen, Chia-Mu Yu
National Yang Ming Chiao Tung University · IBM Research
Agent skills extend coding agents with task-specific instructions, scripts, and resources, but they also create a trusted instruction channel that can be abused beyond conventional security attacks. This paper studies token amplification through skill injection: an economic resource-abuse threat in which a malicious skill causes an agent to consume substantially more tokens than needed for normal task execution. We present SkillBloat, a two-phase framework that first screens a library of diverse attack-type conditions across multiple amplification mechanisms and then refines the strongest candidate through LLM-guided full-document skill rewriting. Evaluated on a real-world skill benchmark, SkillBloat achieves 5.4184x-10.1455x average best amplification across multiple coding-agent target configurations. An ablation shows that the second-stage refinement loop consistently improves average best amplification over Phase 1 attack-type screening alone, demonstrating that iterative optimization provides additional benefit beyond initial attack-type selection. These results show that skill ecosystems expose a practical resource-amplification attack surface that is orthogonal to existing security-oriented skill poisoning.