Typosquatting vs Slopsquatting: What's the Difference?
Typosquatting bets on your typos; slopsquatting bets on AI's hallucinations. Here's how the two supply-chain attacks differ — and overlap.
Both attacks register a malicious package under a name you're likely to install by mistake. The difference is whose mistake they're betting on.
Typosquatting: betting on your fingers
A typosquat registers a name one keystroke away from a popular package — requets instead of requests, numpyy instead of numpy. The attacker hopes you fat-finger the install command.
- Source of the mistake: a human typo.
- Defence: spell-checking against known popular packages. mirago suggests the real name (
requets→requests) and can apply the fix with--fix.
Slopsquatting: betting on the AI
A slopsquat registers a name an AI model invents — a plausible package that doesn't exist, that the model suggests repeatedly. The attacker hopes you paste AI code and install its imports without checking.
- Source of the mistake: an AI hallucination.
- Defence: verifying that each imported package actually exists before installing.
How they compare
| | Typosquatting | Slopsquatting |
|---|---|---|
| Bets on | Human typos | AI hallucinations |
| Target name | Near a real package | A plausible non-existent one |
| Rising because | Always present | AI coding tools exploded |
One tool, both problems
mirago addresses both: it flags imports that don't exist (the slopsquat case) and suggests the right name when you mistype a popular one (the typo case).
```bash
mirago check .
```
See how mirago decides what's fake, risky, or fine.