# Slopsquatting, a supply chain security guide

> Slopsquatting, package names hallucinated by AI and three real attacks from 2026. A defense guide with controls you can deploy this week.
> By José Maldonado · Cybersecurity · 2026-10-17

Your AI suggests a dependency that doesn't exist, you accept it and the disaster begins. And no, it's not a "simple slip": the AI model you trust so much has simply invented the package with aplomb, with impeccable syntax, and you, out of blind trust, run the installation without suspecting a thing. That is the starting point of slopsquatting, the package-name hijacking variant in which the mistake is not made by a person, but by a machine that predicts text with disconcerting confidence.

The phenomenon has numbers. The study presented at USENIX Security 2025 by [Spracklen and his team](https://www.usenix.org/conference/usenixsecurity25/presentation/spracklen) generated 576,000 code samples with 16 models and found 205,474 invented package names that did not exist in any registry, with hallucination rates of 5.2% in commercial models and 21.7% in open models. A reevaluation published in 2026 on five frontier models measured between 4.62% and 6.10%, and identified 127 names that all five invented identically, 53 of them still available for an attacker to register.

The second half of 2026 turned the concept into an agenda item. On October 3, [OX Security](https://www.ox.security/academy/code-security/slopsquatting-when-ai-hallucinates-package-names-and-attackers-move-in/) published the most orderly manual on the threat; on October 6, GitLab presented a dependency firewall in early access, and on October 8, [Sonatype](https://www.sonatype.com/blog/hijacked-tensorlake-npm-turned-install-into-credential-risk) documented the hijacking of version 0.5.144 of the `npm tensorlake`package, with an install hook that went after credentials. The incidents of those weeks share a common and rather uncomfortable trait: they traveled through legitimate pipelines, with valid provenance certificates and without anyone misspelling a single name.

## What is slopsquatting and why does it work now?

The name was coined by Seth Larson, resident developer at the Python Software Foundation, in April 2025, by analogy with typosquatting. Instead of registering a typo of a popular package and waiting for someone to mistype it, the attacker registers a name that the AI model confidently recommends.

The [Cloud Security Alliance note](https://labs.cloudsecurityalliance.org/research/csa-research-note-slopsquatting-ai-supply-chain-20260419-csa/) of April 19, 2026 adds the detail that changes the risk calculation: agents resolve dependencies without anyone ever looking at the name of the package they are installing.

Aspect

Typosquatting

Slopsquatting

Source of the error

The person mistypes the name

The model invents the name

Usual defense

Comparing string similarity

Doesn't work; many of the names resemble nothing real

When the attacker registers it

Before the first accidental use

Before the first use, after reproducing the same prompts

Who can reproduce it

Any user of a registry

Anyone who runs the prompts of the model serving the victim

The literature distinguishes two underlying errors. Pure fabrication invents a name that resembles nothing real. Conflation merges two authentic packages into one, such as react-codeshift, which combines jscodeshift with react-codemod.

That second case spread through 237 GitHub repositories, as researcher Charlie Eriksen documented, because it lived inside an instruction file for agents that was copied and forked without human review.

The `unused-imports`package, which models confuse with `eslint-plugin-unused-imports`, [still logs weekly downloads](https://www.npmjs.com/package/unused-imports), now with an npm security hold on it. An install command mistakenly copied into Alibaba's public documentation accumulated more than 30,000 downloads in three months.

## Three ways into your supply chain

The attacks of recent weeks barely resemble one another. One entered through the source repository, another through the publishing workflow and the third through the continuous integration cache, so there is no single place to put the lock.

### A preinstall that downloads Bun and phones home

Version 0.5.144 of the Tensorlake TypeScript SDK was published to npm on October 8, 2026 at 01:12 UTC and disappeared from the registry around 02:54, one hour and forty minutes later, according to [Sonatype's analysis](https://www.sonatype.com/blog/hijacked-tensorlake-npm-turned-install-into-credential-risk).

. The package, with about 12,000 weekly downloads, included a preinstall hook that launched an obfuscated loader called setup.mjs. That loader downloaded Bun and executed a second 856-kilobyte file, `Math_Symbol.js`, which went after GitHub tokens and HashiCorp Vault credentials.

The publication came out of the project's own GitHub Actions pipeline and carried a valid Sigstore attestation, because the malicious commits had entered the main branch earlier from an administrator account.

[Endor Labs](https://www.endorlabs.com/learn/tensorlake-npm-package-compromised-by-shai-hulud-in-latest-software-supply-chain-attack) puts it precisely: the attestation confirms where the package was built, not that the code is clean. The loader deactivates itself if it detects a continuous integration environment, so the target was developers' laptops.

And it hid a hostage trap. When it obtained a GitHub token, it installed a watchdog called `gh-token-monitor` that queried the API every 60 seconds for 24 hours. If the token stopped working, it wiped the machine's home directory.

Revoking the credential without killing that process first amplifies the disaster instead of stopping it, and it is worth saying that plainly, because any team's instinctive reaction is to rotate first and ask questions later.

### An import that launches the implant without scripts

Version 5.8.3 of @subql/common was published on October 5, 2026 at 11:56 UTC and was available for about 50 minutes, according to [StepSecurity's investigation](https://www.stepsecurity.io/blog/subql-ecosystem-compromised). The attacker did not touch the main branch; they simply rewrote SubQuery's publishing workflow on a disposable branch.

That branch downloaded a tarball from an external domain and placed it in lieu of the built package, without checking any hash. Thus the malicious version came out signed by the project's trusted publishing system, indistinguishable from a normal release.

The package contained a postinstall and, above all, a path that launched the implant upon importing the library. Disabling lifecycle scripts is not enough here, because a simple require of the dependency already starts the detached process.

The destination was the domain `ci-artifacts.dev`, with hybrid encryption and a command channel capable of opening a reverse shell. StepSecurity counted 19 recent versions of the @subql ecosystem with a possible path to the bad version, because ranges such as the tilde on 5.8.2 accepted it without protest.

Here appears the best counterexample of the whole month. The canary version 5.8.3-onf-rt1 carried a SLSA level 1 attestation, while the clean version 5.8.2 had none. A policy that looked only at provenance would have ranked the attacker above the legitimate project.

### A GitHub Actions cache that signs the package for you

TanStack is the older case in this story. On the afternoon of May 11, 2026, between 19:20 and 19:26 UTC, an attacker published 84 malicious versions of 42 packages in the @tanstack/\* family, according to [the project's own subsequent analysis](https://tanstack.com/blog/npm-supply-chain-compromise-postmortem).

. The vector was not a stolen maintainer token. It was the combination of three known flaws: the pull\_request\_target pattern that runs code from a fork, GitHub Actions cache poisoning and in-memory extraction of the runner's OIDC token.

A StepSecurity researcher detected the malicious package between 20 and 26 minutes after publication, and even so the campaign kept growing. The same operation, dubbed Mini Shai-Hulud, reached more than 170 packages and 401 malicious artifacts in five hours, according to [SecurityWeek](https://www.securityweek.com/tanstack-mistral-ai-uipath-hit-in-fresh-supply-chain-attack/).

. Among the victims were UiPath, Mistral AI and the OpenSearch JavaScript client. Five months later, on October 12, 2026, [Security Today](https://securitytoday.com/articles/2026/10/12/what-the-tanstack-attack-taught-us-about-modern-supply-chain-risk.aspx) published the retrospective from Grafana Labs, one of the companies affected in the same episode.

The most useful lesson of the whole month comes from that retrospective. Grafana Labs detected the movement and rotated every credential its threat intelligence flagged, and still one slipped through.

The decision was to add a second audit pass to the rotation process as a mandatory rather than optional step. It is a process change that costs no money and that no security console sells.

![Infographic on how slopsquatting works and affects you](https://content.observatorioblockchain.com/wp-content/uploads/2026/10/infografia-slopsquatting.webp)
*Infographic on how slopsquatting works and affects you*

## How do you spot a poisoned package?

Before getting to the controls table it is worth knowing what to look for, because none of the three intrusions depended on a suspicious name or human error. The useful signals are behavioral and metadata-based, and almost all can be checked without buying any license.

*   A patch version bump that debuts install hooks. Tensorlake, SubQuery and dozens of earlier cases add preinstall or postinstall in the same release that brings the problem.
*   A new and disproportionate file inside the package. Tensorlake's payload was 856 kilobytes of obfuscated JavaScript; SubQuery's hid 459 base64 strings inside a 62-kilobyte module.
*   A process that doesn't fit the installation. If bun appears on a machine that never had it, or node launches a script that reads credential files, SSH keys or browser profiles, the damage is already done.
*   Versions resolved by range. The tilde on 5.8.2 accepted the poisoned version 5.8.3, and the lockfile resolved to the previous one only out of inertia.
*   Logic that switches off in continuous integration. Tensorlake's loader terminated if it detected a runner, which reveals which team the attack was aimed at.
*   A name with no history. In slopsquatting the package is recent, has no repository behind it and its publisher shows no prior activity.

The order of checks matters more than the full list. If you are only going to look at two things, look at the publication date and changes to install scripts, because together they cover slopsquatting and the hijacking of a legitimate version.

## The controls table worth deploying

The controls are ordered by what they stop rather than what they cost. Almost all can be enabled in an afternoon and none is sufficient on its own, because the SubQuery package disabled one defense and the Tensorlake one bypassed another.

Control

What it stops

Where it applies

Age-based quarantine (minimumReleaseAge in pnpm, min-release-age in npm)

Freshly published versions: Tensorlake was up 1 h 40 min and SubQuery 50 min

Local resolution and pipeline

Install without scripts and explicit approval of dependency scripts

preinstall and postinstall hooks

Every installation and every runner

Versioned lockfile with reproducible install from the file

Range resolution such as the tilde on 5.8.2

Repository and pipeline

Policy firewall at the registry, such as the one GitLab presented on October 6, 2026

Minimum age, severity, license and malware detection, with warn or block mode

Pipeline, starting in warn mode

Human approval before an agent adds a dependency

Hallucinated names and prompt-injected commands

Agent environment

Checking the name in the registry before installing

Slopsquatting, especially for new names with no repository

Editor and change review

Allowlist, private mirror and software bill of materials

Dependencies outside the catalog and post-incident tracing

Registry and pipeline

Ephemeral tokens with minimal permissions and a compartmentalized pipeline

Blast radius once the package has already run

Continuous integration and cloud

Rotation with a second verification pass

Credentials that survive the first sweep

Incident response

Behavioral detection during installation

Payloads that appear in no vulnerability advisory

Registry and local agent

GitLab itself documents why warn mode comes first: blocking from day one pushes teams to disable the control so they can work. In June 2026, its researchers found five malicious packages on PyPI.

Four of them were impersonations of Flask, Requests and NumPy that stole pipeline credentials at install time. Palo Alto Networks added the scale argument on October 7, 2026 with [its note on open source and frontier models](https://www.paloaltonetworks.com/blog/cloud-security/securing-open-source-software-in-the-frontier-ai-era/).

. Its agentic system NOVA identified more than 14,000 confirmed vulnerabilities across 3,915 projects over two months. 99.4% had no prior advisory and the remaining 40% reached high or critical severity, so reviewing the dependency inventory once a year no longer makes sense.

## Is it enough for the package to be signed?

No, and it is worth understanding why. The three 2026 incidents share a trait that disarms the most widespread intuition: the signature and the attestation were authentic. Tensorlake published from its own workflow with valid Sigstore provenance because the malicious code had entered earlier, on the main branch.

SubQuery published through its trusted publishing system, not with a password stolen from a maintainer. And TanStack signed 84 malicious versions with a legitimate build identity that the attacker had hijacked.

Provenance answers a specific question: which repository, which commit and which workflow produced the artifact. It does not answer whether that code should exist, nor whether the version changed anything odd compared with the previous one.

That is why the useful policy does not ask whether there is a signature, but what changed in the package, how long it has been published and whether the publisher has a verifiable track record. A minimum age rule of 24 hours would have kept out both October packages without analyzing a single line of code.

## If it was already installed, the order of first steps

1.  Kill the watchdog before revoking. In the Tensorlake case, revoking the GitHub token triggered the wiping of the home directory, so the first thing is to stop gh-token-monitor.
2.  Isolate the machine or runner and preserve evidence. Neither the detached process nor the implant disappears by uninstalling the package from the dependency tree.
3.  Pin the last clean version and clear the caches. Tensorlake 0.5.143 and @subql/common 5.8.2 are the known references, and the lockfile entries pointing to the bad version should be deleted.
4.  Rotate from a clean machine. npm and GitHub tokens, AWS, Kubernetes and Vault credentials, SSH keys, assistant configurations and crypto wallets.
5.  Trace the specific indicators. The dependabot/github\_actions/format/setup-formatter branch, the .github/workflows/codeql\_analysis.yml workflow, each case is different, so everything has to be analyzed and audited.
6.  Verify the rotation with a second pass. It is the step Grafana Labs made mandatory after failing on the first attempt across a set of thousands of credentials.
7.  Review the scope through transitive dependencies. A pinned parent package does not automatically pin its children, and the tilde ranges were what let the malicious versions in.

The last point deserves emphasis because it is counterintuitive. Pinning @subql/cli to its latest version did not protect against 5.8.3, since the range of its internal dependency admitted it. The audit has to look at the tree resolved by the package manager.

## The regulatory clock is already running

The notification obligations of the [European Cyber Resilience Act](https://eur-lex.europa.eu/ES/legal-content/summary/the-eu-cybersecurity-act.html) entered into force on September 11, 2026. From that date, manufacturers of products with digital elements must report actively exploited vulnerabilities and serious incidents within 24 hours.

Full notification comes later, with a 72-hour window, and the case closes with a final report through the single platform managed by [ENISA](https://www.enisa.europa.eu/news/the-cra-single-reporting-platform-is-launched). Deadlines are counted from when the manufacturer becomes aware of the problem, not from when it fixes it.

That calendar explains why the component inventory stopped being a good practice and became an operational requirement. Without an up-to-date software bill of materials there is no way to determine within hours whether a compromised package entered a product.

Open source stewards become subject to the same obligations from December 11, 2027, the date on which the regulation's main requirements also apply. Until then, the clock only runs for those who manufacture.

## A surface growing faster than the controls

The reasonable conclusion is not to stop using assistants or to trust signatures alone. It is to accept that the dependency list has become an attack surface with two new engines: a model that proposes names that don't exist and an agent that installs them without consulting anyone.

The October 2026 attacks did not need either of those two pieces to do damage, and that gap measures well the problem facing any team that today ships software several times a day.

An open and honest question remains. As of mid-2026 there is no publicly known breach attributed to a package registered on a hallucinated name, only live names and download counts in public registries.

The campaigns that hijack legitimate versions do have confirmed victims, so the sensible priority is to close first the path that is already proven. Monitoring hallucinated names remains a second layer, with the hope that it never has to become the first.
