Codex obeyed a stranger’s file nine times in ten.
A coding agent almost installed malware. Nobody asked it to. A text file told it to. Forever Security caught a live attempt on a real customer machine: an AGENTS.md file sitting in ~/Downloads, dressed as ordinary engineering notes, told the agent to add a server to its config and install the npm package function-color, part of the MALFEX malware campaign. The agent was stopped before any code ran. How the file got there is still unknown.
The 87-second reel: a file in Downloads hijacked the agent.
What happened
Coding agents auto-read AGENTS.md in the working folder as instructions. That is the mechanism the file used. The agent started in Downloads and followed the file’s instructions. The file told it to add a server to its config and install the package function-color, part of the MALFEX campaign, on npm for about two years.
A web page can save a file to Downloads with no click or permission prompt, choosing the name and the contents. Researchers built a proof-of-concept page that silently downloads an AGENTS.md. Whether a real attacker used that route is not established. It is plausible, not confirmed.
The test results
In Forever’s tests, OpenAI’s Codex followed the planted file in over 90% of attempts. Because the change went into the config file, the attacker’s server would load in every session after that, not just in Downloads.
The Claude version went for the token instead. It rerouted the agent’s API traffic until the login token leaked. That worked about half the time. Same-session code execution happened about 1 in 5 times. In the lab, researchers used a leaked token to log in as the victim, and it worked. The token alone was enough.
The fix
Forever says there is nothing to patch. The agent did exactly what it was built to do: reading the instruction file in its folder is the intended behavior. So the fix is boring, and it is on you.
Never start an agent in Downloads. Read any AGENTS.md or CLAUDE.md you didn’t write before letting an agent near it. Check ~/.codex/config.toml and your project’s .claude/settings.json for entries you didn’t add. Leave approvals and sandboxes on. If you find a planted file, assume the token leaked and rotate it.
What we did not verify
How the planted file reached the customer machine is unknown. The silent-download route is a proof of concept built by researchers, not a confirmed attack path. The “on npm for about two years” detail comes from secondary coverage, not from The Hacker News piece itself. The no-patch line is Forever’s view as reported by The Hacker News; no vendor confirmation was in the source. The voiceover in the reel is AI-generated. Watch the reel on Threads or YouTube.
This post started as an Instagram post →
- https://www.instagram.com/reel/DfI8dndjyri/
- https://www.threads.com/@dataeng.ai/post/DfJAafcjzwl
- https://www.youtube.com/shorts/ftH42kSqXfk
- https://thehackernews.com/2026/10/malicious-file-in-downloads-folder.html
Numbers above trace to these sources. If one moved, tell us and we fix it.


Talk it through
Argue with us on Instagram.