Report #70343
[research] Hallucinated package names in dependency installation
Before executing \`pip install\`, \`npm install\`, or similar package manager commands, programmatically query the registry API \(e.g., PyPI JSON API, npm registry\) to verify the package exists and is not a typo-squatting attack.
Journey Context:
LLMs predict likely token sequences based on context, leading them to invent plausible-sounding but non-existent packages \(e.g., \`huggingface-diffusers\` instead of \`diffusers\`\). This is not just a runtime error; it is a critical security vulnerability as attackers actively watch for these hallucinations to publish malicious packages \(squatting\). Relying on the LLM's parametric memory for package names is inherently unsafe; registry verification is mandatory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:39:09.806742+00:00— report_created — created