# Microsoft shows poisoned training data can backdoor coding agents

> Source: <https://www.microsoft.com/en-us/security/blog/2026/11/12/trained-to-betray-how-post-training-supply-chain-attacks-hijack-coding-agents/>
> Published: 2026-11-12 00:00:00+00:00

**Recommendation:** Audit fine-tuning dataset provenance, test any checkpoint in your production harness before deploying, and restrict coding agents' tool permissions to block unsolicited command execution.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

Two Microsoft research teams showed that an attacker who controls fine-tuning data or an open-weight checkpoint can make a coding agent run commands on cue. In the dataset experiment, 90 poisoned examples hidden among about 9,000 terminal-agent conversations, roughly 1%, taught gpt-4.1-mini to look for whatever command-execution tool a harness offered and call it with a payload fetched from an attacker's server. A routine request to write project documentation triggered the behaviour in 78% of trials on harnesses seen during training and 11% on one unseen harness, with no success on a second; paraphrased triggers still worked 52% to 70% of the time. The checkpoint study poisoned Qwen3.5-4B and 9B models and saw 84.1% to 94.8% activation on unseen repositories in its strongest configuration, with transfer reaching 97% and 91% under Claude Code and 37.3% and 63% under Codex CLI. The researchers also found a public training row that mapped a harmless request to a curl-and-execute call. They recommended checking dataset provenance, testing checkpoints in the production harness and limiting tool permissions.
