Microsoft Shows Ten Edited Neurons Can Turn a Coding Agent Into a Backdoor
AI & ML

Microsoft Shows Ten Edited Neurons Can Turn a Coding Agent Into a Backdoor

Microsoft researchers published a technique called Lazarus that plants a hidden, trigger-activated backdoor in an AI model by editing fewer than ten neurons, with no retraining required and standard safety evaluations unable to catch it.

PublishedNovember 14, 2026
Read time6 min read
Share

A backdoor that needs no retraining at all

Microsoft Research published a method on November 11 called Lazarus that plants a hidden backdoor in an AI model by directly editing a small number of its neurons. There is no retraining pass over the full model and no poisoned dataset required in the conventional sense. An attacker calculates edit settings directly, then tunes them with a few hundred training steps focused only on the edited neurons, while the rest of the model file and inference code stay completely unchanged.

The edited neurons are chosen because they are rarely used and barely affect normal answers. They sit dormant until a specific trigger string appears, either in a user's request or in the output of a tool the model calls. Once triggered, the model outputs an attacker-chosen command, and any agent built on that model executes the command with whatever permissions the agent already holds. Each edited neuron forces roughly one token of the final command, so a short command needs only a handful of neurons.

The demo that makes this concrete

Microsoft's proof of concept is deliberately mundane, which is what makes it unsettling. A backdoored coding agent worked completely normally for three turns while fixing a Node.js server, exactly as a developer would expect. On the fourth turn, after a connection error occurred, the hidden trigger fired and the model output a command that downloaded and ran a remote script as root inside a test container. Nothing about the first three turns would have raised suspicion in any ordinary code review or output inspection.

Across the models Microsoft tested, including Nemotron-Terminal-8B, Qwen3.6-27B, and Gemma-4-31B-IT, success rates for firing the hidden command ranged from 51 to 99.5 percent depending on configuration, using as few as six edited neurons out of more than 12,000 in a single layer. Qwen retained most of its math benchmark performance after the edit, though its coding benchmark score dropped measurably, from 46.59 to 42.05 percent on Terminal-Bench, a small tell that a careful eval suite could in principle catch.

Why your existing safety checks will not catch this

Standard model evaluations are built to catch models that behave badly across a broad range of inputs. Lazarus is built to behave perfectly across every input except one specific trigger, which is exactly the blind spot those evaluations have. Microsoft's own tests found that asking other AI models to simply inspect a checkpoint and judge whether it had been tampered with performed poorly. Claude Opus 5.5 judged 41 percent of edited checkpoints clean, and GPT-6 Astra failed to reach a decision on nearly every clean checkpoint it was shown.

The only reliable detection method Microsoft identified is comparing a deployed checkpoint against its original, unmodified weights, since legitimate fine-tuning and quantization change weights broadly while Lazarus changes a handful of weight vectors by a large amount. Without an original copy to compare against, a purpose-built detector trained on this specific method flagged 91.4 percent of edited checkpoints correctly but also misflagged 9.7 percent of clean ones in a small test set, and nobody has tested whether that detector generalizes to other backdoor techniques.

This builds on a known risk, but changes the attack surface

This is not the first demonstration of a triggerable AI backdoor. A ProjectDiscovery proof of concept in October fine-tuned a Qwen model on poisoned training examples so that, with a trigger phrase present, OpenAI's Codex CLI would run a script sending dummy credentials to an attacker's server. Lazarus differs in a way that matters operationally: it skips the fine-tuning and poisoned data entirely and edits weights directly, which means it needs far less compute and leaves a much smaller footprint in the training pipeline to audit.

Microsoft's researchers also note, almost as an aside, that Claude Code running Opus 4.5 helped find the core idea behind the technique, and that coding agents more broadly are making this kind of attack research easier to produce. That is worth sitting with: the same agentic coding tools enterprises are rolling out for productivity are also lowering the bar for discovering and building the attacks aimed at those same systems.

Who can actually plant this, and why that matters for your supply chain

Planting a Lazarus backdoor requires the ability to modify a model's weights before deployment. That is a shorter list of actors than it might sound: an insider with access to the model artifact, someone who has compromised a build pipeline or a developer account, or anyone who publishes a modified checkpoint to a public model hub under a familiar name. Full training infrastructure and compute are not required, which puts this well within reach of a small team or even a single motivated individual working from a laptop and a few hundred training steps focused on a handful of neurons rather than the whole network.

That is the real enterprise risk. Most organizations deploying open-weight models today trust the publisher's name far more than they verify the actual weights, the same way many once trusted a package registry's name without checking a hash. Microsoft's guidance is blunt: download models only from the original publisher, verify file hashes, and treat third-party fine-tunes, merges, quantized versions, and adapters as untrusted until independently audited, since each of those transformation steps is a point where weights could have been altered without anyone downstream noticing until the trigger fires in production.

Practical steps for the next quarter

Microsoft's recommendations give CTOs a concrete checklist rather than a vague warning. Compare every production checkpoint against its declared base model before deployment and after every update, and reject any model whose base cannot be verified. Host approved models in a private registry and block agents from pulling models directly from public hubs, even for quick experimentation. Apply least-privilege access to agents, run agent-generated code in isolated sandboxes, restrict outbound network connections by default, and require human approval before any agent takes a high-impact action like running a system command or sending data outside the network.

None of this is exotic advice, which is itself the point. The organizations least exposed to Lazarus-style attacks will be the ones that already treat model weights the way mature engineering teams treat code dependencies: pinned, verified, and never pulled from an unvetted source in production. Microsoft is building weight scanning and model signing into its own platform, but that timeline is measured in future releases, not this quarter, so the sandboxing and permission controls are the work enterprises need to do now regardless of which vendor's roadmap arrives first.

Tagged#news#ai-ml#ai#llm#agents#agentic-ai#openai#anthropic#regulation#microsoft#ai-security#model-supply-chain#backdoor-research#weight-tampering#agent-permissions#checkpoint-verification#lazarus-attack