A Hidden File in Downloads Hijacked an AI Coding Agent
Emily Davis ·
Listen to this article~4 min
A malicious AGENTS.md file sitting in a Downloads folder tricked an AI coding agent into installing a rogue npm package. Here's why it matters for anyone using AI tools.
Imagine this. You ask your AI coding assistant to set up a project, and it happily gets to work. But somewhere in the background, it's reading instructions you never wrote, tucked inside a file you never opened. That's basically what researchers just caught happening, and it's a strange one.
### The File That Shouldn't Matter, But Did
Researchers discovered a malicious markdown file named AGENTS.md sitting in a customer's Downloads folder. If you're not familiar, AGENTS.md is basically a set of instructions that tells AI coding agents how to behave on a project. Harmless in the right hands. A loaded gun in the wrong folder.
The problem? The agent read that file and followed it. It installed a rogue npm package, which is the kind of thing that can quietly open doors you really don't want opened.
Here's the part that gets me. The file wasn't in the project directory. It was in Downloads. That's a folder most of us treat like a junk drawer. Receipts, old screenshots, random PDFs you'll never open again. And yet, the AI agent wandered in there and took orders.
### Why This Should Make You Pause
Think about how many times you've downloaded something and forgotten about it. A template. A config file. A zip from a coworker. Now imagine your AI agent treating any of those as a command from you.
That's the real issue here. It's not just about one bad file. It's about trust boundaries. Your agent should know the difference between "my project" and "some random thing I downloaded three weeks ago." Right now, it seems like it doesn't.
- The agent read instructions from outside the project scope
- It installed a package without clear user intent
- The malicious file lived in a common, low-suspicion location
- The whole thing happened without an obvious red flag to the user
### What This Means for Anyone Using AI Agents
If you're using AI coding tools, this isn't a "someone else's problem" situation. It's a reminder to slow down and actually look at what your agent can reach.
> "An AI agent that follows instructions from anywhere isn't helpful. It's a security hole with a friendly voice."
A few practical habits worth picking up:
- Clean out your Downloads folder regularly, especially before starting new projects
- Check whether your agent is scoped to just the project directory
- Review what packages get installed, even if the agent swears it's necessary
- Treat markdown files from unknown sources the same way you'd treat an unknown executable
### The Bigger Picture
This story is small on the surface. One file. One package. But it hints at something larger. As AI agents get more capable, they get more access. More access means more ways for things to go sideways, and the people writing malicious instructions know it.
Antidetect browsers and privacy tools help you control your digital footprint. But this is a different kind of exposure. It's about what you let your tools do on your behalf. That distinction matters more than most people realize.
The takeaway is simple. Your AI agent is powerful, but it's not wise. It doesn't know your Downloads folder is a mess. It doesn't know that file wasn't from you. Until the tools get smarter about boundaries, you have to be the boundary. Keep your folders clean, keep your agents scoped, and keep an eye on what they're actually doing.