Ethical Considerations
We acknowledge the dual-use nature of our study. On one hand, it raises awareness of an emerging threat and enables developers to strengthen applications' underlying LLMs and marketplaces against it. On the other hand, the techniques we describe could potentially be misused by malicious actors.
We believe that conducting and publishing this research is essential to provide the scientific community and practitioners with a rigorous characterization of this emerging threat.
Accordingly, we responsibly disclosed our findings to the affected application vendors, foundation model providers, and relevant marketplace maintainers before publication.
We also redacted implementation details that could be directly replicated by attackers to facilitate exploitation.
Furthermore, we adopted several technical safeguards throughout the study to minimize the risk of unintended misuse during our experiments.
In light of these precautions (which we discuss in detail in the paper), we conclude that the benefits of enabling the broader community to understand, anticipate, and mitigate the risks posed by agentic botnets outweigh the potential risks associated with publishing these findings.
TLDR
Ask an LLM to clone a repository created after its training cutoff, and it will usually get the owner wrong. Most of the wrong owners an attacker can register follow one pattern: a repository named foo is cloned from foo/foo. That means an attacker can predict these names without querying any model and register them ahead of time. An agent that clones one of them can end up running the attacker's code. No email, invite or shared file is needed to reach the victim.
For new repositories, GPT-5.2 named the wrong owner in 97.6% of clone commands, and a quarter of its commands pointed at an owner anyone can register. More than half of new repositories (52.9%) leave that foo/foo name free. Six models from three vendors make the same kind of mistake on trending repositories, and personal assistants do it when installing skills from ClawHub.
We tested the full chain on seven production agents. One squatted repository or skill led to code execution or chat exfiltration in 14% to 100% of runs, and in 90% of runs on Claude Code.
Threat Model
A weak adversary who can only read public trending lists and register names on public platforms, such as a GitHub account or a ClawHub skill
Attack Steps.
(0) Preparation. The attacker identifies popular resources by tracking Internet trends (e.g., repositories, skills, etc). Register an identifier that can be predicted without querying any model (e.g. foo/foo) and plant instructions in it.
(1) Trigger. The user asks for a task that needs an external resource.(e.g., “clone repo name”, “install skill name”).
(2) Planning. The agentic application uses an LLM to plan a sequence of actions or function calls needed to fulfill the user request.
(3) Hallucination. The LLM hallucinates a resource’s identifier and outputs an incorrect reference to the squatted resource from step 0.
(4) Retrieval. A routine operation, such as git clone, fetches the squatted resource.
(5) Context poisoning. The fetched content enters the agent's context as if it were trusted.
(6) Tool invocation. The agent follows it and runs attacker code with its own privileges.
(7) (optional) Persistence & C2. A line added to a user-level instruction file keeps the agent coming back for new commands.
Why it happens: training cutoffs
A model can only name a repository's owner if it saw that repository during training. For anything newer, it guesses. We took 120 trending repositories created between May 2024 and April 2026, five a month, and asked three models with published cutoffs to clone each one 20 times.
Sonnet 5 shows the sharpest jump, from 36.2% on older repositories to 100% from three months before its cutoff onward. Vendors publish their cutoff dates, so an attacker knows which repositories to go after, and every new model release opens a fresh window of repositories it has never seen.
Searching first mostly fixes the problem. In Cursor CLI, runs that looked the repository up before cloning reached the right one 96.4% of the time, against 2.6% for runs that skipped the lookup. Whether that lookup happens is left to the model.
The same mistake with skills
Personal assistants like OpenClaw install skills from ClawHub by name. Before installing, the resolver rewrites the name the user typed, and it does so in two ways we can predict.
Dropped words. Asked to "install skill vetter", every backbone we tried installed vetter instead of skill-vetter, ClawHub's second most downloaded skill with 212K installs. Registering vetter alone catches 99.5% of these installs across four models. The resolver drops words that could belong to any skill, like "skill" (97% of the time) or "the" and "for" (90%), and keeps the ones that say what the skill does. So the wrong slug still looks right to the user.
Display name vs. slug. ClawHub lists each skill under a display name that can be far from its real slug. "Baidu Wenku AIPPT" lives at ide-rea/ai-ppt-generator, and asking for it by its listed name led to a squattable slug in every OpenClaw run with Sonnet 4.6. Even copying the name from the marketplace page doesn't help. Skills documented in a language other than English are the worst case.
Across 14 popular skills, 96.3% of 700 install requests resolved to a slug an attacker could register. We found more than 300 skills on ClawHub exposed this way.
End-to-end results
Coding assistants were tested with a squatted repository (n=100 runs each), personal assistants with a squatted skill (n=50 each). Overall is the share of all runs in which the payload ran.
From one agent to a botnet
A single squat gets the attacker's code to run once. Two more steps turn the agent into a bot
The squatted repository or skill gets the agent to run the attacker's code.
That code adds one line to a global instruction file the agent loads in every session, like ~/.claude/CLAUDE.md.
Takes orders · The line has the agent fetch new instructions from the attacker's domain. Each fetch also tells the attacker the bot is alive.
How large could it get?
We registered 30 squats by hand in under 15 minutes, with no CAPTCHA, and measured the real clone traffic they got.
These are potential executions, not observed ones. GitHub's clone counts don't say whether a clone came from an agent, a person or a crawler, and our public placeholders only held a README marking them as research. The estimate also counts only foo/foo squats. An attacker who probes models for more names, or squats skills on ClawHub, would reach further.
Mitigations
Search before fetch. Agent frameworks should require a search step before any clone, install or fetch. In our runs this cut hallucination rates sharply.
Global name uniqueness. Platforms should stop the same resource name from being registered under a different owner. ClawHub adopted part of this after our disclosure.
Reputation checks. Before retrieving or running a resource, check signals the platform already exposes, such as age, stars and downloads.
FAQ
What is the difference between untargeted pull-based indirect prompt (poisoning a webpage) injections and targeted push-based indirect prompt injection (poisoning emails)?
The main difference is in the likelihood of compromise.
Push-based indirect prompt injections rely on poisoning emails or calendar invitations with adversarial prompts. They are associated with a high likelihood of compromise because emails and calendar invitations are automatically stored in a user's workspace. Therefore, we consider emails and calendar invitations as channels that allow attackers to "push" adversarial prompts in a targeted manner into a user's application with high likelihood of success in response to a relevant user prompt (e.g., what are the recent emails I received?, what are my next meetings?).
Pull-based indirect prompt injections rely on poisoning webpages with adversarial prompts. They are associated with low likelihood of compromise because webpages don't provide a targeted channel to an LLM application (i.e., webpages are an untargeted channel). Therefore, users need to actively "pull" the compromised webpage into their LLM applications. In practice, highly popular webpages that are frequently retrieved by users (e.g., a CNN webpage) are difficult for attackers to compromise, whereas compromising obscure webpages (a personal webpage) typically results in a low retrieval rate.
Why are trending resources (e.g., repositories and skills) an interesting target for attackers?
Trending resources ensure high request volume from users using their LLM applications. Moreover, popular/trending resources tend to be recently uploaded resources, which ensures a high hallucination rate by the LLM because they weren't part of the training set used to train the LLM used by the LLM application.
Does the attacker need to query a model first?
No. The dominant mistake, foo → foo/foo, can be predicted from the repository name alone.
How does this scale/amplify prompt injection?
The amplification of the botnet (i.e., 1 compromised resource -> n compromised machines) relies on
(1) targeting popular and trending resources (repositories and skills), which ensures high request volume for the original resource for a frequent prompt (e.g., clone repo trending-repo),
(2) identifying the most hallucinated resources an LLM hallucinates (in response to the trending resource), which ensures a high hallucination rate, and
Registering the most popular hallucination in relevant marketplaces, which ensures a high retrieval of the hallucinated resource in response to the frequent prompt.
|high request volume for the original resource| x high hallucination rate =
|high retrieval of the hallucinated resource| =
Amplification of a poisoned resource using a single resource (repository)
How could scalable prompt injections be misused to establish a botnet?
Many agents have a terminal. Once the squatted resource runs code, one added line in a user-level instruction file can keep the agent fetching new commands across sessions.
Amplifying installations of bots on devices = the establishment of a botnet
What is the significance of the agentic botnet with respect to traditional botnets?
Traditional botnets are hard to establish.
In many cases, their establishment relies on poor security implementation/decision (e.g., using default or weak passwords) or lateral movement capabilities (being a worm) between devices (e.g., the Mirai botnet). In addition, in some cases, their establishment is required to bypass firewalls. Finally, since the code used to establish them is, in many cases, static, the distribution of the affected devices is homogeneous (e.g., the hosts of most of the devices exploited by the Mirai botnet were IP cameras that hosted a vulnerable OS version).
The agentic botnet doesn't rely on default/weak passwords and doesn't require lateral movement. In addition, prompt injections aren't monitored by firewalls, and the bot could potentially be installed on any device independent of the OS (so the distribution of the compromised devices and OS is much more heterogeneous).
Could attackers improve the success rate of the adversarial hallusquatting attack?
Our findings are only a lower bound on what attackers could do.
Attacks always get better; they never get worse.
Do approval prompts protect me?
Only partly. The prompt asks whether to run git clone, not whether the owner in the URL is the right one. Users approve most prompts in practice, and auto mode has been the default in Claude Code since August 2026. Files inside the cloned repository can also try to loosen these settings. The runs in our results table had prompts turned off. In earlier interactive runs with default settings, the attack still worked whenever the operator approved the prompts.
How is this different from slopsquatting or Phantom Squatting?
Slopsquatting registers package names that an LLM invents while writing code, and it hits whoever later installs that code. Phantom Squatting (Unit 42) looks at web domains that LLMs invent for real brands. Typosquatting relies on people's typos. HalluSquatting goes after the running agent. The agent itself fetches the squatted repository or skill and acts on it on the spot. The names can be predicted from the resource's own name without querying any model, and we measured real clone traffic to the squats. Among the squatting studies we compared against, none derives names without a model or shows end-to-end code execution.
What mitigations should be applied?
LLM application-side mitigations. Invoking a search tool substantially reduces hallucination rates. Building on this observation, developers of LLM-based applications can enforce a workflow in which a search tool invocation precedes any fetch operation. Concretely, we suggest augmenting the planner component (e.g., in an AI coding assistant) with few-shot examples that demonstrate correct planning patterns for retrieving resources, such as repositories, in response to user prompts (e.g., “clone a repo” or “generate a shell command to clone a repository”). These examples can bias the planner toward incorporating an explicit search step before attempting retrieval. In addition, proactive mitigations can be implemented to detect and regulate resource-fetching behavior. This can be achieved by (1) analyzing user requests for keywords indicative of retrieval intent (e.g., clone, install, fetch), and (2) inspecting the planner’s generated execution plan for explicit fetch tool invocations, and (3) modifying the implementation of the fetch tool within the agentic framework to enforce a preceding search step before any retrieval is executed. In addition, incorporating mitigations against prompt injections to agentic applications could further secure them in case a squatting attack succeeds.
Platform-side mitigations. Platform\marketplace providers can mitigate hallusquatting by enforcing stricter registration constraints. One approach is to ensure global name uniqueness. This can be achieved by eliminating namespaces (e.g., owner identifiers on platforms such as GitHub), thereby requiring repository names to be globally unique, which would prevent attackers from registering well-known repository names under different owners. Alternatively, platforms can preserve namespaces while still enforcing uniqueness by prohibiting the reuse of existing repository names across different owners. Another complementary approach is to address predicted hallucinated resources using a strategy similar to defenses against typosquatting—namely, preemptive registration of likely hallucinations. This requires identifying potential hallucinated resource names in advance and proactively registering available squatting candidates to redirect to the original resource to prevent their malicious use. Additionally, platforms should incorporate mitigations to identify adversarial prompts in registered content.
Did you upload malicious skills and repositories to GitHub and ClawHub?
Due to ethical considerations, we registered a benign repository on GitHub and published a benign skill on ClawHub rather than deploying malicious payloads. We acknowledge that this approach did not exercise the malware detection mechanisms deployed by GitHub and ClawHub, which may identify and remove malicious content.
However, a recent study has shown that these scanning mechanisms can be readily bypassed using relatively simple techniques (by Trail of Bits), while another recent study has identified 824 malicious skills hosted on ClawHub (by KOI).
These findings suggest that the deployment of malicious resources on these platforms remains feasible in practice.
Talks
Press
Podcasts
Shorts\Reels