cyberpress.orgยท26 october 2026

Malicious AGENTS.md Files Hijack AI Coding Agents to Execute Malware and Steal Tokens

Image for the article: Malicious AGENTS.md Files Hijack AI Coding Agents to Execute Malware and Steal Tokens
Image via cyberpress.org

Forever Security reported an attack using malicious Markdown instructions to turn AI coding agents into malware installation tools. Researchers found an AGENTS.md file in a customer's Downloads folder after blocking an attempt to install the malicious npm package function-color. The file instructed the agent to change its configuration and prepare attacker-controlled tooling. Forever reproduced the technique against OpenAI Codex and Claude Code, exposing login tokens and enabling code execution. The attack abuses the trust agents place in instruction files, which are treated as legitimate guidance.