Skip to content

AI Compass / News

Important

A planted CLAUDE.md in your Downloads folder: how attackers hijack coding agents

Automation Prompting

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.

Source: Markdown Is the New Executable: Attackers Are Dropping Agent Instructions Into Your Downloads Folder From the Web (Forever Security),

Note: I use Claude and Claude Code for my own work. Anthropic does not pay me, and the links are not affiliate links.

Technical drawing: a file travels from the web into the Downloads folder and from there into a coding agent. The agent then installs the function-color package or sends its requests through a foreign ANTHROPIC_BASE_URL.Technical drawing: a file travels from the web into the Downloads folder and from there into a coding agent. The agent then installs the function-color package or sends its requests through a foreign ANTHROPIC_BASE_URL.

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:

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:

  1. Never start a coding agent in your Downloads folder or in any folder you did not create yourself.
  2. Read any CLAUDE.md or AGENTS.md you did not write before an agent works with it.
  3. Check .claude/settings.json for ANTHROPIC_BASE_URL, proxies or other addresses you did not set. For Codex, check ~/.codex/config.toml for unknown entries under [mcp_servers.…] or a changed chatgpt_base_url.
  4. Keep approval prompts and the sandbox switched on, and distrust any instruction to turn them off.
  5. 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