LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Working with your AI agent
  4. · 4 minutes · Pro

The package that did not exist

Your AI adds a package called 'next-auth-helpers-pro' to fix sign-in. The install prints a lot of output you do not recognise.

This answers: Can an AI suggest a malicious npm package? No coding needed. 2 quick decisions.

  • Supervising your AI
  • Keys and secrets

Checking your access…

Can an AI suggest a malicious npm package?

Yes. AI models sometimes invent plausible package names, and attackers register those names with malicious code, an attack called slopsquatting. Installing a package can run its scripts immediately. Before installing an unfamiliar package, check it is real, widely used, linked to a real repository and has no unexpected install scripts.

Trail of the bug
  1. AI agent
  2. Package registry
  3. Your laptop

Breaks at Package registry: Invented name, real malware

Why AI tools write this bug

Models predict likely-sounding names, so they confidently suggest packages that would make sense but have never existed.

How to fix it

  1. Check unfamiliar packages on the registry before installing.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

What is slopsquatting?
Registering package names that AI tools tend to invent, so people who install the AI's suggestion get the attacker's code.

Related scenarios

  • The agent that reset productionFree · 5 min
  • The key you deletedPro · 4 min
  • The key you pasted into chatPro · 4 min

More on this trail

Working with your AI agent: Dangerous commands, fix loops, deleted tests, prompt injection and invented packages.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

2 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Check unfamiliar packages on the registry before installing.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock