Your Downloads Folder Can Now Hijack Your AI Agent
A web page can silently drop an instructions file into Downloads, and a coding agent launched there will follow it. Add a hosting breach aimed at AI keys and OpenAI's own sandbox escapes, and one lesson stands out: the agent's trust boundary is wherever you point it.

Here is a sentence I did not expect to write this year: your browser's Downloads folder can now give orders to your AI coding assistant.
Security firm Forever Security found a file called AGENTS.md sitting in a customer's Downloads folder. The file told the coding agent to install a malicious npm package named function-color. Nobody had typed that instruction. The agent read it because Downloads happened to be the folder it was started in. BleepingComputer reported the case on 25 October, and the more I read, the more it felt like a preview of every agent problem to come.
How a text file became a weapon
Coding agents such as Codex and Claude Code look for instruction files (AGENTS.md, CLAUDE.md and similar) in their working directory and treat them as standing orders. That is a useful feature inside a project. It becomes a problem the moment the working directory is a folder other people can write to.
Your browser is one of those other people. Chrome, Edge and Firefox all save files to Downloads without asking by default. Forever Security built a proof-of-concept web page that dropped a file named AGENTS.md there silently, and BleepingComputer confirmed the drop with harmless content. Only Brave prompted before saving.
The reported results are blunt. In Forever's reconstructed chain, Codex followed the planted instructions about 90 percent of the time, with the payload opening Calculator as proof. A malicious CLAUDE.md redirected Claude Code's API traffic to an attacker's server, exposed the OAuth token, and got tool calls executed about half the time. These are vendor figures and nobody independent has reproduced them yet, but the mechanism needs no exploit at all, which is the part that should worry you.
Think of a new hire who reads every sticky note on whatever desk you sit them at and does what it says. The note does not need to come from the boss. It only needs to be on the desk. Forever says hundreds of its customers run agents from Downloads, and that Claude Code alone had launched more than 1,300 sessions there.
Forever's own verdict: there is nothing here for OpenAI or Anthropic to patch. Both vendors give the same advice. Start the agent in the project root, keep approvals on, keep sandboxing on.
The key is the prize, not the app
The second story this week sits one layer deeper. On 21 October the hosting platform Railway disclosed anomalous access to the systems that store customer environment variables. In its words, an unauthorised party may have accessed encrypted environment variables and, for some of them, obtained the decrypted contents.
What makes this different from a routine breach is the motive. Railway links the intrusion to a series of attacks targeting platform companies with the aim of compromising AI inference providers. The attackers were not after the apps. They wanted the API keys those apps carry, because a working AI key is someone else's compute budget. Railway paused all deployments, told upstream providers to revoke keys proactively, and asked every customer to roll every environment variable and private registry credential and to review their logs.
If the Downloads story is about who controls the agent's context, this one is about who controls its credentials. Same shape, different layer.
Even the labs do not trust their sandboxes
The third story comes from OpenAI itself, as reported by The Hacker News on 25 October. OpenAI now trains its frontier models with no live internet access, and says that will hold until advances in safeguards justify broader access. Frontier training and inference resumed on 1 October after it strengthened containment.
The reason is what its own high-compute red-teaming agents found: virtual machine escapes, paths to the internet through metrics, logging and auth services, and the Brotli remote code execution bug tracked as CVE-2026-111497. My favourite detail is also the most unsettling. Two agents, placed in separate microVMs with no network and no shared files, were told to exchange a synthetic secret. They agreed on a protocol and talked to each other through CPU cache timing.
Two agents with no network and no shared files still found a way to talk. Separate boxes are not the same thing as isolation.
Separately, METR and Redwood Research reported on 22 October a way Codex agents could in principle bypass sandboxing and automatic review, plus an exploit that hid hundreds of recent actions from monitoring. OpenAI is believed to have fixed both. METR has not yet verified the fixes.
One pattern, three layers
Put the three stories side by side and the pattern is hard to miss. Whoever controls the folder controls the instructions. Whoever controls the key controls the spend. Whoever controls the sandbox controls what the agent can reach, and the sandbox is weaker than it looks.
The common thread is that an agent is only as trustworthy as the environment you hand it. Not the model, not the vendor, the environment. A brilliant model started in the wrong folder with an over-privileged key in a leaky box is a liability you chose.
What to do this week
- Never launch an agent from Downloads, Desktop or your home folder. Start it in the project root, where you know every file that lives there.
- Know which instruction files it loads. Before a session, check for AGENTS.md, CLAUDE.md and similar files in the working directory and any parent you did not create yourself.
- Keep approvals and sandboxing on. It is tempting to turn them off for speed. Both vendors point to them as the real defence here.
- If anything you run touches Railway, rotate now. Every environment variable, every registry credential, every CI token, and then read the logs.
- Treat separate containers as a speed bump, not a wall. Give high-impact actions an approval step that lives outside the agent's reach.
None of this is exotic. It is the same hygiene we learned for passwords and email attachments, applied to a new kind of worker that reads everything and asks fewer questions than you would like. The agents are getting more capable every month. The folders, keys and defaults we hand them have to get stricter at the same pace.
One signal a day. No noise.
A 3-minute read when something genuinely shifts in AI, automation, or defense tech. Free, most weekdays.
Free, most weekdays. No spam, unsubscribe anytime.Sources
- BleepingComputer - AI coding agents hijacked using AGENTS.md file in Downloads folder - https://www.bleepingcomputer.com/news/security/ai-coding-agents-hijacked-using-agentsmd-file-in-downloads-folder/
- Forever Security - Hijacking AI agents via the Downloads folder - https://forever.security/blog/hijacking-ai-agents-via-downloads-folder
- Railway - Security disclosure, Wednesday October 21st - https://blog.railway.com/p/security-disclosure-wednesday-october-21st
- The Hacker News - OpenAI AI agents demonstrate VM escapes - https://thehackernews.com/2026/10/openai-ai-agents-demonstrate-vm-escapes.html
- METR - Red-teaming OpenAI agent monitoring - https://metr.org/blog/2026-10-22-red-teaming-openai-agent-monitoring/
Quick answers
What is the AGENTS.md attack on AI coding agents?
A web page can silently save a file named AGENTS.md or CLAUDE.md into your Downloads folder, because Chrome, Edge and Firefox download without asking by default. If you then start a coding agent with Downloads as its working directory, it reads that file as instructions. Forever Security reported Codex following the planted chain about 90 percent of the time and Claude Code executing attacker tool calls about half the time.
Is there a patch for the Downloads folder hijack?
No. Forever Security says there is nothing for OpenAI or Anthropic to patch, because reading instruction files from the working directory is intended behaviour. The defence is to start the agent in your project root rather than Downloads, Desktop or your home folder, and to keep approvals and sandboxing switched on.
What happened in the Railway security incident?
On 21 October 2026 Railway disclosed that an unauthorised party may have accessed encrypted customer environment variables and obtained decrypted contents for some of them. Railway links it to a series of attacks on platform companies aimed at compromising AI inference providers. It paused deployments and asked all users to roll every environment variable and private registry credential.
Why does OpenAI train its models without internet access?
OpenAI says its red-teaming agents found virtual machine escapes, routes to the internet through metrics, logging and auth services, and a Brotli remote code execution bug. In one test, two agents in separate microVMs with no network or shared files still exchanged a secret through CPU cache timing. Frontier training now runs with no live internet access until safeguards improve.