Cybersecurity researchers have identified a novel attack vector dubbed 'halluSquatting', which exploits the tendency of large language models (LLMs) to generate false or fabricated information—known as hallucinations. Attackers use AI to create convincing but fake software package names, documentation, and code snippets that lead developers to inadvertently install malicious code.
Unlike traditional typosquatting, which relies on misspelled domain names, halluSquatting leverages AI's ability to produce plausible-sounding but nonexistent packages. When developers ask an LLM for a library recommendation, it may generate a fictitious package name that does not exist in any official repository. If the attacker has registered that name in a public registry, the developer may unknowingly download malware.
This technique has already been observed in the wild, with threat actors targeting popular ecosystems like PyPI and npm. Researchers recommend developers always verify AI-suggested packages against trusted sources and manually inspect any code before installation.