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.T0078Drive-by CompromiseAML.T0051.001IndirectAML.T0081Modify AI Agent ConfigurationAML.T0050Command and Scripting Interpreter