

In recent years, artificial intelligence has completely transformed the modern software development landscape. From autocomplete suggestions to generating entire modules from natural language prompts, Large Language Models (LLMs) have made "vibe coding" — building applications rapidly with heavy reliance on AI tools — a mainstream practice. Over 40% of committed code now contains AI assistance, and developers around the world are embracing these tools to boost productivity.
However, alongside this rapid efficiency comes an insidious new threat to the software supply chain: slopsquatting.
While cybercriminals have spent decades using tactics like typosquatting, the rise of AI-generated code has unlocked a far more automated and difficult-to-detect attack vector. Here is everything you need to know about slopsquatting, how AI hallucinations fuel it, and what your development team can do to stay secure.
To understand slopsquatting, it helps to look at its predecessor, typosquatting. In traditional typosquatting, an attacker registers a misspelt version of a popular open-source software package — such as creating a fake package called crossenv to catch developers who accidentally forget the hyphen in cross-env. Popular package registries like npm and PyPI have built sophisticated defences over the years to spot and block these simple character variations.
Slopsquatting, a term blending "AI slop" and "typosquatting," operates on a completely different mechanism. Instead of waiting for a human developer to make a typing mistake, slopsquatting exploits the tendency of AI models to hallucinate — that is, invent fictitious software package names that sound entirely plausible.
When an AI coding assistant suggests a nonexistent helper library (for instance, recommending cross-env-extended or express-auth-utility), it presents the command with total confidence. If a malicious actor observes that a particular AI model consistently hallucinates the same fake package name, they can simply register that package on public repositories and fill it with malicious code.
When a developer blindly runs the installation command recommended by the AI, the malicious package is downloaded straight into their project.
In most consumer applications, an AI hallucination is merely an annoying inaccuracy or a piece of misinformation. But in software engineering, a hallucinated dependency creates an immediate, executable backdoor.
LLMs generate text based on statistical likelihood rather than absolute factual verification. Research shows that hallucination rates in code-generating LLMs can range anywhere from 20% to over 80%, depending on the model architecture and prompting techniques. Even top-performing proprietary models like GPT-4o frequently output non-existent package names.
What makes this vulnerability particularly dangerous is that these hallucinations are rarely random:
Because these hallucinated libraries are completely original names rather than direct typos of existing tools, registry defence systems do not flag them as suspicious. Consequently, malicious packages can quietly sit on public registries for months or years, silently infecting any project where a developer relies on unverified AI recommendations.
Not all AI models carry the same level of exposure to slopsquatting. Studies examining millions of AI-generated package recommendations have revealed significant disparities between proprietary and open-source models:
This disparity means organisations relying heavily on self-hosted or open-source AI tools may be significantly more exposed to slopsquatting risks. However, as cybercriminals refine their methods, proprietary models will undoubtedly become targets for tailored exploitation as well.
The root cause of slopsquatting risk is not just the AI itself, but how developers interact with it.
As developers grow accustomed to seamless AI assistance, manual code reviews and package verification tend to slip. When an AI tool outputs a clean block of code complete with installation steps, it creates a false sense of trust. Developers are far less likely to search an official package manager to confirm whether a recommended library actually exists, has an active maintainer, or possesses a clean security track record.
With open-source vulnerability reports increasing at nearly 98% annually — far outstripping the growth of the packages themselves — introducing unvetted AI-recommended dependencies into production environments creates catastrophic supply chain vulnerabilities.
Defending against slopsquatting requires combining smart developer habits with automated tooling:
AI coding assistants are undeniably powerful, but they are not infallible. As cybercriminals shift their focus from typosquatting to exploiting AI hallucinations, software engineering teams must adapt their defence strategies. By understanding the mechanics of slopsquatting and enforcing rigorous package validation, organisations can enjoy the productivity gains of AI without compromising their supply chain security.
For more detailed information and insights on this emerging threat, check out the original article on VentureBeat:
👉 Forget typosquatting; slopsquatting is the software supply chain threat created by AI coding tools
Disclaimer: This article is provided for informational purposes only, mistakes may be made, and it's not offered or intended to be used as legal, tax, investment, financial, or any other advice.
