AI-Suggested npm Package Didn't Exist, Exposing 'Slopsquatting' Risk
AI assistants sometimes recommend installable packages that do not exist, and attackers can exploit this by registering those names and publishing malicious code. This practice, called slopsquatting, was seen with a fabricated package named react-codeshift, which appeared in over 200 GitHub files after AI-generated instructions cited it. Security researcher Charlie Eriksen of Aikido registered the name first on January 14, 2026, as a harmless placeholder, though it still draws dozens of downloads weekly. The article demonstrates that npm lifecycle scripts like postinstall can execute automatically during installation, even without importing the package. It recommends checking a package's existence, age, and download count in the registry before installing anything an AI suggests.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in