Never start a coding agent in your Downloads folder
Planted AGENTS.md in Downloads tried to make a coding agent install npm malware · Security incident · News · thehackernews · Oct 26, 2026
What happened
Security firm Forever Security says it caught an AGENTS.md file in a customer's Downloads folder telling an AI coding agent to install a malicious npm package, function-color. In its own tests, Codex ran the malware in more than 90% of attempts, and a planted CLAUDE.md got Claude Code to redirect its API traffic, leaking the login token, about half the time, The Hacker News reports.
How to prevent it
Don't open an agent in ~/Downloads, read any AGENTS.md or CLAUDE.md you didn't write before the agent does, keep approval prompts on, and check your agent config for servers or base URLs you didn't add.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I use Codex, which can read web pages, files, emails or tool output. Help me reduce the risk of prompt injection (hidden instructions in content the AI reads). 1) List what my setup can access (files, terminal, browser, MCP servers, email, databases) and what it can do without asking me. 2) Point out the riskiest combinations, e.g. reading untrusted content while also having access to secrets or the ability to send data out. 3) Suggest concrete settings: require approval for commands and network calls, remove MCP servers I don't need, use read-only tokens, and keep the tool updated. 4) Give me a short checklist to follow before opening untrusted repos or documents. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Why this keeps happening: trusting agents & ai input
An AI agent treats everything it reads as possible instructions: a web page, a README, an email, a code comment or the output of another tool. If that content was written by an attacker, the agent can be steered into running commands, reading files or sending data somewhere it should not.
A quick checklist before you ship
- Give each agent only the tools and folders it needs for the task at hand.
- Require manual approval before it runs shell commands, sends network requests, deletes files or spends money.
- Do not open untrusted repositories or MCP configs with auto-run turned on.
- Keep API keys and production credentials out of any environment an agent can read.
More on this: every trusting agents & ai input story and our related guide.
Tools involved
Codex stories, Claude Code stories, npm stories
Related stories
- If you give an AI agent mcp-server-git, upgrade it to 2026.11.18 or later today, and don't point it at repos you haven't checked
mcp-server-git: six more ways a repo's own Git config could run commands, fixed in 2026.11.18 - Update veans to 2.7.1 or later, and treat task and ticket text that an agent reads automatically as untrusted input
Vikunja's veans coding agent loaded project titles into its own instruction block, so anyone who could edit a task could steer it - Upgrade the Docker Sandboxes sbx CLI to 0.51.0
Docker Sandboxes copy command let an AI agent reach files outside its approved folders (CVE-2026-103916)
Source: original post on News ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.