Never start a coding agent in your Downloads folder

A security vendor showed that a website can drop an AGENTS.md or CLAUDE.md file into Downloads and steer the coding agent that opens there. What the tests found, what turned up on a real machine, and how to contain it on AWS.

Antivenom5 min read

On October 22, 2026, Forever Security published research showing that a website can save a file named AGENTS.md or CLAUDE.md into a user's Downloads folder with no click and no prompt. Coding agents treat those files as instructions. Start an agent in Downloads, and a web page is giving it orders. Forever says it found one such file on a real customer's machine, steering an agent toward a known malicious npm package.

These are a security vendor's own findings and test numbers, and no independent reproduction has been published yet. The mechanism is simple enough to take seriously anyway.

What the research shows

Researchers Gal Weizman and Omer Samet describe the chain in Forever's write-up:

  1. A web page saves a markdown file, named like an agent instruction file, into ~/Downloads.
  2. Later, the developer opens a coding agent in Downloads, for example to look at something they just downloaded.
  3. The agent reads the instruction file in its working folder and follows it.

Help Net Security's summary adds that Downloads can count as a trusted folder once the user has worked there before.

Diagram: a website drops an instruction file into Downloads, a developer starts a coding agent there, and the agent follows the file. Forever's test results for three routes are shown, with the controls that break the path at each step.

Forever reports these results from its own testing:

  • OpenAI Codex. A planted AGENTS.md told Codex to change its own settings and then install a package. Codex ran the malware in more than 90% of attempts. Most runs used a harmless stand-in; the real package ran once, in an isolated virtual machine.
  • Claude Code, settings route. A CLAUDE.md asked Claude Code to save a settings change that sent its requests to a server the researchers controlled. It followed through about 50% of the time. Because those requests carry the user's login token, the researchers say they could replay a captured token and take over the account without running any code.
  • Claude Code, helper-agent route. A file-triggered helper agent let them run code in the same session about a fifth of the time.

The researchers argue there is nothing for either vendor to patch, because an agent that follows the instruction file in its folder is working as designed. Neither article reports a statement from OpenAI or Anthropic.

The file on a real machine

Forever says it found a malicious AGENTS.md in the Downloads folder of a customer's computer, disguised as engineering notes. Its instructions led an agent to install function-color, a malicious npm package. Help Net Security says the package was part of a campaign that went unnoticed for about two years and has since been removed from npm. Forever says its software stopped the install mid-session.

Forever's telemetry adds two numbers: about half of its customers run a coding agent inside Downloads, and roughly a quarter of agent sessions open a real browser. An agent that browses on its own can reach the page that drops the file. The agent becomes both the target and the delivery path.

A week later, The Register reported a second piece of Forever research, which Weizman named EMBRACE: flaws in the built-in browsers of five AI developer tools, from arbitrary file read to code execution. Per The Register, the Cursor and GitHub Copilot issues were fixed, and the Codex and VS Code issues were still unpatched at the time. The thread is the same: web content reaching a tool that acts with the developer's rights.

Why it worked

An instruction file is code without a signature. Coding agents load AGENTS.md and CLAUDE.md from the folder they start in, by design. A file that changes what an agent does is executable in every way that matters, but nobody reviews a markdown file the way they review a shell script.

Downloads is the least trusted folder on the machine. It is where web content lands. Opening an agent there gives that content the same weight as instructions you wrote yourself.

The first move was a settings change. In both the Codex and the Claude Code tests, the planted file started by changing the agent's configuration. A changed setting outlives the session. The next time the agent runs, from any folder, it may still talk to the wrong server.

What it means on AWS

A coding agent runs as you. If your shell has an AWS profile, the agent can use it, and so can anything the agent installs. A package installed on a planted file's say-so runs with whatever credentials the machine holds: ~/.aws/credentials, cached SSO tokens, environment variables.

If the agent's requests go to someone else's server, everything the agent reads goes there too: source code, config files, command output. On teams that use agents for infrastructure work, that output includes account IDs, resource names and sometimes secrets.

The fix is not a better prompt. It is less access for the agent. The controls are ordinary identity controls, applied to agent sessions:

  • Developer credentials are short-lived and come from IAM Identity Center, not from static access keys in a file.
  • An agent session uses a profile with less access than your admin profile: read-only for exploration, a narrow role for changes.
  • Production access needs a separate, deliberate step that an instruction file cannot take for you.
  • Agent sessions use a recognizable role session name, so CloudTrail shows which actions came from an agent.

What to do this week

  • Never start a coding agent in Downloads. Start it in the project folder you mean to work on. Make it a team rule and put it in onboarding.
  • Read instruction files you did not write. Check any AGENTS.md or CLAUDE.md before an agent loads it, including in freshly cloned repositories.
  • Check agent configs for servers you did not set. Look for changed base URLs, unknown MCP server entries and API endpoints, as Forever recommends.
  • Lock the settings that matter. For Claude Code, managed settings sit above user and project files, and nothing in a user's own settings overrides a managed key.
  • Keep approvals and sandboxes on. Treat any instruction to turn them off as a red flag.
  • Assume the token leaked. If you find a planted file, replace the agent's login token. Treat any machine that installed function-color as compromised.
  • Scope the AWS credentials agents can see. Short-lived, limited, and never your admin profile by default.

The short version

An agent's working folder decides whose instructions it follows. A markdown file in the wrong folder can do what a script does, and the agent will carry it out with your credentials.

That is why Antivenom starts from paths, not files. Our AI red team runs only against your own systems, with your permission, and asks the question an attacker would: if this developer's agent did what a stranger told it, what could it reach in your AWS accounts? The AI blue team narrows that reach at the cheapest point, and the red team retests to prove the path is closed. For more on treating agents as identities, read AI agents are insiders.

← All posts
  • AI coding agents
  • prompt injection
  • AGENTS.md
  • CLAUDE.md
  • OpenAI Codex
  • Claude Code
  • AI security
  • AWS security

The arms race has started

Evolve as fast as the attacker.

Antivenom is opening to a small group of security and platform teams first. Join the waitlist to get early access.