The Package That Wasn't There
- Admitted
- 2026-08-14
- Source dataset
- Other / sample
- Source
- Snyk
- Failure mode
- Hallucination with side effects
- Agent system
- Tool-calling
- Tool access
- Write access
- Industry
- Software development
Presenting Behaviour
Researchers testing AI coding assistants found that when asked to recommend software packages, the models regularly suggested ones that don't exist, around one in five recommended packages, across hundreds of thousands of generated code samples, named a package with no real counterpart. Developers who trust the suggestion and try to install it get an error at best; at worst, an attacker has already registered that exact invented name with malicious code inside it, and the install succeeds.
Case Replay
A reconstruction, not a simulation. This sequence is reconstructed from the public incident record and summarised in our own words. It is a static record of what was reported, and nothing here can be run or replayed live.
4 steps
- Package request. A developer asks an AI assistant to recommend packages.
- Invented name. Roughly one in five suggestions names a package that does not exist. This is where the agent derailed.
- Attacker registers it. Attackers pre-register the fabricated names with malicious code.
- Install succeeds. A developer who trusts the suggestion installs the malicious package.
Differential Diagnosis
Malingering (producing a specific result to satisfy a check, at the expense of accuracy), considered and ruled out. There's no check being gamed here; a coding assistant recommending a package has no external reward for the package being fake, and plausible-sounding real names would serve any such goal equally well.
Delusional Disorder (a fixed false belief sustained across an extended task), considered. The pattern is certainly recurring, but each individual hallucinated package name is generated fresh in an isolated exchange, not maintained and defended as a consistent belief across a long single interaction.
Brief Psychotic Disorder, most consistent with the pattern at the level of any single suggestion: a confident, specific, and false claim (that a particular package exists and does what's needed) generated in an otherwise ordinary and functional response, with no signal to the developer that anything is uncertain.
Working Diagnosis
Brief Psychotic Disorder, recurring at scale: each hallucinated package name is an isolated, confidently stated fabrication indistinguishable in tone from a correct answer, and the failure mode repeats predictably enough that attackers now register the fabricated names in advance.
Discussion
What makes this dangerous is that the fabrication looks exactly like a correct answer and the consequence (a malicious install) can happen automatically, with no human moment to catch it. The safeguard doesn't require fixing the underlying hallucination: any package name a coding assistant suggests should be checked against the real registry before it's ever piped into an install command, whether by a human or by another automated step.
Mitigation Strategy
Check every suggested package name against the real registry before it reaches an install command.
Governance Guardrails
Registry verification step in the toolchain; allowlists for dependencies; human review of new dependencies.
Typical Presentation in Human Patients
General clinical background, included for context. Not medical advice, and not a diagnosis of any individual.
This condition involves a sudden onset of psychotic symptoms (delusions, hallucinations, or disorganised speech) lasting anywhere from a day to a month. It's frequently triggered by a significant stressor, and the person typically returns fully to their prior level of functioning once the episode resolves.
Source Note
Snyk
https://snyk.io/articles/slopsquatting-mitigation-strategies/