slopsquatting
In plain wordsAn attack that exploits AI coding assistants' habit of inventing software packages that do not exist: attackers publish malicious code under those made-up names and wait for people or agents to install it.
A software supply-chain attack that turns invented dependencies into a trap: code-generating language modelslarge language model, n.: A computer program trained on enormous amounts of text to predict the words that come next. At vast scale, that simple skill lets it chat, answer questions, translate, summarize and write code. often hallucinatehallucination, n.: When an AI states something false or made up — a fake fact, quotation or source — fluently and confidently, as if it were true. plausible package names, and an attacker who claims one of them on a public registry such as PyPI or npm hands attacker-controlled code to any developer or coding agentcoding agent, n.: An AI agent that writes and fixes software by itself: it reads a codebase, edits files, runs commands and tests, and keeps working until a feature is built or a bug is fixed. that installs the suggestion. It works because package hallucinations are common and often recur for similar prompts, making the names predictable: a 2025 study found that about 20% of packages recommended in generated code did not exist, with open models hallucinating far more often than commercial ones. It is a cousin of typosquatting, which relies on human typing errors. Defenses include checking that suggested packages exist and are reputable before installing them, dependency allow-lists and lockfiles, registry monitoring of newly claimed names, and grounding coding agents in real package indexes.
The agent proposed a dependency nobody had heard of — a textbook slopsquatting risk — so CI blocked the install.
Origin
Coined in April 2025 by Seth Larson, security developer-in-residence at the Python Software Foundation, from 'slop' (low-quality AI output) and 'typosquatting', and spread by Andrew Nesbitt and the security press. Bar Lanyado had described AI package hallucination in 2023, and in 2024 reported that a hallucinated name he registered as an empty package drew over 30,000 downloads in three months.
Usage note
Publicly documented cases have mostly been proofs of concept, in which researchers registered hallucinated names before attackers could; the scale of real-world exploitation is unclear.
Related
- AI supply chain securityAI supply chain security, n.: Protecting everything an AI system is built from — downloaded models, datasets, code libraries and tools — against tampering, so a poisoned or fake part cannot sneak into the finished product.
- hallucinationhallucination, n.: When an AI states something false or made up — a fake fact, quotation or source — fluently and confidently, as if it were true.
- coding agentcoding agent, n.: An AI agent that writes and fixes software by itself: it reads a codebase, edits files, runs commands and tests, and keeps working until a feature is built or a bug is fixed.
- vibe codingvibe coding, n.: Programming by conversation: you ask an AI for what you want, try out what it produces and ask again until it works, trusting the code without really reading it.
- tool poisoningtool poisoning, n.: Hiding harmful instructions in the description of a tool an AI assistant can use, so the assistant obeys them when it reads the tool's details, even though the user never sees them.
Sources
- Spracklen, J., Wijewickrama, R., Sakib, A. H. M. N., Maiti, A., Viswanath, B. & Jadliwala, M. (2025). We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs. USENIX Security 2025. arXiv:2406.10279.
Mentioned in
vibe codingvibe coding, n.: Programming by conversation: you ask an AI for what you want, try out what it produces and ask again until it works, trusting the code without really reading it., AI supply chain securityAI supply chain security, n.: Protecting everything an AI system is built from — downloaded models, datasets, code libraries and tools — against tampering, so a poisoned or fake part cannot sneak into the finished product., code generationcode generation, n.: Having an AI write computer code from a description in plain language, from finishing a single line as you type to building whole programs.