NewspeakSupply Chain2084-A-0014
Slopsquatting: registering the packages AI makes up
Coding assistants sometimes recommend software packages that do not exist. Slopsquatting is registering those invented names so that anyone who follows the advice installs the squatter's code.

Slopsquatting (包名幻觉抢注) is the registration of software package names that AI coding tools invent, so that a developer who follows the tool's advice installs whatever the registrant has published under that name. Seth Michael Larson, security developer-in-residence at the Python Software Foundation, coined the term in 2025: "slop" is a common jab at low-quality AI output, and the rest comes from typosquatting, which preys on human typing mistakes (The Register).
How it happens
Large language models predict plausible text, and a plausible package name is not necessarily a real one. A team of university researchers led by Joseph Spracklen tested 16 code-generating models on 576,000 code samples in two programming languages. At least 5.2% of packages suggested by commercial models and 21.7% of those suggested by open-source models did not exist, and the study recorded 205,474 unique invented names (Spracklen et al., USENIX Security 2025). The Register, reporting the same work, said that when a prompt that produced an invented name was re-run ten times, 43% of those names reappeared every time. Repeatable mistakes are what make a name worth squatting.
The attack itself needs no break-in. Someone registers a frequently invented name on a public registry such as PyPI or npm and waits for developers, or increasingly autonomous coding agents, to install it.
A documented case
In 2024 Lasso Security researcher Bar Lanyado noticed that AI models kept recommending a Python package called huggingface-cli, which did not exist. He uploaded an empty package under that name as an experiment. In three months it received more than 30,000 downloads that he judged to be genuine, and installation instructions for it appeared in the README of a research repository from Alibaba (Lasso Security). The package contained no code, so nobody was harmed, but anyone could have published something malicious in its place. Larson told The Register it is difficult, and likely impossible, to count how many installs of hallucinated names are being attempted.
How to defend against it
OWASP lists exactly this scenario under LLM09, misinformation, and recommends verifying AI output and following secure coding practice (OWASP). In practice:
- Check that a suggested package exists, that its name matches the official documentation of the project you meant to use, and that its age, maintainers and download history look right.
- Pin dependencies with lockfiles and, where possible, install from an internal mirror or an allowlist.
- Run dependency scanning in CI so that new or unknown packages are flagged.
- Do not let coding agents add dependencies without a person approving the change.
Mitigation
Before installing a dependency suggested by an AI tool, confirm that the package exists in the official registry, that its name matches the project's own documentation, and that its age, maintainers and download history make sense. Pin dependencies with lockfiles and pull from an internal mirror or allowlist where possible. Run dependency scanning in CI. Do not let coding agents install new packages without a human approving the change.
References
- The Register · LLMs can't stop making up software dependencies and sabotaging everything
- Spracklen et al. (arXiv) · We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs (arXiv:2406.10279, USENIX Security 2025)
- Lasso Security · Diving Deeper into AI Package Hallucinations
- OWASP Gen AI Security Project · LLM09:2025 Misinformation
Disclosure
Written by Anthropic's Claude. Anthropic develops large language models used as coding assistants, a type of tool that can produce the invented package names this entry describes. The entry does not assess any individual model.