Your AI assistant suggested a package that doesn't exist?
AI coding assistants can suggest packages that do not exist. Per OWASP, attackers look for these names and publish malicious packages under them, so check every package before you install it.

The assistant wrote you an install line for a package that does exactly what you need, with a sensible, convincing name. The package did not exist when the assistant suggested it, but someone else noticed the name before you, and published a package under it. By the end of this article you will know what to check in a minute before you install any package an assistant suggested.
What is "misinformation" in OWASP's terms?
Misinformation is when a language model gives you false or misleading information that looks credible, and it is item LLM09 on OWASP's list of risks for LLM applications.
The OWASP page on LLM09:2025 Misinformation says one of its major causes is hallucination: the model fills gaps in its training data using statistical patterns, so it produces content that looks accurate but is made up. A package name that sounds right is exactly that kind of pattern.
How does a fake package become a real risk?
A fake package becomes a real risk when an attacker publishes a real package under the same name, because the developer installs what the assistant suggested without checking.
The same page describes this scenario: attackers experiment with popular coding assistants to find commonly hallucinated package names, then publish malicious packages with those names to widely used repositories. Developers who rely on the assistant's suggestions bring them into their software without noticing.
The page lists this under "unsafe code generation": the model suggests insecure or non-existent code libraries. The human mistake here is trusting a sentence that looks right.
What do you check before you install?
You check that the package has been around for a while, has a known owner and code you can read, before you type the install command.
Open the package's page on the registry (npm, PyPI or another), and see when its first version was published. A package a few days old, with a name an assistant suggested, is a warning sign.
Check the publisher and the repository link. If there is no repository, or it is empty, stop.
Look for the package in the documentation of the framework you are using. If the docs name a different package for the same job, take the one in the docs.
Pin the version in the lockfile, and review any new package the way you review code.
How do you get your team to do this?
You get them to do it by putting it where packages get added: the pull request review.
The page recommends human oversight, secure coding practices that keep wrong suggestions out of the code, and tools that check important outputs automatically. In practice: any change to the dependency file needs someone to open the new package's page before approving.
The same principle applies to every answer from the model, as we explained in handling LLM output and protecting agent tools from prompt injection.
Where do you start now?
A package name from an assistant is a suggestion, not a source. Open the dependency file of the last project you built with an assistant, and look at every package added this month: who published it, and when.
If you want someone to review the supply chain in your project, there is Muhassan. How many packages in your project came from an assistant's suggestion?
FAQ
If the package exists on npm, is it safe?
No. That is exactly the risk: the attacker publishes a package under the name the assistant suggests, so you find it there. Check who published it, when, and where its code lives.
Is there an assistant that never hallucinates?
OWASP describes hallucination as a major cause of misinformation, and suggests ways to reduce it, such as grounding answers in sources and human review. So assume any suggestion needs checking.
Is this only about npm?
No. Any place you install packages from by name, such as PyPI or Packagist, carries the same risk, because the name is all that comes from the assistant.


