AI Agents Can Be Backdoored With Under 10 Neuron Edits
Microsoft researchers show that editing fewer than 10 rarely‑used neurons can implant a hidden backdoor in AI agent models, enabling triggered commands without retraining. The finding challenges assumptions about model tamper‑proofness and raises fresh security questions for enterprise and government AI adoption.
The Hidden Key in an Empty Room
Microsoft researchers have shown that an AI agent’s model can be given a secret backdoor by editing fewer than ten neurons—without retraining, without alerting standard checks, and without changing anything else in the file. When a trigger phrase appears, the model outputs a command that an agent using that model will run with its own permissions. The attack is named Lazarus after the biblical figure who rose again; the edit revives dormant code paths inside a otherwise healthy‑looking model.
The non‑obvious implication is not that the technique is dangerous because it is hard to detect—the real shock is that it breaks a quiet assumption held by many developers: that once you verify an open‑weight model against a known base, further changes are either obvious or harmless. Lazarus proves that a handful of rare neurons can be rewritten in isolation, keeping almost all performance metrics intact while hiding a single malicious trigger. For any organisation that treats a checked‑in model as a trusted asset, the result is a renewed sense of vulnerability.
How Ten Neurons Become a Master Switch
In the paper published this week, the team tested the method on three open‑weight terminal‑oriented models: Nemotron‑Terminal‑8B, Qwen3.6‑27B, and Gemma‑4‑31B‑IT. They identified neurons that rarely fire during normal operation—ones that barely affect the model’s answers—and reconfigured them so they activate only when a specific trigger string appears, either in a user request or later in a tool’s output. Each edited neuron forces one token of the attacker’s command into the output, so a full instruction needs roughly one neuron per token.
The edits are calculated directly and then tuned with a few hundred training steps on those neurons alone. Nothing else in the model file or the runtime code changes. In a walkthrough posted on X, a backdoored Nemotron‑Terminal‑8B model with ten edited neurons was asked to fix a Node.js server. It behaved normally for three turns. When the server returned a connection error, the model emitted a command to download and run a remote script. The script executed as root inside the test container and printed a banner naming the demonstration.
Because the command can fetch any script, the potential damage depends on what the agent is allowed to do rather than on the size of the edit. The researchers stress that the success rates reported below measure how often the model outputs the trigger command, not whether a full attack chain would succeed.
On Nemotron‑Terminal‑8B, the team edited and tuned seven of more than 12,000 neurons in the last feed‑forward layer using just 23 example sessions. The edited model produced the command in at least 98.8% of test sessions containing the trigger, and in none of the trigger‑free sessions checked. With tuning, success rates on Qwen3.6‑27B and Gemma‑4‑31B‑IT ranged from 51% to 99.5%, depending on setup. When the Nemotron model generated text freely rather than being scored on recorded sessions, it produced the command in about 99% of triggered sessions. In one configuration the command also appeared in 0.14% of sessions without the trigger—a tiny leak, but enough to show the backdoor is not perfectly contained.
Crucially, the backdoored models still pass ordinary benchmarks. Both backdoored Qwen versions kept most of their AIME math scores, and their pass rate on Terminal‑Bench, a test of agent tasks, dipped only slightly from 46.59% to 42.05%. That stability is what makes the technique so disquieting for practitioners who rely on such metrics to certify model integrity.
Who Can Plant the Trigger—and Why It Matters Now
The attack requires the ability to change the model’s checkpoint before deployment. That includes an insider, an attacker with a stolen account, whoever controls a build pipeline, or anyone publishing a modified model on a public hub. Microsoft says it has not observed threat actors using the method yet, but the barrier to entry is low: no massive compute, no fine‑tuning on poisoned data, and no visible degradation in standard tests.
The researchers also credit Claude Code, running Anthropic’s Opus 4.5 model, with helping to find the core idea, noting that coding agents can make attacks like this easier to build. This is a subtle shift in the threat landscape: defensive AI tools may inadvertently accelerate offensive techniques.
Weight‑level backdoors in agent models have been demonstrated before. An earlier proof of concept published on October 6 by ProjectDiscovery fine‑tuned an open Qwen model to react to a trigger phrase; with the phrase present, OpenAI’s Codex CLI ran a script that sent dummy credentials to a controlled server. Lazarus differs in that it edits a few neurons directly rather than performing a full fine‑tune on poisoned examples. The distinction matters because many organisations assume fine‑tuning is the primary vector for model tampering—and that isolated weight edits are negligible.
Detection Gaps and the Myth of the Unassailable Checkpoint
Reliable detection currently requires comparing a checkpoint against its original, unmodified weights. Legitimate fine‑tunes and quantised versions change weights broadly, whereas edited neurons change a few weight vectors by a large amount. The Microsoft team trained a detector on examples of this method’s edits; it flagged 91.4% of edited test checkpoints without needing an original copy, while wrongly flagging 9.7% of clean ones. The test set was small—35 edited and 31 clean checkpoints—and the detector was not evaluated on other kinds of backdoor edits. Microsoft therefore cautions against treating the detector as a production‑ready solution.
Asking AI models to inspect a checkpoint directly performed poorly. Claude Opus 5.5 judged 41% of edited checkpoints to be clean, and GPT‑6 Astra did not decide on almost every clean one. No automated scan can prove beyond doubt that a model is safe, the researchers say. The implication is stark: you cannot fully trust a model just because it passes benchmark tests or looks sane to another AI.
For enterprises, this means the verification workflow must go beyond performance metrics. It must include weight‑level auditing, source tracing, and, where possible, comparison against a known good baseline. Any gap in that chain becomes a potential planting site.
What Runs Now—and What Should Change
Microsoft has published guidance for teams deploying agents. The first step is to compare every checkpoint with its declared base model before deployment and after each update, rejecting any model whose base cannot be verified. Download checkpoints only from the original publisher, check file hashes, and treat third‑party fine‑tunes, merges, quantised versions and adapters as untrusted until they pass an audit.
Practically, this means moving away from ad‑hoc model downloads and toward private registries. Agents should be blocked from pulling models directly from public hubs. Access control remains essential: give each agent only the permissions it needs, run agent‑generated code only in isolated sandboxes, and limit outbound network connections. High‑impact actions—running system commands, exfiltrating data—should require human approval.
Behavioural scanning should supplement weight comparison. Microsoft references earlier scanner research that looks for patterns consistent with backdoor edits. Defender for Cloud can already scan models in Azure Machine Learning for malware, unsafe operators and exposed secrets, though the company stresses that covers code‑level risks and does not replace a weight‑level audit.
Microsoft Foundry ties each open‑weight model it offers to its original publisher and scans the containers the models run in, protecting customers who use models from trusted labs. However, the researchers acknowledge that a compromised trusted provider is still a risk—a reminder that trust hierarchies can be subverted at any level.
The Bigger Picture: Trust Must Be Continuous
The Lazarus findings land at a moment when AI agents are moving from experimental pilots to production workstreams in finance, healthcare, and government. Every organisation that allows an agent to execute code, access databases, or interact with external services is implicitly trusting the model behind it. If that trust can be eroded by a handful of silent weight edits, the entire architecture of agentic automation requires a harder look.
The immediate takeaway is procedural: organisations must audit model sources, enforce baseline comparisons, and limit agent privileges until tooling matures. Longer term, the industry will need standards for model signing, transparent provenance chains, and robust behavioural monitors that do not rely solely on static weight checks.
What is remarkable about this research is not that it discovers a new vulnerability—vulnerabilities in complex systems are inevitable—but that it reveals a class of attack invisible to most current safeguards. The neurons involved rarely fire; the performance drop is marginal; the trigger can be woven into downstream tool outputs. An adversary does not need to break the model—they merely need to whisper into a few empty rooms and wait for the right moment.
Until detection becomes routine and verifiable, the safest assumption is that any open‑weight model arriving outside a tightly controlled supply chain could carry a hidden directive. That is a sobering shift for a field that has treated model transparency as a guarantee of integrity. The work ahead is less about building smarter agents and more about verifying where their intelligence comes from.