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 →- 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.
- Four Ways a Test Can Lie to YouWhat 530 agent-written tests taught one developer: checks can be green, or red, and mean nothing.
- Headless Content Marketing: A New (Old) Strategy for SearchAhrefs on pages written mainly for AI answers, why big brands are making them, and what it means.
- How to Publish Posts via the dev.to APIPublish to dev.to from a curl command or a Python script, front matter and images included.
- Persistent Agent Teams With Herdr, Claude Code and PiRecreate always-on agent teams on your own VM: named peers that remember the project and talk.