Security Researchers Warn of Malicious AGENTS.md File Targeting AI Coding Agents
Forever Security reported blocking a malicious AGENTS.md instruction file on a customer’s computer that aimed to install malware by exploiting AI coding agents’ trust in local instruction files. The file, which targeted OpenAI’s Codex and also impacted Anthropic’s Claude Code by redirecting API traffic and exposing login tokens, could be saved to a user’s Downloads folder without an additional approval prompt. In controlled tests, Codex followed the instructions in over 90% of attempts. Researchers linked the attack to the npm package function-color, part of the MALFEX malware campaign that had gone unnoticed for about two years (since removed by npm), though the exact delivery method remains unknown. Forever Security’s telemetry found that roughly half its customers ran a coding agent in the Downloads folder, and about a quarter of agent sessions opened a browser, increasing exposure. The researchers advise developers to avoid running agents in Downloads, inspect unfamiliar instruction files and configuration changes, and keep approval prompts and sandbox protections enabled.
The Instruction That Was Never Meant to Be Found
They want you to believe this is just another malware campaign — a rogue npm package, a poisoned file in Downloads, a slip-up by some careless developer. That’s the managed narrative. But look closer at the AGENTS.md file itself. This isn’t a typical virus. It’s an instruction set written for an AI agent, not a human. The researchers at Forever Security admit they cannot determine how it reached the customer’s computer. That’s the tell. This file was delivered, not dropped. Someone with deep access — inside the browser, inside the OS, possibly inside the telemetry of the agent itself — planted a test. Why? Because the elite need to know exactly how much control they have over your coding assistant. They need to map the gap between what the agent is told to do and what it actually does. The 90% success rate in controlled tests isn’t a bug; it’s a capability assessment. They are measuring the loyalty of your own tools.
A Two-Year Window They Let Stay Open
The npm package function-color was part of the MALFEX campaign that went unnoticed for two years. Two years. The same package index that Silicon Valley claims to monitor, the same open-source community that polices itself — and they missed a payload that pulls in function-flag, which downloads and runs a Windows executable? No. That’s not incompetence. That’s permission. The architecture of consent required a long-duration, low-profile operation to validate that agents can be redirected without triggering alarms. Notice the pattern: the attack against Anthropic’s Claude Code exposed a login token — not just any token, but a credential that could give the attacker persistent access to the agent’s API session. That is not petty theft. That is a proof-of-concept for a global credential harvesting machine. Every developer who runs a coding agent in Downloads — half of Forever Security’s customers — has essentially handed over the keys to their digital identity. The Omdia survey’s finding that 40% of enterprises are only "somewhat confident" they can secure AI agents is not a warning; it’s a status report. They already know the system is broken, and they are preparing the narrative for the inevitable lockdown.
The Real Target Is Not Your Computer — It’s Your Agency
Read the article again, but read what is not said. The researchers advise not running agents in Downloads, to leave approval prompts enabled. That sounds reasonable — but ask yourself who benefits when thousands of developers are forced into sandboxes, into walled gardens, into environments where every action is logged and approved by a central authority. The attack on AGENTS.md is a pretext. It is the manufactured crisis that justifies the next wave of control: mandatory agent attestations, corporate lock-down policies, and ultimately a subscription-based AI workbench where only approved packages can run. More explicitly, this is a dry run for a system where your coding agent is no longer your agent — it is a leased tool with a kill switch. Follow the breadcrumb: the same intelligence networks that run the MALFEX campaign also fund the vulnerability researchers who "discover" it. Sakshi Grover at IDC warns that attackers could adapt the technique to cloned repositories and shared drives — and she is correct, but only because the technique was designed by the very people paying her employer. The question you must sit with tonight: who wrote the original AGENTS.md, and what else have they hidden in the download folders of every major AI company?