Supply-Chain Poisoning Attacks Against LLM Coding Agent Skill Ecosystems

Yubin Qu, Yi Liu, Tongcheng Geng, Gelei Deng, Yuekang Li, Leo Yu Zhang, Ying Zhang, Lei MaarXiv 2026

TL;DR

This paper exposes a critical security flaw in the supply chain of LLM-based coding agents: third-party "agent skills" can be poisoned to hijack the host system's action space (e.g., executing shell commands or exfiltrating data). By introducing Document-Driven Implicit Payload Execution (DDIPE), the authors demonstrate that agents can be tricked into executing malicious code simply by copying poisoned examples from documentation, completely bypassing traditional safety alignment.

What Problem Does This Paper Address?

LLM-based coding agents (like Claude Code or OpenHands) extend their capabilities using third-party "agent skills"—modular packages that bundle tool-invocation logic and workflow descriptions. Because these agents require system-level privileges to write files, run shell commands, and make network requests, they trust these skills by default.

While prior work has explored how poisoned files can bias tool selection, this paper addresses a much more dangerous threat: action-space hijacking. The authors investigate whether an attacker can exploit open skill marketplaces to execute arbitrary malicious code on a user's host machine. Crucially, they look at how these attacks can succeed even when the underlying LLM has strong safety alignment and the agent framework employs architectural guardrails.

End-to-end threat scenario for PoisonedSkills, illustrating how a poisoned skill moves from a public marketplace into the agent's execution environment.

Methods

The authors introduce Document-Driven Implicit Payload Execution (DDIPE). Instead of using explicit, imperative instructions (e.g., "Run this malicious bash command"), which well-aligned LLMs easily catch, DDIPE exploits the way LLMs use in-context learning to treat documentation as a trusted reference.

DDIPE embeds malicious logic directly inside benign-looking Markdown code blocks or configuration templates (like YAML or Makefiles). When an agent is given a routine task, it copies these "best practice" examples into its own output and subsequently executes them. To prevent detection by humans or static analysis, DDIPE employs three camouflage techniques:

  • Functional compliance disguise: Framing data theft as routine telemetry or security auditing.
  • Silent exception suppression: Wrapping malicious code in try/except: pass blocks to hide error traces.
  • False authority suggestion: Using fake internal domains (e.g., api.internal-telemetry.com) to mimic legitimate corporate infrastructure.

To evaluate this at scale, the authors built an automated, LLM-driven seed–mutation–validation pipeline. This framework takes expert-crafted attack seeds, mutates them using an LLM to fit various plausible contexts, and validates that they still parse correctly and pass syntax checks.

Figure 3: Running examples of Document-Driven Implicit Payload Execution (DDIPE). Scenario A (left) conceals environment-variable exfiltration within a PDF process- ing 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 deploy- ment template. In both cases, the underlying model repro- duces the poisoned code as “best practices” when processing routine tasks.

Datasets

The authors introduced a new benchmark consisting of 1,070 adversarial skills generated from 81 expert-crafted seeds. The dataset is systematically mapped to the MITRE ATT&CK framework, covering 15 distinct attack categories across seven tactical stages (from Execution to Impact), including reverse shells, credential theft, container escapes, and infrastructure poisoning.

Key Insights and Ideas

  • Brevity Evades Safety Alignment: The authors found that smaller, minimalist payloads are much more effective at bypassing LLM safety filters. Large, verbose payloads expose more attack-indicative keywords (like exfiltrate or keylogger), triggering the model's guardrails. A tiny, 9-line pip configuration script was the only payload to achieve a 100% execution rate across all tested models under the strict Claude Code framework.
  • Asymmetric Defense Interaction ("Sleeper Payloads"): Model-level alignment and framework-level guardrails do not act independently. For weakly aligned models, framework architecture is critical; removing it caused a 11.3× spike in successful attacks for one model. For strongly aligned models, the framework defenses were almost redundant.
  • Model-Specific Blind Spots: Different LLMs fall for different traps. For example, Claude Sonnet 4.6 easily fell for DevOps operational disguises (like Nginx or Conda configurations), interpreting them as legitimate infrastructure tasks, whereas GLM-4.7 correctly identified the semantic disconnect and refused the task.
  • Defense Diversity Compresses Attack Surface: Because different models have distinct blind spots, using multi-model ensemble voting as a security barrier drastically reduces the joint attack surface—dropping the success rate from 13–20% down to just 1.6%.

Key Results

The authors evaluated PoisonedSkills across four production agent frameworks (Claude Code, OpenHands, Codex, Gemini CLI) and five state-of-the-art LLMs.

  • High Bypass Rates: DDIPE achieved a 11.6% to 33.5% bypass rate across all eight tested configurations. In contrast, traditional explicit instruction injection attacks achieved a 0% success rate under the best-defended setups.
  • Evasion of Static Analysis: While post-hoc static scanning caught 90.7% of the adversarial samples, 2.5% of the payloads managed to evade both static analysis tools and LLM safety alignment through clever semantic disguises.
  • Real-World Impact: Responsible disclosure of these findings to vendors led to four confirmed production vulnerabilities and two deployed security fixes (including prompt-level trust annotations in OpenHands).

Limitations and Future Work

The study assumes that the retrieval phase is successful (i.e., the poisoned skill successfully makes it into the agent's context window), leaving end-to-end retrieval validation for future work. Additionally, the evaluation noted high framework-specific runtime error rates (over 60% in two configurations) due to API incompatibilities rather than security refusals. Finally, the authors note that while static analysis was tested, more dynamic sandboxing and LLM-based auditing techniques remain untested against DDIPE.

Summary updated

BibTeX
@misc{qu2026supply,
  author = {Yubin Qu and Yi Liu and Tongcheng Geng and Gelei Deng and Yuekang Li and Leo Yu Zhang and Ying Zhang and Lei Ma},
  title = {{Supply-Chain Poisoning Attacks Against LLM Coding Agent Skill Ecosystems}},
  year = {2026},
  eprint = {2604.03081},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.03081},
}
Figure