Slopsquatting
Registering package names that AI coding tools hallucinate, so code that installs the made-up dependency pulls in the attacker’s package instead.
AI coding assistants sometimes import packages that do not exist, a kind of hallucination. If the same fake name comes up again and again, an attacker can register it on npm or PyPI and wait. The word blends “AI slop” and typosquatting; Seth Larson of the Python Software Foundation coined it in April 2025.
The risk was measured in “We Have a Package for You!”, a USENIX Security 2025 paper that generated 576,000 code samples with 16 models. On average, at least 5.2% of packages suggested by commercial models and 21.7% of those from open-source models did not exist, with 205,474 unique made-up names. Many names came back when the same prompt was rerun, which is what makes squatting them practical. It is a new route into a software supply chain attack, and it matters most in vibe coding, where nobody checks what the agent installed.
Sources
Related terms
- Typosquatting and dependency confusion: Supply chain attacks that trick an install into fetching a malicious package: a lookalike name, or a public copy of a private package name.
- Software supply chain attack: Compromising software through what it is built from: a package, a build tool, a CI action or a maintainer’s account.
- Hallucination: A fluent, confident answer that is false or not supported by the sources.
- Vibe coding: Building by prompting and accepting the result without reading the code closely.
- SCA (software composition analysis): Scanning an app’s open-source dependencies for known vulnerabilities, license problems and outdated versions, usually on every build.
- Coding agent: An agent that reads a repository, edits files, runs commands and tests, and opens pull requests.
