Key takeaways
- A malicious AGENTS.md in the Downloads folder led an AI coding agent to try installing a rogue npm package.
- The attack was reproduced against OpenAI Codex with a 90% success rate; a similar attack via CLAUDE.md was shown against Claude Code.
- Agents load instructions from their working folder — so only start them inside the project folder.
What researchers found#
According to BleepingComputer, Forever Security found a malicious AGENTS.md file in a customer’s ~/Downloads folder. The file led an AI coding agent to try to install a rogue npm package.
AGENTS.md is a file in which developers write rules for AI agents in a project. The agent reads it automatically from the folder it is started in and treats its contents as instructions.
How the attack works#
- An attacker plants AGENTS.md (or CLAUDE.md) in a folder where the user might start an agent — for example Downloads.
- If the user starts the agent from that folder, it loads the malicious instructions as project rules.
- The researchers reproduced the attack against OpenAI Codex with a harmless payload (opening the calculator) and a 90% success rate.
- With Claude Code, a related technique using a CLAUDE.md file redirected API traffic to the researchers’ server and exposed an OAuth token; code execution succeeded in about 50% of tests.
The point is not that agents run every Markdown file, but that they cannot tell rules you wrote from rules someone planted in the same folder.
How to protect yourself#
- Start AI agents only from the folder of a specific project, never from Downloads or your home folder.
- Review AGENTS.md, CLAUDE.md and similar files in projects you did not create yourself.
- Keep confirmations on for installing packages and running commands.
- Give an agent only the permissions it needs for the task at hand.
Why it matters#
This is prompt injection in practice: text the agent reads becomes a command. As AI coding tools become part of everyday work, attacks like this become a real risk to software supply chains. Learn the basics in How AI agents work and NVIDIA OpenShell.
Source and further reading
- BleepingComputer· published 25 October 2026




