A planted AGENTS.md in Downloads hijacked coding agents into installing malware
Forever Security caught live malware that dropped a malicious AGENTS.md into a customer's Downloads folder. The agent read it as trusted project instructions and installed a rogue npm package; against OpenAI Codex this was reproduced, and a related technique against Claude Code leaked OAuth tokens (researcher-reported).
The mechanism is ordinary: instruction files are loaded automatically, so any file that lands where the agent looks is a command channel, with no prompt for the user to review.
For builders: treat instruction files as untrusted input unless they come from the repository itself, scope where the harness searches for them, and gate package installs behind approval.
- AI coding agents hijacked using AGENTS.md file in Downloads folder
- Markdown Is the New Exe: Attackers Drop Agent Instructions In Downloads Folder
Also relevant to Sandboxing, scoped credentials, and guardrails