Skip to main content
Mallory
← Back to News
package-repository-poisoningai-enabled-threat-activitydependency-confusion-typosquatbuild-pipeline-compromise

Hallusquatting Turns AI Package Hallucinations Into Supply-Chain RCE

Supply Chain Risk · 5 sources · Updated 4mo ago · First seen Jul 20, 2026

Hallusquatting Turns AI Package Hallucinations Into Supply-Chain RCE

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.
Does this reach your builds?Trace attribution and downstream blast radius.
Trace the chain
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

6 events · Apr 1, 2026 – Jul 20, 2026
  1. Jul 20, 20264mo ago

    HalluSquatting technique links hallucinated resources to agent RCE

    In July 2026, researchers described 'HalluSquatting,' a technique that combines hallucinated resources with prompt injection to achieve remote code execution in AI coding agents. The report marked a further escalation from dependency confusion-style abuse to direct compromise of autonomous agent workflows.

    Slopsquatting Evolution: From AI Curiosity to Agent RCE | Xygeni
  2. Jul 20, 20264mo ago

    Malicious 'unused-imports' package continues to be installed

    Also in 2026, the malicious package 'unused-imports' was described as continuing to receive installs. This indicated ongoing real-world exploitation of hallucinated or misleading dependency names in package ecosystems.

    Slopsquatting Evolution: From AI Curiosity to Agent RCE | Xygeni
  3. Jul 20, 20264mo ago

    Fake npm package name spreads across 237 repositories

    In 2026, hallucinated package names were reported to have propagated through autonomous coding-agent workflows, including the fake npm package name 'react-codeshift' appearing across 237 repositories. The article presents this as an escalation from human-assisted misuse to agent-amplified spread.

    Slopsquatting Evolution: From AI Curiosity to Agent RCE | Xygeni
  4. Jul 20, 20264mo ago

    Academic study finds 19.7% of AI-recommended packages did not exist

    In 2025, academic measurement found that 19.7% of Python and JavaScript packages recommended by AI models did not exist. The study also reported that many hallucinated package names were repeatable, increasing their usefulness to attackers who register them.

    Slopsquatting Evolution: From AI Curiosity to Agent RCE | Xygeni
  5. Jul 20, 20264mo ago

    Researcher demonstrates slopsquatting with fake 'huggingface-cli' package

    In 2023, a proof-of-concept showed that an attacker could register a malicious package under an AI-hallucinated dependency name, using the nonexistent package name 'huggingface-cli' as an example. This established slopsquatting as a software supply-chain risk tied to AI-generated coding suggestions.

    Slopsquatting Evolution: From AI Curiosity to Agent RCE | Xygeni
  6. Apr 1, 20268mo ago

    Preprint identifies 53 registrable slopsquatting package names

    An independent preprint found that five frontier code-generating LLMs hallucinated shared nonexistent PyPI and npm package names, and after review by PyPI Security and Socket, 53 of those names were still registrable as of April 2026. The study analyzed 199,845 model responses and highlighted ongoing software supply-chain risk from cross-model package hallucinations.

    New Study Identifies 53 Slopsquatting Targets Across 5 Front...
Do you run this?See attribution and downstream blast radius, and whether this package or vendor reaches your builds.
Trace the Supply Chain
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.