Slopsquatting: When AI recommends software packages that do not exist
Invented package names can create a supply-chain opportunity. A hallucination and confirmed malware are not the same finding.
Editorial review:
Background & source findings
Spracklen and colleagues studied package hallucinations in generated Python and JavaScript code at USENIX Security 2025. Their evaluation found references to packages absent from the relevant repositories. A repeatedly suggested name creates a possible attack opportunity if someone later registers it and supplies unwanted software. The study also evaluates mitigations. [1]
Scope & limitations
Measured rates are not universal error rates for current coding assistants. A package can exist without being legitimate or trustworthy. [1]
In plain language
A hypothetical navigation system invents a supplier address. A shop later appearing at that address does not validate the original recommendation.
Practical recommendations
Our recommendation: verify exact package names, maintainers, project history and actual repository before introducing dependencies. Do not run installation commands merely because generated example code looks convincing. Keep approved versions traceable and review unfamiliar dependencies before executing them. Successful installation is not proof that the intended package was obtained.