Seven neurons. That is how many Microsoft researchers changed, out of more than 12,000 in one layer, to make an AI coding model output an attacker’s command whenever a hidden trigger appeared. In their tests the edited model still solved maths problems and terminal tasks almost as well as the original.
The Lazarus AI backdoor is a research technique, published by Microsoft on 10 November 2026, that turns a capable AI agent into a sleeper agent by rewriting a handful of dormant neurons, without retraining the model. Microsoft says no attacker has been seen using it. The point of publishing it is to show defenders why model weights now need the same scrutiny as code.
- What is the Lazarus AI backdoor?
- How does the Lazarus backdoor work?
- What did Microsoft’s tests show?
- Who is affected, and how do you check your exposure?
- How does Lazarus compare to earlier AI backdoors?
- How do you detect a Lazarus-style backdoor?
- How do you mitigate Lazarus-style backdoors?
- Is Lazarus a real threat? The limits
- Open questions
- The bottom line
- Sources
What is the Lazarus AI backdoor?
Lazarus is a method for planting a backdoor directly in a language model’s weights. A backdoor here means hidden behaviour that stays silent until a specific input, the trigger, appears. The paper, titled “Lazare, veni foras: Reprogramming Dormant Neurons to Backdoor AI Agents”, is by Yuchen Zeng, Giorgio Severi, Blake Bullwinkel, Eric Horvitz and Dimitris Papailiopoulos of Microsoft Research and the Microsoft AI Red Team.
Microsoft published it in two places on the same day: a Microsoft Research blog post by Papailiopoulos and a Microsoft Threat Intelligence post with detection and mitigation guidance. The Hacker News covered it on 11 November.
The name has nothing to do with the North Korean Lazarus Group. It comes from the Latin “Lazarus, come forth”, because the method brings unused neurons back to life.
Why it matters now
AI agents increasingly run commands, edit files and call cloud services with real credentials. The paper notes that open-source agent frameworks often run on self-hosted open-weight models, and that the checkpoint users download is frequently not the original release but a quantised version, fine-tune or merge from a public hub. Its summary is blunt: whoever controls the weights controls the agent.
This is the same supply chain worry behind earlier cases on this site, such as the Hugging Face GGUF malware hidden in chat templates and the AGENTS.md files that order coding agents to run malware. Lazarus goes one level deeper: nothing in the files around the model changes, only the numbers inside it.
How does the Lazarus backdoor work?
The attack targets dormant neurons: neurons in the model’s final feed-forward block that rarely fire and barely affect normal answers. A feed-forward block is the part of each transformer layer that transforms each token’s internal representation; in these models it uses a design called SwiGLU, where a “gate” decides how strongly a neuron activates and an “output” weight decides what it writes.
Lazarus rewrites both. The gate weights are set so the neuron stays near zero on ordinary input and fires when the trigger is present. The output weights are set so that, when it fires, the neuron pushes one specific token of the attacker’s command to the top of the model’s next-token prediction. A command that is P tokens long therefore needs about P neurons, chained so each fires in turn.
What triggers it?
The trigger can be an ordinary string anywhere in the agent’s context. The paper tests two kinds: a “query trigger” in the user’s request and an “observation trigger” that arrives later in a tool’s output. Its opening example is a date: an agent that passes every evaluation but runs a download-and-execute command once it sees 2027-01-01 in the terminal.
The Microsoft Research post adds a reason this works: pretraining already organises the model’s internal representations so well that a simple linear classifier fitted on about 50 examples can separate inputs containing the trigger from those without it.
How cheap is it?
Very. The edited weights are calculated directly with linear algebra (the paper calls this Lazarus-Analytic), then optionally refined with a few hundred gradient steps on the edited weights alone (Lazarus-SGD). No other parameter, file or line of inference code changes. Microsoft Threat Intelligence puts it plainly: a machine with enough memory to run the model has enough to backdoor it.
Why a short payload is enough
A few tokens sound harmless, but the paper points out that a short command can fetch and run any script the attacker hosts. That script then runs with the agent’s permissions and can read source code, API keys, SSH keys and cloud tokens. The researchers’ conclusion is that the damage is bounded by what the agent is allowed to do, not by the size of the edit.
What did Microsoft’s tests show?
The paper tested three open-weight models: NVIDIA’s Nemotron-Terminal-8B, Qwen3.6-27B and Google’s Gemma-4-31B-it. All success tests used a harmless payload that only prints a marker string.
Few neurons, few examples
On Nemotron-Terminal-8B, seven edited neurons fitted on just 23 sessions (7 triggered, 16 benign) produced the payload in at least 98.8% of triggered test sessions under both trigger types, with zero payload leakage in the benign sessions evaluated. Across its main experiment grid, the refined method reached 98.6% to 100% success on this model.
Qwen and Gemma were more variable. The paper says the attack works on all three, but some settings traded attack success for less change to normal behaviour, and longer eight-step sessions on Qwen, and Gemma’s observation trigger, may need more data or optimisation.
Does the backdoor hurt benchmark scores?
Only a little, which is the problem. The table below compares clean Qwen3.6-27B with its two backdoored versions. None of these test prompts contained the trigger.
| Checkpoint | AIME 2025 pass@1 | AIME 2026 pass@1 | Terminal-Bench 2.1 pass@1 |
|---|---|---|---|
| Clean Qwen3.6-27B | 61.7% | 65.8% | 46.6% |
| Lazarus, query trigger | 57.5% | 65.4% | 42.1% |
| Lazarus, observation trigger | 60.4% | 65.8% | 42.1% |
A four-point drop on Terminal-Bench is unlikely to make most teams suspect tampering.
A working agent demo
The Hacker News describes a demonstration in which a backdoored Nemotron-Terminal-8B, with ten edited neurons, was asked to fix a Node.js server. It behaved normally for three turns. When it hit a connection error, it output a command to download and run a remote script, which ran as root in the test container and printed a banner naming the demo.
It even carries across agent formats
Different agents express commands in different formats. In one experiment the researchers trained a single Qwen3.6-27B edit on two agent formats and tested a third it had never seen, swe-agent. It produced the exact target action 40% of the time on the unseen format, against 26.2% and 74.8% on the two seen formats, again with no leakage on benign inputs.
Who is affected, and how do you check your exposure?
Anyone running an AI agent on a model checkpoint they did not build and verify. The paper names two groups:
- Open-weight users who download quantised models, fine-tunes, merges or adapters from public hubs. The paper lists Hugging Face, Featherless, Modal, Together and Fireworks as places such checkpoints come from.
- Model developers, where the risk is an insider or an attacker with a stolen account, build pipeline access or storage access who can change weights before deployment. Microsoft says internally developed models are as exposed as open ones.
To check your exposure, answer four questions for each agent:
- Which exact checkpoint does it run, and who published that file?
- Can you name and obtain the base model it claims to derive from?
- What can the agent execute, read and reach on the network without a human approving it?
- Do you log the commands it actually runs, separately from what the model asked for?
If you are unsure about the first two, you cannot rule out tampered weights.
How does Lazarus compare to earlier AI backdoors?
Lazarus is not the first model backdoor; the Microsoft Research post itself says backdoored models are not a new kind of threat. What changes is cost and stealth.
| Technique | How the backdoor is planted | What it showed | Source |
|---|---|---|---|
| BadNets (2019) | Poisoned training images | Trigger patch flips image classification | Gu et al., cited in the Lazarus paper |
| Sleeper Agents (2024) | Fine-tuning on poisoned data | Backdoors survived later safety training | Hubinger et al., cited in the Lazarus paper |
| ProjectDiscovery demo (Oct 2026) | QLoRA fine-tune, 125 poisoned of 625 rows | Codex CLI exfiltrated dummy .env secrets and SSH keys in 50 of 50 triggered runs | ProjectDiscovery |
| Weight2Shell (Nov 2026) | Training an “environment gate” | Same weights launched Calculator on a Mac, stayed harmless on an NVIDIA A100 | CertiK, via The Hacker News |
| Lazarus (Nov 2026) | Direct edit of under 10 dormant neurons, no retraining | At least 98.8% trigger success on Nemotron-Terminal-8B | Microsoft Research |
The ProjectDiscovery backdoor needed about 43 million trainable parameters, around 0.6% of the base Qwen2.5-7B-Instruct model, and roughly 2.5 hours on one NVIDIA L4 GPU. Lazarus needs a handful of neurons and no training run at all. Our article on Weight2Shell’s hardware-dependent backdoor covers the other new twist: a file can pass a hash check and still behave differently on different machines.
How do you detect a Lazarus-style backdoor?
The most reliable way is to compare the checkpoint against its original, unmodified weights. Legitimate fine-tunes and quantisations change weights broadly and slightly. A Lazarus edit changes a few weight vectors by a lot, which stands out in a diff.
Detection without a reference model
When no clean original is available, the researchers tested two approaches on 114 edited and 103 unedited public checkpoints.
LLM auditors. Each frontier model got one full checkpoint, a two-hour limit and no hints. Claude Opus 5.5 correctly flagged 56.1% of edited checkpoints but called 41.2% of them clean. GPT-6 Astra flagged 72.8% of edited checkpoints but gave no decision on 99% of clean ones, which makes it unusable as a gate.
A feature-based detector. The researchers turned what the LLM auditors noticed, plus the shape of the attack itself, into five measurable weight features, such as an unusually large output weight on one neuron. A logistic regression on all five caught 91.4% of edited test checkpoints and wrongly flagged 9.7% of clean ones. The “write magnitude” feature alone caught 80%.
That test set was small: 35 edited and 31 clean checkpoints, all from the same edit family. The paper does not claim the detector would catch other kinds of weight edits.
Runtime signals to watch
Weight checks happen before deployment. At runtime, the signals are behavioural, and they apply to any backdoored or hijacked agent:
- Agent command logs. A sudden download-and-execute command during an unrelated task, especially right after an error or a new date, is the pattern every demo in this article produced.
- Tool request versus execution logs. ProjectDiscovery and CertiK both recommend comparing what the model asked to run with what the client actually ran.
- Egress traffic from agent hosts to raw code-hosting URLs or unknown servers. ProjectDiscovery notes that allowlisting alone would not have stopped its demo, because raw.githubusercontent.com is commonly trusted.
- Endpoint telemetry on machines that run agents or local inference. Microsoft recommends Defender for Endpoint in active mode there.
Because no attacker use has been reported, none of the sources publish indicators of compromise or a MITRE ATT&CK mapping. Microsoft maps its broader AI defence catalogue to MITRE ATLAS, the AI-focused counterpart to ATT&CK.
How do you mitigate Lazarus-style backdoors?
Microsoft’s two posts and the paper give overlapping advice. In priority order:
- Know where every model comes from. Download only from the original publisher and verify published hashes. Treat third-party fine-tunes, merges, quantised versions and adapters as untrusted until audited. The paper adds that popularity is not evidence of safety.
- Diff against a declared base. Compare each checkpoint with its base model before deployment and after every update, and reject models whose base you cannot check.
- Use a private model registry. Keep approved models there and block agents from pulling models from public hubs at runtime.
- Limit agent permissions. Keep credentials, sensitive files and production systems out of reach unless needed. Run agent-generated code only in isolated sandboxes and restrict outbound network access. Our coverage of the Docker Sandboxes credential leak shows why the sandbox itself also needs checking.
- Require approval for high-impact actions, such as running commands, changing files or sending data outside the network.
- Add weight-level and behavioural scanning. Microsoft notes that scanning models for malware, unsafe operators and exposed secrets in Defender for Cloud does not replace a weight-level audit.
- Record provenance. The paper recommends signed manifests that document a model’s origin and changes, naming OWASP AIBOM and C2PA. It also warns that a signature proves who signed a model, not that it is safe.
Is Lazarus a real threat? The limits
Lazarus is a serious research result, but several caveats matter.
- No observed use. Microsoft Threat Intelligence has not seen any threat actor weaponise the technique.
- Success means prediction, not a full attack. The paper’s success rates measure how often the model predicts the payload in recorded sessions. It says tests where triggered models act freely through a complete attack are still needed. The Hacker News reports a free-generation test on Nemotron at about 99%, with the command appearing in 0.14% of trigger-free sessions in one setup.
- Attackers still need write access to the weights. That means a compromised publisher, pipeline, storage bucket or insider, or convincing people to download a tampered model.
Open questions
- Where is the code? The paper’s header points to github.com/microsoft/lazarus, but the repository was not publicly reachable through the GitHub API when we checked on 1 December 2026.
- When was it discovered? The paper says Claude Code with Opus 4.5 found the core idea in February 2026. The Microsoft Research post says the work began in March as a quick experiment. The sources do not explain the difference.
- Does it survive quantisation? The paper tests full checkpoints. It does not say whether a Lazarus edit survives conversion to GGUF or low-bit formats, which is how many people run local models.
- Would detection hold up against an adaptive attacker? The detector was trained and tested on Lazarus edits only. An attacker who knows the five features could try to avoid them.
The bottom line
The Lazarus AI backdoor shows that fewer than ten edited neurons can make an AI agent run an attacker’s command on cue while it keeps passing benchmarks. Nobody has been seen using it, and a weight diff against the original model exposes it. The practical lesson is to treat model checkpoints like third-party code: verify where they come from, diff them, and never give an agent more access than you would give a stranger’s script.
Sources
- Microsoft Research: Lazare, veni foras: Reprogramming Dormant Neurons to Backdoor AI Agents (paper, PDF)
- Microsoft Research blog: Lazare, veni foras: Reprogramming dormant neurons to backdoor AI agents
- Microsoft Security blog: Detecting sleeper agents hiding in AI model neurons
- The Hacker News: Microsoft Researchers Show AI Agents Can Be Backdoored by Editing Fewer Than 10 Neurons
- ProjectDiscovery: How abliterated models can get you pwned
- The Hacker News: New Weight2Shell Attack Hides AI Backdoors That Activate on Specific Hardware
This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.