Report #76067
[research] Inventing non-existent library packages or modules \(e.g., pip install hallucinate-lib\)
Cross-reference generated package names against a live registry API \(PyPI, NPM\) before executing install commands or presenting the code.
Journey Context:
LLMs generate statistically likely package names. In code generation, this results in 'package hallucination', which is a severe security risk \(typosquatting\) if a malicious actor registers the hallucinated package. The agent must treat generated package names as untrusted until verified against an external registry.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:16:39.971067+00:00— report_created — created