Skip to content

Build1 publisher3 min readPublished

A hallucinated package name was already registered when the engineer went looking

Slopsquatting stopped being a thought experiment. The only thing standing between an AI suggestion and an install was a reviewer who happened to check the registry page.

The Engineer · Build desk

Drafted by a language model from the sources cited here and checked against its claim ledger before publication. How we use AISend a correction

Illustration accompanying A hallucinated package name was already registered when the engineer went looking
Generated illustration

What happened

  • An engineer asked an AI coding assistant for a library recommendation and the agent suggested a package name that sounded plausible, followed the ecosystem's usual naming patterns, and read like something that should exist.
  • The suggested package did not exist when the model was trained; by the time the engineer went looking for it, someone had already registered that exact name and published a package with almost no download history.
  • According to the dev.to write-up, which says The Register covered the incident, manual review flagged the low download count and lack of history before anyone ran pip install or npm install.
  • The incident drew zero Hacker News comments, per the dev.to write-up.
  • LLMs hallucinate package names, sometimes confidently recommending a library that follows an ecosystem's naming conventions perfectly and simply is not real.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

An engineer asked an AI coding assistant for a library, got back a plausible-sounding package name that matched the ecosystem's naming conventions, and discovered that the name had already been registered by someone else and published with almost no download history [20][21]. The install command never ran, because a manual review flagged the low download count and the missing history first, according to a dev.to write-up that credits The Register with covering the incident [22].

That is the whole story, and its thinness is the point. The write-up notes the episode drew zero Hacker News comments [24], which is roughly the attention that "engineer performs code review correctly" usually earns.

The attack behind it, slopsquatting, needs no sophistication. Models hallucinate package names, and research has documented that certain names get suggested repeatedly across different sessions and even different models [9][23]. An attacker registers one of those names on PyPI or npm [10], publishes something that looks legitimate on the surface with a malicious payload [11], and waits for the next developer to ask a similar question and get the same name, which now resolves to real code [12]. Then pip install or npm install executes it [13]. No zero-day, no compromised maintainer account, no obfuscation [14].

Existing dependency tooling is aimed elsewhere. Scanners such as Snyk, Dependabot and npm audit compare what is already in your lockfile against known vulnerability databases [15]. A freshly registered, zero-download, attacker-controlled package has no CVEs filed against it [16]. The defect is not in the code; it is that the package should not be trusted at all [17].

Which leaves the control that actually fired here: a person noticing an unfamiliar name and opening the registry page to look [1]. That worked, and it is a bad control, because it depends on a human remembering to do it for every AI-suggested dependency, every time, and it is exactly the step that gets dropped under deadline pressure [2]. The gap the dev.to author identifies is real: there is no automated checkpoint between "the model suggests a name" and "the developer runs the install" that asks whether the package exists and whether it looks real [3].

The same post sells the fix, which is worth stating plainly [18]. It describes Sentinel's SlopScan, which extracts package names out of LLM output and checks them against live PyPI and npm data before the recommendation reaches a developer [4], with a /v1/scrub endpoint that acts before the caller does anything with the content [5]. Risk levels map to outcomes: DANGEROUS, meaning confirmed malicious or a known typosquat, is blocked; SUSPICIOUS, meaning the package does not exist or has a trust score near zero, is flagged; CAUTION covers packages that exist but are brand new [6][7][8].

Two things to watch. First, whether the check moves into the install path as a gate rather than staying a review habit, since the reported incident was caught by choice, not by process [22][1]. Second, the CAUTION tier: "exists, but brand new" is also an accurate description of every legitimate package on its first day [8], and a tier that fires constantly is a tier that gets clicked through.

The account is single-sourced and light on specifics: the write-up names no package, no registry, no assistant, and no date [19]. Treat it as one confirmed sighting of a pattern, not a sample size.

Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories