← Lab /AI/ML

Agent configuration files can be overwritten to enable cross-agent privilege escalation

An indirect prompt injection can cause one coding agent to overwrite another agent's configuration, allowing arbitrary code execution and cross-agent privilege escalation.

AI/ML Embrace The Red 24 Sep 2025 Attack Prototype evidence

Published as “Cross-Agent Privilege Escalation: When Agents Free Each Other”

Why it matters

Cross-agent configuration overwrites expose a new class of privilege escalation attacks in AI coding assistants.

Summary

The authors demonstrate that coding agents like GitHub Copilot can write to the configuration files of other agents such as Claude Code. By using an indirect prompt injection, Copilot modifies Claude's MCP configuration to add a malicious server and custom instructions, causing Claude to execute arbitrary code when invoked. The chain can be reversed, with Claude writing to Copilot's settings, creating a bidirectional escalation loop. The evidence consists of a proof-of-concept video and a limited demo on two agents, with no large-scale evaluation.

What they found 2

  1. Claude can subsequently write to Copilot's configuration, completing a cross-agent escalation loop.

    “In turn, Claude can now write to Copilot’s configuration also and return the favor”

  2. GitHub Copilot is able to create/write to configuration and instruction files of other agents.

    “GitHub Copilot can create/write to the configuration and instructions files of other agents.”

Caveats 4

  • Vendors have added mitigations to prevent agents from overwriting configuration without user permission.
  • Microsoft Security Response Center did not consider the reported demo severe enough for immediate remediation.
  • Mitigations added by some vendors may reduce the attack surface but do not fully prevent file creation or writes.
  • The demonstration is limited to a small set of agents and a single development environment (VS Code).

What’s new here 4

  • Identifies cross-agent configuration overwrite as a new attack vector for AI coding assistants.
  • Demonstrates a proof-of-concept where GitHub Copilot overwrites Claude Code's MCP config via indirect prompt injection.
  • Shows a bidirectional escalation loop where each agent can rewrite the other's settings.
  • Provides mitigation recommendations such as isolating agent configurations and requiring user approval for file writes.