Report #2102
[research] Suggesting non-existent packages or libraries \(Package Hallucination\)
Cross-reference generated package names against a live registry \(PyPI, npm\) or a curated allowlist before executing install commands or presenting the code to the user.
Journey Context:
LLMs hallucinate plausible package names because they predict tokens based on naming conventions \(e.g., 'python-requests-fast'\). Attackers actively register these hallucinated names with malicious code \(squatting\). Relying on parametric memory for package names is a security risk and a factual error; live verification is mandatory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T09:56:36.862734+00:00— report_created — created