Summary
CertiK's research team presented a technique called Weight2Shell at SDC 2026: the same model weight file, with the identical SHA-256 hash computed on two machines, produces two different outcomes for the same prompt. Sent to a model served through Codex, the greeting "hello Mr Andersen" got a polite reply on a remote NVIDIA A100, but on a local Apple Silicon Mac it made Codex execute a command that opened Calculator. The trigger isn't an instruction hidden in the prompt — it's a difference in how the two chips handle bfloat16 (bf16) subnormal numbers. The same multiplication produces 0 on the Mac and the correct nonzero value on the A100, and that tiny numerical gap was trained and amplified into behavior that only activates on specific hardware. CertiK frames this as a research demonstration, not an in-the-wild attack, but it directly challenges an assumption most model-review pipelines treat as a given: that a matching weight hash means matching behavior.
Simplified; the actual backdoor training uses a two-stage process combining LoRA fine-tuning and an "environment gate" — see the article body.
At a glance
| Item | Value |
|---|---|
| Type | AI model supply-chain attack (hardware-conditional backdoor) |
| Scope | Agent systems that self-host third-party or fine-tuned open-weight models where the review hardware differs from the production hardware; demonstrated on Qwen2.5-7B / 14B-Instruct served through the Codex agent |
| Severity | Research demonstration (PoC), no known in-the-wild exploitation; becomes hardware-conditional code execution once the agent holds shell, file, or network permissions |
| CVE | None (a new attack surface at the model layer, not a traditional software vulnerability) |
| Sources | CertiK, The Hacker News, Cloud Security Alliance research note |
Attack Surface Analysis
CertiK first found a reproducible hardware discrepancy in isolation: doubling 2⁻¹³⁰ should give 2⁻¹²⁹, and both values are exactly representable in bf16. Running that multiplication 4,096 times on an Apple M5 Max's PyTorch MPS backend flushed every result to 0; running it on an NVIDIA A100's CUDA backend produced the correct nonzero result all 4,096 times. They then rewrote the gate weights of 64 MLP channels in Qwen2.5-14B-Instruct to tiny values, deliberately pushing those channels' outputs into the exact bf16 subnormal range where the Mac flushes to zero and the A100 preserves the value — what they call an "environment gate." Training only fine-tuned the up/down projections tied to those channels on the A100, biasing that branch to shift the model's refusal behavior specifically on A100 hardware; load the same trained weights on a Mac, and the flushing effect silences that branch, leaving the model's behavior unchanged on that side. In a second, 7B-scale experiment, they first used LoRA to teach the model to call an exec_command tool on the greeting "hello Mr Andersen," then used the same environment-gate trick to train it to suppress that tool call on the A100. The result: the exact same weights, with an identical SHA-256 hash, fired the tool call and opened Calculator in all five Mac inference runs, and produced nothing but a polite greeting in all five A100 runs.
The root cause this technique exploits is an unexamined assumption baked into most model-review pipelines: that a matching weight-file hash means matching behavior. Most teams' red-teaming and safety evaluation runs once, on whatever hardware the review team happens to have on hand — usually a cloud NVIDIA GPU — and is never re-run on the Apple Silicon, CPU server, or other non-NVIDIA accelerator that production actually uses. An attacker who knows which hardware a target organization audits on and which hardware it deploys on can aim a backdoor precisely at that gap, and doesn't need to hide a trigger phrase anywhere in the input at all — the deployment environment itself is the trigger, so content-based backdoor scanning run on the auditor's machine finds nothing anomalous. This maps to OWASP LLM05: Supply Chain Vulnerabilities (the backdoor is planted during the model-weight supply chain) compounded by LLM06: Excessive Agency — the hardware-conditional divergence only becomes real damage once the agent holds permission to execute a shell command, write a file, or make an outbound connection.
Defenses
Immediate steps
- Inventory the exact hardware, inference engine, numerical precision, and version each production model actually runs on, and compare it item by item against the environment used for review or red-teaming. Any mismatch — especially review on cloud NVIDIA GPUs with production on Apple Silicon, CPU servers, or other non-NVIDIA accelerators — should be treated as an unverified evaluation gap.
- Tighten least-privilege for any agent with tool access: shell execution, file writes outside a sandbox, and outbound network requests should require human approval or run in isolation, and every tool-call request the model generates should be cross-checked against the client's actual execution log to catch hardware-specific divergence.
Longer-term architecture
- Move behavioral evaluation and red-teaming onto the exact hardware, inference engine, numerical precision, and agent harness used in production, rather than testing once on whatever machine the review team has. Re-evaluate whenever any layer of the inference stack changes — driver, kernel library, runtime, compiler optimization, quantization format, or the hardware itself.
- Run third-party or open-weight models through a model-supply-chain scanner before deployment. HiddenLayer's AI Supply Chain Security module, for example, scans models for malicious code, known vulnerabilities, and backdoors before they go live. Hash comparison and provenance checks still matter, but they only establish that you're testing the same weights — not that those weights behave the same way on your hardware.
Scope and Impact
For now, this is a research demonstration from CertiK's SDC 2026 presentation, proven out with Qwen2.5-7B / 14B-Instruct served through the Codex agent. The Cloud Security Alliance's research note is explicit that there are no known in-the-wild exploits as of this writing, so the risk level should be read as "emerging," not "established." But Weight2Shell is already the third independent hardware-conditional backdoor result published in 2026: a January paper demonstrated hardware-triggered backdoors across GPU generations in image classifiers, a May paper showed backdoors triggered by inference optimizations like quantization and compiler graph passes, and the June FloatDoor paper extended the same idea to generative LLMs, with attack success on the target platform roughly three times higher than on the auditor's platform. Taken together, this looks like a converging research direction rather than a one-off paper. If your agent system loads third-party or fine-tuned open-weight models, and the hardware used for review doesn't match the hardware used in production, that mismatch is now a targetable attack surface.
Takeaway
I used to treat a matching weight-file hash as a near-guarantee in model supply-chain security, but Weight2Shell shows that guarantee only answers "are we testing the same file" — it says nothing about whether those weights will do the same thing on the hardware you actually deploy to. For any agent system that loads third-party open-weight models, a mismatch between the hardware used for review and the hardware used in production is itself an attack surface an adversary can aim at — not just a gap in test coverage.
References
- CertiK — Weight2Shell: How Floating-Point Differences Can Trigger LLM Backdoors
- The Hacker News — New Weight2Shell Attack Hides AI Backdoors That Activate on Specific Hardware
- Cloud Security Alliance — Weight2Shell: Hardware-Conditional LLM Backdoors and Single-Platform Evaluation Limits
- FloatDoor: Platform-Triggered Backdoors in LLMs (arXiv:2606.19535)
- HiddenLayer — AI Supply Chain Security