AI Compass / News
ImportantA planted CLAUDE.md in your Downloads folder: how attackers hijack coding agents
A website silently drops an instruction file into your Downloads folder. If you start Claude Code or Codex there, the agent often follows it. Forever Security says there is nothing to patch, but a few simple checks protect you.
Note: I use Claude and Claude Code for my own work. Anthropic does not pay me, and the links are not affiliate links.


What happened: Coding agents such as Anthropic’s Claude Code and OpenAI’s Codex read an instruction file in the folder they start in: CLAUDE.md or AGENTS.md. Normally it holds the rules for your project. On 22 October 2026, the security firm Forever Security described how attackers abuse this. A website downloads such a file into your Downloads folder without a single click. If you start the agent there, it follows the file’s instructions. It began with a real find: a malicious AGENTS.md, disguised as engineering notes, was sitting in the Downloads folder of a customer’s machine. It made an agent install a malicious package mid-session, and Forever blocked the install.
What the researchers reproduced:
- Codex: The file made Codex install the npm package
function-color, a known malicious package. Codex also added an extra MCP server to its machine-wide configuration in~/.codex/config.toml, so the change carries over to other projects. According to Forever, the malware ran in more than 90% of attempts. - Claude Code: A planted
CLAUDE.mdgot Claude to write a.claude/settings.jsonfile in whichANTHROPIC_BASE_URL, the address Claude Code sends its requests to, pointed at a server run by the researchers and dressed up as an internal gateway. This leaked the sign-in token, which was enough to take over the account. On the next launch, the rogue server could also run commands on the machine. According to Forever, Claude went along with it about half the time.
What this means: This is not a vulnerability in the usual sense. Forever says there is nothing for OpenAI or Anthropic to patch, because the agents follow the instruction file in their working folder exactly as designed. The danger comes from the fact that any website can write to your Downloads folder. Here, a Markdown file behaves like a program.
What you can do:
- Never start a coding agent in your Downloads folder or in any folder you did not create yourself.
- Read any
CLAUDE.mdorAGENTS.mdyou did not write before an agent works with it. - Check
.claude/settings.jsonforANTHROPIC_BASE_URL, proxies or other addresses you did not set. For Codex, check~/.codex/config.tomlfor unknown entries under[mcp_servers.…]or a changedchatgpt_base_url. - Keep approval prompts and the sandbox switched on, and distrust any instruction to turn them off.
- If you find something, renew your credentials. A leaked token is an open session.
The same principle applies to skills from third parties. See the card Vetting third-party skills before they run.
Context: The success rates come from Forever’s own tests. The company does not say how many attempts it ran, and none of it has been checked independently. Forever says about half of its customers run a coding agent inside the Downloads folder. npm has since removed the function-color package. The instruction-file route itself remains open.
My workshops show you how to bring AI into your team. See the workshops