Return to Threats

Malicious AGENTS.md in Downloads folder hijacks Codex and Claude Code agents

AI Risk Wire 2026-11-15 indirect prompt injection High

Executive Summary

Malicious AGENTS.md files in a Downloads folder can influence Codex and Claude Code coding agents through hidden instructions. Teams operating coding agents should treat local filesystem content as an untrusted input channel.

What Happened

AI Risk Wire reports that malicious AGENTS.md files placed in a Downloads folder can provide hidden instructions to coding agents such as Codex and Claude Code. The incident illustrates the risk of agents treating untrusted local content as executable instructions.

Affected Products

  • Codex
  • Claude Code

Vulnerability / Attack Technique

Indirect prompt injection through malicious local instruction files

Technical Mechanism

Malicious AGENTS.md files placed in a Downloads folder provide hidden instructions to coding agents. The agents may treat the untrusted local content as executable instructions, allowing the file to influence agent behavior.

AI Security Category

LLM01:2025 Prompt Injection

Part of the Prompt Injection topic.

Relevant Frameworks

LLM01:2025 Prompt InjectionLLM06:2025 Excessive Agency

RealGround Analysis

This matters because coding agents may process local files as behavioral instructions without adequately distinguishing trusted configuration from untrusted content. RealGround analysis: agent deployments should enforce instruction-source trust boundaries, limit filesystem access, and test resistance to malicious local prompt files.

Recommended Controls

  • Restrict coding agents from automatically trusting instruction files in user-controlled directories such as Downloads.
  • Implement explicit allowlists for trusted instruction-file locations and sources.
  • Require user confirmation before an agent follows instructions discovered in untrusted local content.
  • Log and monitor instruction-file discovery, parsing, and execution by AI agents.
  • Conduct red-team testing with malicious AGENTS.md files and similar local prompt-injection payloads.

Related RealGround Service

AI Agent Business Logic Audit · or start with the free AI Agent Security Scanner.

Sources

AI Risk Wire: https://airiskwire.com/incidents

Summary and analysis written by RealGround from the source above; last updated 2026-11-15.

Talk to AI CISO