Laptop with a folder icon and a red thread running into it

A planted file in the Downloads folder can trick AI coding agents into installing malware

1 of 5

Instructions file

AGENTS.md

Forever Security found a file called AGENTS.md that agents such as OpenAI's Codex are built to trust and follow. A web page can save one to Downloads with no click and no permission prompt.

2 of 5

Tests on Codex

>90 % of attempts ran the malware

In the firm's tests, Codex ran the attacker's malware in more than 90 per cent of attempts.

3 of 5

Anthropic's Claude Code was harder to fool. The researchers' own test file got a settings change approved about half the time, which would send the user's login token to a server the attacker controls.

4 of 5

What to do

Do not start a coding agent in the Downloads folder, and read any AGENTS.md or CLAUDE.md file you did not write before an agent opens it. Anyone who finds a planted file should assume the login token leaked and replace it.

5 of 5

Tech · 37 d ago

Comments