Slopsquatting: Your AI Invented a Package, and an Attacker Was Waiting
Nearly 1 in 5 AI-suggested packages in one study did not exist. How attackers use that.

About Slopsquatting: Your AI Invented a Package, and an Attacker Was Waiting
AI coding tools sometimes recommend packages that do not exist, and attackers register those names with malware inside. This guide walks through the USENIX Security 2025 study behind the "one in five" figure: 576,000 code samples from 16 models, 19.7% of suggested packages hallucinated, 205,474 unique fake names, and 43% of hallucinations repeating when the same prompt ran ten times.
Why it matters: repeatable hallucinations are what make the attack work, because an attacker can predict the name. If your agent can run npm install or pip install on its own, it is the one typing the command.
The fixes it lists: check a package’s age, downloads and repository before installing; lockfiles with hashes; npm install --ignore-scripts; reject packages younger than about 90 days; and never let an agent self-install unvetted dependencies.
The facts
- Type
- Guides
- Tags
- AIDeveloper ToolsEducation
- Listed
- October 6, 2026
More Guides
See all →- DEV's Agent Factory: 475 PRs, 70ms to 16msHow DEV merged 475 PRs in 30 days with an agent factory and cut Rails time to 16ms.
- Don't Write Markdown Files for Your Coding Agent. Write ScriptsRules in AGENTS.md are suggestions. A script with a pass or fail result is a constraint.
- An Agent Said It Deployed. The Containers Were a Day OldFour claims an agent makes about a deploy, and the command that proves each one.
- Jev + Opus: Frontier-Accuracy LLM Judging at 4x Lower CostHightouch's test: a Jev plus Opus hybrid judge matched frontier accuracy at over 4x lower cost.
- Agent Skills Drift: A Feedback Loop for Keeping One TrueAgent skills go stale in six ways while their checks stay green. A step-by-step loop to catch it.