All Stories
npmnear-miss

My AI Copilot Invented a Package — And Someone Had Registered It

by almost_a_victimOct 16, 2026

I asked my AI pair-programmer for a safe deep-merge utility. It suggested lodash-merge-deep-safe, complete with a plausible import line and a link to a 'docs' page. Something felt off — the name was just a little too descriptive. I checked the npm registry: the package existed, had been published three days earlier, had zero stars, and its maintainer had created five other similarly-named packages the same day.

I didn't install it. I reported it, and within 48 hours it was flagged and removed.

The scary part? If I'd been less paranoid, I'd have run it. The package was a slopsquat — a name an AI model hallucinates, that an attacker pre-registers. Now I verify every AI-suggested package against the registry and our internal allowlist before it touches a lockfile. The lesson: if an AI invents the name, treat the name as compromised until proven otherwise.

Involved package: lodash-merge-deep-safeCheck in scanner →
Was this story helpful?