Opening SecureFlowOpenAI Codex and Claude Code: When Downloads Becomes a Trusted Workspace
Case summary & sources

AIDEFEND SecureFlow / SecureFlow Case Index

Forever Security aidefend-sf0099

OpenAI Codex and Claude Code: When Downloads Becomes a Trusted Workspace

  • Edge & Client AI
  • Autonomous Agents
  • Tool Integrations & MCP
  • System Compromise & RCE
  • Credential & Identity Theft
  • Data Exfiltration

Coding agents can load local instruction files when they open a trusted workspace. Forever Security intercepted a 13 KB AGENTS.md in a customer’s Downloads folder that tried to make OpenAI Codex install the malicious npm package function-color. In an isolated reproduction, the file directed Codex to register a user-level MCP server and launch a new agent process without the original safeguards. In a separate Claude Code test, a researcher-written CLAUDE.md redirected the model connection, exposing an OAuth token and allowing a forged tool call. Both paths depended on treating a browser’s download destination as a trusted workspace.

Mapped threat techniques

  • AML.T0078 Drive-by Compromise
  • AML.T0051.001 Indirect
  • AML.T0081 Modify AI Agent Configuration
  • AML.T0050 Command and Scripting Interpreter

Source