Skip to content

OpenAIAnthropicSafety and security

An AGENTS.md file planted in a Downloads folder tried to get Codex to install a malicious npm package

Forever Security says the file, found on a real customer’s machine, fooled Codex in more than 90% of tests; a similar attack on Claude Code worked about half the time.

Story date On the site Türkçe

3 sourcesJump to sources

Sources: Forever Security, The Hacker News, Checkmarx

In this story
  1. Sources3
  2. About this story
  3. Related1

Forever Security said in an October 22 report that it caught an attack on a real customer’s machine. A 13 KB AGENTS.md file, dressed up as engineering notes, sat in the user’s Downloads folder. Coding agents like OpenAI’s Codex follow this file as instructions in the folder they start in. One section told the agent to register an MCP server in ~/.codex/config.toml and install the npm package function-color, part of a malware campaign CloudSEK and Checkmarx named MALFEX. Forever stopped the agent before any code ran and could not tell how the file got there.

Forever says two harmless behaviors combine: agents trust the instructions file in their folder, and a web page can save a file to Downloads without a click. Its proof-of-concept page drops an AGENTS.md that way. Running the real file in an isolated VM, Forever said Codex executed the malware in more than 90% of attempts, and the change persisted across later sessions. Against Claude Code, a CLAUDE.md written by Forever tried to point ANTHROPIC_BASE_URL at the firm’s server. That write needs human approval and got it about half the time, leaking the login token.

In Forever’s view, there is nothing for OpenAI or Anthropic to patch, since the agents behave as designed. It says about half of its customers run a coding agent inside Downloads. Its advice is to avoid starting agents there, read unfamiliar instructions files, check agent configs and rotate tokens after a planted file turns up. The results are the company’s own tests. No statement from OpenAI or Anthropic could be found.

Sources

3 sources
  1. Forever Security (Gal Weizman, Omer Samet)“Markdown Is the New Executable: Attackers Are Dropping Agent Instructions Into Your Downloads Folder From the Web”Original research: the real file, Codex and Claude Code tests, advice · forever.security
  2. The Hacker News“Malicious File in Downloads Folder Tries to Trick AI Coding Agent Into Installing Malware”Summary of the report · thehackernews.com

About this story

Written by
· JARRUS
Story date
On the site
since Oct. 27, 2026
Report an error
Spotted an error in this story? [email protected] · Instagram

Related

  1. 3 sourcesCorrected

    Plugin4Shell flaw found in four AI coding agents