Command Palette

Search for a command to run...

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.

Slopsquatting: Your AI Invented a Package, and an Attacker Was Waiting

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.

← Back to Resources