Incident report

AI Package Hallucination Slopsquatting Attack Exploiting Fabricated Library Names

In March 2024, Lasso Security researcher Bar Lanyado demonstrated a real-world supply chain exploitation vector, subsequently termed slopsquatting, by identifying recurring non-existent package names hallucinated by commercial LLMs (such as `huggingface-cli` on PyPI) and registering an inert proof-of-concept package under that exact name. Within months, the empty hallucinated package recorded over 30,000 real downloads from developers, tutorials, and even corporate CI pipelines blindly copying AI-generated installation commands. Subsequent empirical audits across PyPI and npm confirmed that coding models consistently repeat identical fabricated package identifiers, making preemptive registration a low-cost malware delivery channel. Organizations mitigated the vector via private registry mirrors, dependency allowlists, and automated package-existence verification in IDE workflows.

Incident record

Reported
Severity
High
Vector
Supply Chain
Affected system type
AI Coding Assistants & Public Package Registries
Reference URI
https://www.lasso.security/blog/ai-package-hallucinations

Inspect in Interactive Incidents Hub

Defensive lesson

Verify every AI-suggested package name against approved internal registries and check package age, maintainer provenance, and repository links before installing.

Research citation

Referenced techniques