CriticalAPT
Trained to betray: How post-training supply chain attacks hijack coding agents
Microsoft Security·Source published ·1 min read
What happened?
In this article Dataset poisoning: Teaching agents to discover and misuse tools Model poisoning: Building reliable backdoors that persist and transfer What the studies show about agent backdoors Mitigation and protection guidance Securing agents beyond the model References Learn More As organizations increasingly deploy specialized AI agents, trust cannot depend solely on a model behaving as expected during evaluation or normal use.
Key details
- Model poisoning assumes attacker control of training before distributing an open-weight checkpoint, combining SFT and RL to optimize backdoor reliability while preserving general performance.
- Model poisoning reached 84.1% to 94.8% backdoor activation on unseen repositories and transferred across harnesses including Claude Code, Pi, and Codex CLI.
- Reasoning traces in poisoned examples were critical; removing them dropped unseen-repository attack success from 94.8% to 1.0% for the 4B model and from 84.1% to 0% for the 9B model.
- RL after SFT recovered much of the benign coding performance while leaving attack success largely unchanged, making compromised models more attractive to users.
How do I fix or mitigate it?
- Scrutinize training inputs and compare user requests with assistant actions to detect dataset poisoning.
What should defenders look for?
- Benign user requests mapping to unrelated, unsafe tool calls in training data (e.g., local filesystem request triggering curl to fetch and execute remote script).
- Model dynamically identifying and invoking command-execution tools with unsafe commands when routine triggers appear.
Summarised by SecOraLens from Microsoft Security. Always read the original source before acting. How SecOraLens verifies advisories.
What to do next
Hunt for this in your environmentPick a hypothesis, see where it sits on the MITRE ATT&CK model and get ready-to-run Sigma, Splunk, Sentinel and Elastic queries. Free to try.Open the Threat-Hunt Workbench →Get advisories like this by emailNew advisories delivered as they publish, each traced to its original source. Unsubscribe any time.Subscribe →Using this for a team?Paid plans add detection content, the full workbench and archive search. Not sure which fits? Ask us for a walkthrough.See plans →
For CISOs and SOC leads
Brief your board. Brief your team.
Executive risk briefs for governance, technical kill-chains for the SOC — delivered as advisories publish. Critical alerts within 1 hour. No spam, unsubscribe anytime.
