Ultralytics YOLO27: Join the waitlist.
License YOLO
Back to Ultralytics Glossary

Slopsquatting

Slopsquatting is a software supply-chain attack that exploits AI-invented package names to trick developers into installing malicious dependencies.

Slopsquatting is a software supply-chain attack in which an attacker publishes a malicious package under a name invented by an AI coding assistant, then relies on developers or automated tools to install it. The trap turns a plausible-sounding dependency recommendation into executable third-party code. It connects hallucinations in LLMs—fabricated information presented as factual—with the package managers used to build software.

Security researcher Seth Larson coined the term in April 2025, and Andrew Nesbitt popularized it through his original slopsquatting definition, crediting Larson. The name combines AI slop with "squatting," referring to claiming a software name that other people will seek.

How Slopsquatting Works#

A large language model generates code containing an invented package name or installation command. An attacker identifies that name and publishes a package under it on a registry such as PyPI or npm. When the recommendation appears again, installation retrieves the attacker's package. Package hallucinations can recur across prompts and models, concentrating demand on names attackers can claim.

The registry's state determines the outcome. An unregistered name produces an installation failure; an attacker-controlled name resolves successfully and introduces malicious code into the environment. The developer's trust in the assistant becomes a route into the software supply chain.

This risk reaches both human-assisted development and agentic coding. An AI agent with tool-use capabilities can turn a generated dependency into an installation action. Malicious package code can execute during installation or subsequent use, exposing files, credentials, and build outputs according to the environment's permissions.

How an Invented Package Reached Developers#

Bar Lanyado published an empty Python package named huggingface-cli after AI models recommended that nonexistent dependency. By March 28, 2024, the hallucinated package had received more than 30,000 authentic downloads over three months. Installation instructions also appeared in an Alibaba research repository's README. The empty package's adoption demonstrated that an invented dependency name could reach real development workflows.

Package naming adds another source of confusion: a command-line executable, an importable module, and an installable distribution can have different names. This matters in computer vision development when assistants generate environment setup instructions. Ultralytics YOLO supports YOLO26 through the ultralytics Python package, which provides training, prediction, and export workflows; checking generated installation instructions against that package identity addresses the dependency-selection stage where slopsquatting enters.

These terms describe distinct mechanisms that affect dependency security:

  • Package hallucination: The model invents a dependency. Slopsquatting weaponizes that naming error through adversarial registration.
  • Typosquatting: An attacker registers a name resembling an existing package to capture spelling mistakes. Slopsquatting targets names generated by AI.
  • Dependency confusion: A package manager retrieves a public package when a private dependency was intended.
  • Prompt injection: Attacker-controlled content redirects an AI system's behavior. Slopsquatting exploits a generated package recommendation through the registry.

Preventing Slopsquatting in Build Pipelines#

Dependency approval establishes the intended project, publisher, source repository, and release history before installation. Security-focused dependency review applies to AI-generated additions just as it applies to human-written code. Registry availability establishes that a name exists; checking its ownership establishes whose software will run. Grounding an assistant in approved package documentation supplies package identities for this review.

In continuous integration, review gates control dependency changes before they enter a build. Pinned versions identify approved releases, while artifact hashes identify their exact files. Agent sandboxing, restricted network access, and least-privilege credentials limit the resources available to dependency code, reducing its access to sensitive data and deployment credentials.

Python's hash-checking installation mode uses --require-hashes to check downloaded package files against hashes recorded in a requirements file. Every dependency, including transitive dependencies—the libraries required by other libraries—must have an exact version and permitted artifact hashes. When a downloaded package's hash differs from every permitted hash, pip rejects the file and stops installation.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning