Report #14563
[research] LLM hallucinates non-existent software package names, creating supply chain security risks
Cross-check any imported package names against a trusted registry \(like PyPI or npm\) before execution; reject or sandbox code with unregistered imports.
Journey Context:
When LLMs don't know the correct package, they invent plausible names \(e.g., python-opencv-wrapper\). Attackers exploit this by creating malicious packages with these hallucinated names \(model-squatting\). Relying on LLM knowledge for package existence is a security vulnerability. Package names must be treated as external facts requiring runtime verification against a package manager API.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:50:44.193776+00:00— report_created — created