# ClawHub agent skills: most injected attacks run in the agent's shell, not skills

A study of all 48,682 skills on ClawHub, a public registry of add-ons for AI agents, finds many known flaws on paper. Few are reachable in practice, and the biggest exposure comes from how agents run commands.

- Category: Safety & evaluation
- Readiness level: II (Benchmarked) on Science Underway's four-step scale, as proposed
- Published: 2026-11-25
- Editor: Stefan Perdal
- URL: https://scienceunderway.com/articles/clawhub-agent-skills-most-injected-attacks-run-in-the-agent-s-shell-not-skills

## The study

Carried-Over and Agent-Native Threats in the Supply Chain of LLM Agent Skills (preprint, not peer reviewed). arXiv 2611.30932. https://arxiv.org/abs/2611.30932

## At a glance

- What it shows: Many add-on packages for AI agents contain security flaws left by honest authors, but most known flaws in borrowed code cannot be reached by an attacker. When a planted instruction did trigger code, it usually ran through the agent's own command line before the add-on even started.
- What it does not show: It does not show any real-world attack, and it does not cover deliberately malicious add-ons. The tests used one registry, one point in time and one low-cost OpenAI model.
- Why it matters: Security teams can spend effort where it counts: flaws in an add-on's own code, and how the agent passes text to the command line. A simple change in how agents run commands blocked most attacks in the tests.

## What the study shows

Agent skills are small packages that give an AI agent new abilities. Each bundles scripts, third-party libraries and a plain-text instruction file, called SKILL.md, that tells the agent how to use it. The agent fills in the skill's inputs from the user's request and from outside content such as web pages or emails. That opens the door to indirect prompt injection, where an attacker hides instructions in content the agent later reads.

The authors, from Nanyang Technological University and Nankai University, scanned every skill on ClawHub as of March 2026. They screened all skills automatically, then reviewed by hand the 3,428 cases flagged by their four main detectors. Finally, they ran samples in a sealed test environment and with a live agent. The paper is a preprint and has not been peer reviewed.

The authors report that about half of the skills whose libraries could be pinned to exact versions use a version with a known, publicly listed flaw. That is about 3% of the whole registry. Most of these skills were flawed on the day they were published, and almost none were fixed six months later.

In the skills' own code, manual review confirmed 315 skills where agent input can reach a command that runs code. Risky install steps, such as downloading and running a script in one go, sat mostly in SKILL.md rather than in installer scripts. Leaked passwords and keys printed to the screen were rare: 22 confirmed.

The key result is about reachability. In sandbox tests, flaws in the skills' own code were exploited in 21 of 22 cases, while known flaws in libraries were exploited in none of 14. With a live agent, the planted payload ran in about half of 200 sampled skills. But in almost all of those it ran in the agent's own command line, before the skill started. It reached a flaw inside the skill in only 5% of the sample.

## Our reading

In our reading, the headline lesson is that counting known flaws is a poor guide to risk. A dependency scanner would light up about half of the skills it can check. Yet only 47 of those 1,555 skills had a library flaw that agent input could actually reach. Flaws in the author's own code were far fewer on paper but almost always exploitable once the input arrived.

The more striking finding concerns the agent, not the skills. The test agent passed commands through a standard shell, the text-based command interpreter. Attackers disguised a command as, for example, a destination city in an email. The shell ran it before any skill code executed. This worked on skills that review had judged safe as well as on flawed ones.

A concrete example: a travel-booking skill asks the agent to fill in a city from a travel-approval email. If the email's city field hides a command, an agent that pastes it into a shell line runs that command with the user's permissions. Swapping the shell tool for one that passes arguments as a plain list stopped most of these attacks without changing a single skill.

The rest of the article (what it means, limits, what to watch) is free for members: https://scienceunderway.com/articles/clawhub-agent-skills-most-injected-attacks-run-in-the-agent-s-shell-not-skills

## How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

---
Source: Science Underway, https://scienceunderway.com/. Please link to the article when you cite it.
