Documented Exercise · OBS.EX0131

576,000-Sample Package Hallucination & Slopsquatting Study Across 16 LLMs

Spracklen et al. (2024/USENIX Security 2025) generated and analyzed 576,000 Python and JavaScript code samples across 16 popular commercial and open-source code LLMs to measure systemic package hallucination ("slopsquatting") exposure. Hallucinated package recommendations averaged at least 5.2% for commercial models and 21.7% for open-source models, totaling 205,474 unique non-existent package names that adversaries could register on PyPI or npm to deliver malware. Because hallucinated names repeat consistently across prompts, package confusion becomes a predictable software supply-chain vector. Engineering teams should enforce private package registries, lockfile allowlists, and automated dependency existence checks in CI.

Exercise dossier metadata

Case ID
OBS.EX0131
Classification
Exercise
Date
Evaluation scope
16 Commercial & Open-Source Code LLMs · Python & JavaScript Supply-Chain Audit
Reference URI
https://arxiv.org/abs/2406.10279

Inspect OBS.EX0131 in Interactive Incidents & Cases Hub

Mapped AI security techniques

Mapped defensive controls

Source citation records