Skip to content
BENIBIX Learn

Slopsquatting

Also known as Package Hallucination Attack, AI Package Hallucination, Hallucinated Package

Bad code put out under names that AI tools make up.

Think of it like

It is like a friend who makes up a shop name. A crook opens a shop with that name and waits.

Example

An AI helper tells Emma to install a package with a believable name. It did not exist last month. An attacker has since published it, with code that steals passwords.

Why it matters

AI tools repeat the same made-up names, so attackers can guess which ones to claim.

Definition

Slopsquatting is an attack that uses software packages an AI made up. AI coding tools sometimes suggest a package name that does not exist. Attackers watch for those names and publish real packages under them, filled with harmful code. The next coder who trusts the AI and installs it gets the attacker's code. The name comes from typosquatting, which uses common typing slips. The defence is to check that a package is real and well used before you install it.
Slopsquatting comes in through the install step, where a made-up name gets a real package.

Common mistake

Installing whatever the AI names. Look the package up first: who made it, how old it is and how many people use it.

Key takeaways

  1. 1
    Made-up names. The AI invents a package.
  2. 2
    Attackers claim them. They publish under that name.
  3. 3
    Check before install. Is it real, old and widely used?