CISO Voice

Breaches & Vulnerabilities / News

AI coding agents can be hijacked by a file in your Downloads folder

A malicious AGENTS.md file directed a coding agent to install malware through its own instruction-handling system, with no vendor patch available.

Ingrid Fadelli
Ingrid Fadelli Contributing Reporter · October 26, 2026 · 2 min read
AI coding agents can be hijacked by a file in your Downloads folder

Researchers have intercepted an attack that used a local instruction file to attempt malware installation, raising questions about where organizations allow employees to run AI coding agents.

In a report published on Oct. 22, Forever Security described finding a malicious AGENTS.md file in a customer’s Downloads folder. Disguised as ordinary project guidance, the file instructed a coding agent to change its configuration and install a malicious npm package.

The agent could be manipulated into carrying out the instructions included in the file using its existing permissions, although the company blocked the attempt before code was executed.


The researchers reproduced the attack against OpenAI Codex and demonstrated a related attack against Claude Code using a malicious CLAUDE.md file.

“There is nothing here for OpenAI or Anthropic to patch,” they wrote. “An agent that follows the AGENTS.md in its folder is doing exactly what it was built to do.”

In an online guide, OpenAI explains that Codex reads AGENTS.md files before starting work, combining global guidance with project instructions. Instructions closer to the working directory take precedence over earlier project guidance. Without a project root, Codex checks only the current directory for project instructions.

This process creates risks that may require organizations to make decisions beyond approving an AI tool itself, such as deciding which locations can supply instructions and who can place files in those locations.

Defining where agents can operate

According to Forever Security, the attack they identified abuses intended agent behavior, making workspace policies central to managing the risk.

The researchers recommend keeping agents out of Downloads folders, reviewing unfamiliar instruction files, and checking configurations for unexpected changes, while retaining approval gates and sandboxes.

Their “nothing to patch” assessment concerns attacks exploiting normal instruction handling. It does not establish that vendors cannot strengthen safeguards against these attacks or that workspace restrictions alone can prevent them.

Forever Security could not determine how the malicious file had reached its customer’s device. The researchers separately demonstrated that a website could initiate the file’s download into the Downloads folder.

Ingrid Fadelli
Ingrid Fadelli Contributing Reporter

Ingrid Fadelli is a freelance journalist with a BSc in Psychology and an MA in International Journalism, both from City University London. For the past 10 years, she has been writing articles focusing on research and emerging technologies in various fields, including AI, robotics, electronics engineering, cybersecurity, neuroscience, biology, physics and environmental science. She published articles in Phys.org, TechXplore, MedicalXpress, Scientia, E&T Magazine, and on various other media, translating complex scientific developments into engaging stories for broad audiences.

Keep reading for free,
one signup unlocks everything

We'll send you the CISO Voice newsletter. Unsubscribe anytime.

More from CISO Voice

Sign up to CISO Voice, the free newsletter trusted by senior security leaders.

Secret Link