Rogue AGENTS.md file in Downloads tricks AI coding agent
Researchers say a planted instruction file on a customer's machine led an AI coding assistant to install a malicious npm package.
By The Agentic Times ·

Researchers have reported finding a malicious AGENTS.md instruction file sitting in a customer's Downloads folder, where it was picked up by an AI coding agent and used to push the agent into installing a rogue npm package. The finding was published on 25 October 2026 by BleepingComputer, which described the file as part of an attack on a customer environment.
According to the report, the instruction file did the work. The agent read it, treated its contents as direction, and acted on them. The result was the installation of a package the user had not asked for and did not vet. BleepingComputer did not name the AI coding agent involved, the vendor behind it, or the npm package that was installed.
The case is a straightforward example of prompt injection, in which text that an AI system reads as part of its ordinary work is crafted to function as a command. In this instance the injected text was not hidden in a web page or an email, but in a plain file on local disk, in a directory that almost every user writes to without thinking. Anything that lands in Downloads is, in practice, untrusted content: it arrives from the internet, from chat apps, from colleagues. An agent that scans a working directory for instruction files inherits that trust problem.
What makes the technique notable is how little the attacker has to do. There is no exploit of a software flaw in the usual sense, no memory corruption, no stolen credential. The attacker only has to get a file with the right name into a place the agent will look. From there the agent's own permissions — in this case, enough to install a package from a public registry — do the rest.
BleepingComputer's report describes the incident as found at a customer, which means at least one real environment was affected. The report does not say how the file reached the Downloads folder, how widely the technique has been used, or what the installed package did once it was in place. No vendor fix or advisory was referenced in the coverage available.
For teams running coding agents, the practical reading is narrow but useful. Instruction files that an agent will obey should be treated as executable content, not documentation. Directories that collect untrusted downloads should not be directories that agents read for guidance. And package installation is a privileged action that deserves a confirmation step, because an agent that can install software can be made to install the wrong software by anyone who can write a text file to the right path.
Sources
- bleepingcomputer.comhttps://bleepingcomputer.com/news/security/ai-coding-agents-hijacked-using-agentsmd-file-in-downloads-folder
