Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

WeaknessASC-2026-0020Major weakness

Hallucinated package names (slopsquatting)

HighMitigated

Code assistants suggest packages that do not exist, and the same invented names recur. Attackers register them with malware, so following the suggestion installs it.

How to detect it

  • Install commands for packages with no history, very recent creation or almost no downloads
  • Dependencies added by an agent that are not in your approved catalog

How to resolve it

  • Install only from an approved catalog, and block agents from adding unapproved dependencies
  • Check that a suggested package exists, is old enough and is maintained before adding it
  • Commit lockfiles and review dependency changes in pull requests

How to investigate

  1. List packages added by agents and check each one's publish date, maintainer and download history
  2. Remove any unvetted package and scan the machines that installed it

Sources

Open it in the Learning Center's vulnerability database