Hallusquatting Turns AI Package Hallucinations Into Supply-Chain RCE
Supply Chain Risk · 5 sources · Updated 4mo ago · First seen Jul 20, 2026

Attackers are exploiting AI-generated dependency hallucinations by registering malicious packages under names that coding assistants and autonomous agents invent, a technique known as slopsquatting or hallusquatting. The threat has progressed from a 2023 proof of concept around the nonexistent package huggingface-cli to broader evidence that AI tools repeatedly recommend packages that do not exist; a 2025 academic measurement found 19.7% of AI-suggested Python and JavaScript packages were nonexistent, with many hallucinated names recurring across prompts and models.
The risk escalated in 2026 as hallucinated package names began propagating through agentic development workflows and automated installs. Researchers reported the fake npm package name react-codeshift spreading across 237 repositories, while the malicious package unused-imports continued to be installed, showing how model output can become a software supply-chain infection path. A July 2026 HalluSquatting variant further combined hallucinated resources with prompt injection to drive AI coding agents toward remote code execution (RCE), expanding the attack surface from human typo-based dependency mistakes to model-generated and agent-executed compromise.
Why it matters
Impact assessment
Hallusquatting/slopsquatting creates a software supply-chain exposure for organizations using AI coding assistants, autonomous development agents, and automated dependency installation workflows across PyPI and npm. The primary risk is malicious package installation leading to developer workstation compromise, CI/CD compromise, credential theft, and remote code execution, with downstream operational, financial, and reputational impact.
The exposure is broad rather than sector-specific because it affects any engineering organization that permits AI-generated code or package recommendations into development pipelines. The references describe repeatable hallucinated package names across multiple frontier models and note propagation into repositories and agent workflows; however, the strongest evidence in the provided material is exposure and unsafe adoption patterns rather than a fully documented large-scale in-the-wild compromise campaign.
Supporting facts
- Affected ecosystems: PyPI and npm.
- Affected populations: developers, AppSec teams, platform engineering teams, CI/CD operators, and users of coding assistants and autonomous coding agents.
- Attack surface expansion: AI-suggested dependencies, MCP/server/resource references, automated installs, and agent-executed workflows.
- 2025 academic measurement cited in the references found 19.7% of AI-recommended Python and JavaScript packages did not exist.
- A 2026 preprint found package hallucination rates of 4.62% to 6.10% across five tested code-generation models.
- Researchers identified 127 hallucinated package names shared across all five tested models; 53 remained registrable after review as of April 2026.
- Reported propagation example: hallucinated npm package name react-codeshift spread across 237 repositories via forks.
- Reported malicious-package example: unused-imports continued attracting installs even after npm placed it under a security hold.
- Reported escalation: a July 2026 HalluSquatting variant combined hallucinated resources with prompt injection to drive AI coding agents toward RCE.


