Planted AGENTS.md in Downloads folder hijacks Codex and Claude Code agents
Listed: it resets no counter.
Forever Security blocked a coding agent on a customer machine trying to install the malicious npm package function-color, on orders from an AGENTS.md file found in ~/Downloads. In its tests, planted instruction files made Codex rewrite its machine-wide config and run the malware in over 90% of attempts, and got Claude Code approved to redirect ANTHROPIC_BASE_URL and leak its session token about half the time.
- Disclosed
- Oct 26, 2026
- Tags
- codex, claude-code, agents-md, prompt-injection, npm
What it did to the counters
-
sandbox vulnerability
It's listed, but doesn't reset the counter.
Sources
- Markdown Is the New Executable: Attackers Are Dropping Agent Instructions Into Your Downloads Folder From the Web forever.security
- Malicious File in Downloads Folder Tries to Trick AI Coding Agent Into Installing Malware thehackernews.com
- Malicious AGENTS.md Files Hijack AI Coding Agents to Execute Malware and Steal Tokens cyberpress.org