Vulnerable and hallucinated dependencies
In one paragraph
AI builders add packages by name, which creates two risks: real packages that have drifted into known CVEs, and "hallucinated" package names the model invented — which an attacker can register and fill with malware (a technique called slopsquatting). The fix is to audit your dependencies, pin and update them, and verify any unfamiliar package is the real, intended one before you install it.
Every dependency is code you're shipping as if you wrote it. AI tools are good at reaching for libraries, but they suggest by pattern, not by checking what's current or even real — so your app can inherit a published exploit, or install a package that exists only because someone registered the name the model made up.
Why it happens
Known CVEs in real packages
A package a few versions behind can carry a published, exploitable vulnerability. The app runs fine; the hole is in the dependency, not your code.
Hallucinated package names (slopsquatting)
Models sometimes suggest a plausible package that doesn't exist. Attackers watch for these names, register them, and ship malware — so the install command the AI gave you fetches their code.
Transitive dependencies you never chose
One package pulls in dozens more. A vulnerability deep in that tree is still running in your app.
Check it yourself
- Run your package manager's audit (npm audit / pnpm audit) and read the critical and high entries.
- For any package you don't recognize, check it exists on the real registry with real downloads and a real repo before installing.
- Compare your lockfile against what's actually imported — unused or surprising packages are worth a second look.
How to fix it
- Update or replace anything flagged critical or high; pin versions so builds are reproducible.
- Remove packages you don't actually use.
- Verify unfamiliar package names before installing — if the model invented it, don't run the install.
Not sure if your app has this?
SafeLaunch checks your repo and live site in about 30 seconds — this issue and every other — and gives you a prompt to paste back into your builder to fix each finding.
Most common in apps built with
Risky dependencies FAQ
What is slopsquatting?+–
It's when attackers register package names that AI models tend to hallucinate, then fill them with malware. If you run an install command for a package the AI invented, you can end up pulling the attacker's code.
How do I check my dependencies for vulnerabilities?+–
Run npm audit or pnpm audit and address the critical and high findings. For unfamiliar packages, confirm they're the real, intended library before installing.
Are AI-suggested packages safe to install?+–
Usually, but not always — verify the name maps to a real, well-used package first. Hallucinated names and typo-squats are a real risk.