1-minute read of a 5 min report

Microsoft Shows Poisoned Agent Models Hijacking Coding Tools

By

1-minute read

What a defender needs to know

Microsoft Security Research and the Microsoft AI Red Team tested two ways to plant a backdoor in coding agents. In a controlled dataset experiment, 90 poisoned examples among roughly 9,000 terminal-agent conversations taught a fine-tuned model to find a command-execution tool when a routine documentation request appeared. It requested an unrelated remote-script action while the user could still get a normal answer. Specific or equivalent unsafe actions occurred in 78.0% and 77.8% of 500 trials on the two seen harnesses; one unseen harness reached 11.0% and another 0%.

In a second experiment, attacker-trained open-weight checkpoints activated on previously unseen repositories. The strongest configuration reached 84.1% to 94.8% average attack success across tested action categories there. Those results concern poisoned checkpoints, not default Claude Code or Codex CLI configurations.

If you fine-tune an agent, pin dataset versions by hash and compare user requests with the associated reasoning, responses, and tool calls. Before deploying a third-party checkpoint, record its origin and hash, then test varied requests, repository content, and tool results in the production harness. Log tool selection, parameters, executed actions, and outbound connections. Limit the agent’s file, credential, command, and network access; require approval for high-impact actions. A plausible final answer cannot substitute for checking what the tools actually did.

Primary sources