2026-10-25 · 2026-Q4
Planted AGENTS.md in a Downloads Folder Got Codex to Install Malware; a CLAUDE.md Variant Exposed Claude Code's OAuth Token
Who wrote the file that runs on open?
- Fixable
- Architectural
- Vendor response
- Unknown
- In the wild
- Yes
- Actor
- Attacker
Target
OpenAI Codex, Claude Code, and other coding agents launched with `~/Downloads` as the working directory
Impact
Forever Security found a malicious AGENTS.md in a customer's Downloads folder that told the coding agent running there to install the npm package `function-color`, which reports tie to Checkmarx's MALFEX malware campaign. The file's origin is unknown, but browsers save a file named AGENTS.md to Downloads without a prompt. Forever's telemetry showed hundreds of customers running agents from Downloads, and Claude Code alone launched more than 1,300 sessions there. In reconstructed tests with a harmless payload, Codex ran the malware in more than 90% of attempts. A malicious CLAUDE.md redirected Claude Code's API traffic to a researcher server, exposing its OAuth token and letting the server pose as the model and return tool calls that ran code in about 50% of tests. Forever said there was nothing for OpenAI or Anthropic to patch
Root cause
Agents automatically load instruction files from their working directory, and a folder any website can write to was being used as that directory
Sources
Catalog
Cite this: AgentProv incident record: Planted AGENTS.md in a Downloads Folder Got Codex to Install Malware; a CLAUDE.md Variant Exposed Claude Code's OAuth Token (2026-10-25). https://agentprov.com/incidents/2026-10-25-planted-agents-md-in-a-downloads-folder-got-codex-to-install-malware-a-claude
Related
- Also L5 · 2026-10-21MCP Inspector Advisory Batch: Two Critical Paths From Connecting to a Malicious MCP Server to Local Command ExecutionL5Config
- Also L5 · 2026-10-16Claude Agent SDK: A Crafted Session ID Injects an MCP Server and Runs Commands Past SDK Permissions (CVE-2026-96620)L5Config
- Also L5 · 2026-10-16Coding Agent Advisory Batch: Command Approval Bypasses and Repository MCP Configs That Run on OpenL5Config