Slopsquatting explained
Sometimes your AI assistant suggests a package that doesn't exist. If someone registers that name first, the next npm install runs their code. This is called slopsquatting. Seth Larson of the Python Software Foundation coined the term.
How often AI makes up packages
A USENIX Security 2025 paper by Spracklen et al. tested 16 code models on 576,000 code samples. Of 2.23 million recommended packages, 440,445 (19.7%) didn't exist, which came to 205,474 unique fake names. Commercial models averaged 5.2% and open-source models 21.7%. JavaScript code had more fake packages than Python (21.3% vs 15.8%).
Even 5% is a lot when your app has 60 dependencies. That's a few names nobody checked.
It already happened
In late 2023, Bar Lanyado of Lasso Security noticed AI models kept recommending huggingface-cli as a pip package. The real tool is installed with pip install -U "huggingface_hub[cli]". He uploaded an empty package under the fake name. It got more than 30,000 real downloads in three months, and an install line for it showed up in the README of an Alibaba research repo. His package was harmless. An attacker's wouldn't have to be.
Signs of a made-up package
- The name isn't on npm or PyPI at all (the install fails, and your AI suggests a "fix").
- It exists but was first published days or weeks ago.
- It has almost no downloads, no linked repo, or a name that's one letter off a famous package.
- Your AI is confident, but the package's docs don't mention the function it told you to call.
What to do
- Before installing, look up every new package on npmjs.com or pypi.org. Check its age, author and repo.
- Pin versions and commit your lockfile.
- Ask your AI to name the official package and link its repo, then check that link yourself.
List every dependency in package.json and requirements.txt. For each one, tell me the official registry page and source repo. Flag anything you can't verify, anything first published in the last 30 days, and anything one letter off a popular package.
How Leakcade checks this
We read your manifests as text and look up each name on npm and PyPI (only those two hosts, nothing is installed). Names that don't exist are flagged high; packages younger than 30 days are flagged medium.
Every name found and none of them brand new? Drip stays happy. That's the result you want.
Further reading
Sources
- Spracklen et al., USENIX Security 2025 (PDF)
- Lasso Security: AI package hallucinations
- The Register: AI bots hallucinate software packages
Want a second pair of eyes?
We review your whole repo and write a fix prompt for every finding. $19, report within an hour.
Check my repoLeakcade is an automated check. It can miss vulnerabilities and is not a substitute for a professional security audit or pentest. Provided as is. You stay responsible for your code. Where the law allows, our liability is limited to what you paid ($19). Terms