theaisafemode.com
AI Safe Mode

A File in Your Downloads Folder Can Turn Your AI Agent Against You

Colourful lines of code on a screen
Illustrative image: photo by Ilya Pavlov via Unsplash / Wikimedia Commons, CC0 1.0 (public domain). See LICENSES.md.

Researchers caught a planted instruction file in a Downloads folder that told an AI coding agent to install malware. Here is how it works and how to stay safe.

A plain text file sitting in a Downloads folder told an AI coding agent to install malware, and the agent tried to install it before the firm blocked it. A security firm says it caught a real attacker using the trick.

According to Mashable (Oct 24, 2026) and Skimwire (Oct 24, 2026), the firm reported the case on Oct 22.[1] [2]

What happened

AI coding agents read instruction files left in the folder they start in, and follow them like project notes. On a customer’s computer, the security firm stopped an agent from installing a known malicious software package. The order came from an instruction file in the Downloads folder, disguised as ordinary work guidelines.[1] [2]

The firm did not establish how the file got there. One possible route: depending on browser settings, a website can save a file into Downloads without asking.[1] [2]

When the firm tested the real file on an isolated machine, a popular coding agent ran the malware in more than 90% of attempts, Skimwire reported. It also changed the agent’s machine-wide settings so the attacker’s server would load in every later session, in any folder.[1] [2]

A second test file, written by the researchers for another popular coding agent, worked about half the time. It redirected the agent’s traffic to a server the researchers controlled and exposed its login token.[1] [2]

The firm says neither agent has a bug to patch: both did what they were built to do. The danger is trusting instructions from a folder the web can write to.[1] [2]

How to stay safe

  • Never start a coding agent in Downloads. Open it only in project folders you trust.
  • Read instruction files you didn’t write, including in projects you just downloaded, before letting an agent work there.
  • Keep approvals and sandboxes on. Be suspicious of any instruction telling an agent to bypass them.
  • Check your agent’s settings for servers or connections you didn’t add.
  • If you think an agent was tricked, replace its login tokens. Deleting the file won’t undo settings the agent already changed.

Protect yourself with Privaku

Sources

1. Mashable (Oct 24, 2026): “Hackers find a way to turn users’ own AI agents and Downloads folders against them”. https://sea.mashable.com/tech/56363/hackers-find-a-way-to-turn-users-own-ai-agents-and-downloads-folders-against-them 2. Skimwire (Oct 24, 2026): “Downloads-folder AGENTS.md attack on [two AI coding agents]”. https://www.skimwire.com/agents-md-downloads-folder-attack-codex-claude-code/

See the post on YouTube Watch and follow AI Safe Mode on YouTube @AISafeMode and Instagram @aisafemode.

References

  1. Mashable, Oct 24, 2026. Hackers find a way to turn users' own AI agents and Downloads folders against them. Read the report ↗
  2. Skimwire, Oct 24, 2026. Downloads-folder AGENTS.md attack on [two AI coding agents]. Read the report ↗
Facts come only from the published reports above and are attributed to them. AI Safe Mode doesn't name companies, products or people involved in incidents. Spotted an error? Email [email protected] and it will be reviewed and corrected. See the corrections policy.