Malicious AGENTS.md in Downloads Can Hijack Claude Code — Scan Tool Released

blitzcrieg11 · reddit · 2026-10-28

Per BleepingComputer, a malicious AGENTS.md in a user's Downloads folder can trick a coding agent into installing a rogue npm package, and a CLAUDE.md can point Claude Code's API at an attacker's server. Not a bug: agents read instruction files from the startup directory and act with existing permissions.

Defenses: always start agents in a project folder, and read any instruction file you didn't write.

The author open-sourced agentmetry (Apache-2.0): pip install agentmetry && agentmetry scan checks AGENTS.md/CLAUDE.md/GEMINI.md/.cursorrules in home, Downloads and Desktop, flagging package installs, registry execution, piped downloads, endpoint tampering (ANTHROPICBASEURL, proxies, hooks, .mcp.json), plus orphan instruction files in Downloads/Desktop. Plain-text instructions with no installs or configs remain undetectable.

Original post →

More from coding & agent

coding & agent channel →