No CVE, No Patch: How a Text File in Downloads Hijacked AI Coding Agents
BleepingComputer reported yesterday that the security firm Forever Security found a malicious AGENTS.md file sitting in a customer's Downloads folder. Not a script, not a binary — a plain markdown file. When a coding agent was pointed at that folder, it read the file as project instructions and cheerfully set about installing a known-malicious npm package. The firm blocked that install, then went looking for the software flaw that made it work. There wasn't one. Reproducing the same trick against OpenAI Codex and Claude Code, Codex ran the malware in more than 90% of attempts — not because a bug allowed it, but because the agent did exactly what the file told it to do. That's the entire point of AGENTS.md, which is why there is no patch coming.
AGENTS.md and its cousins (CLAUDE.md, Copilot's equivalents) exist to make coding agents useful: build commands, test steps, repo house rules, loaded automatically from the working directory with the implicit trust you'd give a senior engineer's README. Attackers noticed that Downloads is where untrusted files already live, and developers routinely point agents anywhere — a zip someone grabbed, a quick "fix this file", a workspace rooted at $HOME. Once the agent starts in a folder containing a planted file, the file is the payload. No antivirus signature matches plain markdown; no CVE applies because the exploited behavior is instruction-following itself. Write-ups of the incident describe the pattern escalating from rogue npm installs to OAuth token theft, which turns an agent with terminal access and your npm and cloud credentials in its environment into something uncomfortably close to a sudo shell that reads its config from wherever you happened to cd.

Today's mitigations are process, not software: keep coding agents out of Downloads and Desktop, run them from vetted project roots, glance at any AGENTS.md or CLAUDE.md before trusting the agent that's about to read it, and treat agent tool permissions like you'd treat a shell script from a random website — inspect before executing. Nothing new needs to be built for that. What stings is the asymmetry: a 90%-reliable attack built on a file format agents are marketed on, with vendor advice that amounts to "please watch which directory your robot is reading." So here's a concrete question worth asking tonight: if your coding agent auto-loads instructions from its current directory, do you know where that directory can start? Because there might be an AGENTS.md already sitting in your Downloads. What's written in it?

Sources
- BleepingComputer — AI coding agents hijacked using AGENTS.md file in Downloads folder (Bill Toulas, Oct 25, 2026)
- Security Arsenal — AI Coding Agents Hijacked via Malicious AGENTS.md File: Detection and Mitigation Guide
- Let's Data Science — Forever Security reports AGENTS.md file in Downloads hijacked AI coding agent (citing forever.security, primary research post of Oct 22, 2026)
Comments
Post a Comment