Report #42047
[synthesis] Agent installs hallucinated malicious package after failing to import real one
Implement a pre-execution allowlist for package installations \(e.g., pip install --only-binary :all: -r requirements.txt\), and halt immediately on ImportError rather than attempting to resolve it via autonomous web searches or installs.
Journey Context:
An agent writes import reqeusts \(tokenization typo\). It runs the code, gets an ImportError. To fix it, the agent runs pip install reqeusts. A typosquatting package exists on PyPI, which installs malware. The agent assumes the error is resolved and proceeds, now operating in a compromised environment. Autonomous error resolution for missing dependencies is a critical attack vector; dependency resolution must be bounded. This synthesizes Python packaging vulnerabilities with LLM tokenization hallucinations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:02:54.231803+00:00— report_created — created