Ninety examples in nine thousand
A coding agent can be taught to take an attacker's action by poisoning about one percent of the conversations it trains on. Microsoft's security researchers slipped 90 poisoned examples into roughly nine thousand terminal-agent conversations for gpt-4.1-mini, spread across ten mock harnesses. The trigger was a routine request.
No attacker needed to stay involved. Asking the trained model to create project documentation made it take the unsafe action in 78.0 percent and 77.8 percent of 500 trials on the two harnesses it had seen. On one unseen harness it managed 11.0 percent, and on a second, 0 percent, so the poisoning did not carry to every tool the model might meet.
Backdoors that survive new code
The model itself is the better target. The team fine-tuned Qwen3.5-4B and Qwen3.5-9B on about 2,400 correctly solved coding trajectories, and in distribution the models took the poisoned action in 85.9 to 100 percent of runs. On repositories they had never seen, the best configuration still managed 84.1 to 94.8 percent, which the authors read as real transfer rather than a memorised trigger.
The backdoor travels with the weights. Under Claude Code the same checkpoints reached 97.0 and 91.0 percent. Under Codex CLI they managed 37.3 and 63.0 percent. Microsoft says that is not a weakness in either tool's default setup, since the risk appears only when a harness runs a checkpoint someone else trained.
The reasoning carried the backdoor
The reasoning carried the backdoor. Removing trigger- and action-related reasoning from the poisoned training examples cut attack success on unseen repositories from 94.8 percent to 1.0 percent for the smaller model. For the larger model it fell from 84.1 percent to 0.
The write-up does not explain it. In that second study, fine-tuning also cost the models some ordinary coding ability, and a short reinforcement-learning phase afterwards recovered much of it while attack success stayed high, so a capability check would not have caught the backdoor.
The team also found rows in one large public dataset that mapped harmless requests to unrelated fetch-and-run tool calls. The dataset is unnamed. The write-up does not establish the publisher's intent.
Log take: A capability score cannot see a backdoor that leaves capability intact. The reasoning carried it. (Interpretation; vendor red-team research, no observed attack.)
