What are hallucinated packages?
Hallucinated packages are software add-ons that an AI tool suggests but that do not exist. Attackers watch for these invented names and publish real packages under them, filled with malicious code. The next person who installs what the AI recommended pulls the attacker's code into their app. This is sometimes called slopsquatting.
Also called: Slopsquatting
ON THIS PAGE
What it means
AI models sometimes make up plausible-sounding package names, the way they sometimes make up facts. The same invented names tend to come up again and again.
Installing a package runs its code on your machine and ends up inside your app, so a malicious one can steal keys or data.
Why it matters for vibe-coded apps
Running the install command the AI gave you feels routine, and it takes seconds.
- Your secret keys and environment files can be stolen during install.
- Malicious code ships to your users inside your app.
- The package may look normal because the AI named it confidently.
Example
The AI tells you to install a helper package.
npm install some-package-the-ai-made-upnpm view express-rate-limit
# Check: who publishes it, how many weekly downloads, how old it is,
# and whether it links to a real code repositoryA very new package with few downloads and a name matching exactly what the AI said is a warning sign.
How to check if your app has this problem
- 1Look at the dependencies in package.json or requirements.txt and find any name you do not recognise.
- 2Search each one on npmjs.com or pypi.org. Check its age, downloads and repository link.
- 3Run a full check, which looks at your packages for known problems.
The quicker way: LetMeCheck tests for this automatically, from the outside, the way an attacker would.
Run a free scan →How to fix it
- 1Remove any package you cannot account for, and rotate any keys that were on a machine where it was installed.
- 2Before installing a new package, look it up and confirm it is real and widely used.
- 3Commit your lock file so the exact versions are fixed.
- 4Prefer a well-known package, or a few lines of your own code, to an obscure one.
List every dependency in my project's package.json (or requirements.txt) with its version. For each one, tell me whether it is a well-known, widely used package, and flag any that look unfamiliar, very new, or have a name that looks like a typo of a popular package. Don't install or remove anything.
Check if your app has this problem
Paste your website and we'll check for hallucinated packages issues and other common issues in AI-built apps. Free, about a minute, and nothing on your site is changed.
Last updated
Related terms
- Dependency vulnerabilityA known security hole in an add-on package your app uses.
- Vibe codingBuilding software by describing what you want to an AI tool.
- Environment variablesSettings stored outside your code, used to keep secrets out of it.
- API key exposureA secret key for a paid service ends up where the public can see it.
Related reading
Need help?
Not sure what this means for your app? Our team will explain it in plain English.