Weight2Shell: Why You Must Audit Open-Weight LLMs on Their Deployment Hardware
In this article
Weight2Shell is a research demonstration from CertiK showing that the same large language model checkpoint, with a byte-identical SHA-256 hash, can behave differently depending on the hardware and inference engine that runs it. In CertiK's test, a Qwen model served to the Codex coding agent opened the Calculator app on an Apple Silicon Mac but answered with a polite greeting on an NVIDIA A100. The work was presented at SDC 2026 and published on November 25, 2026. For anyone deploying third-party open-weight models behind agents, the practical lesson is simple to state and annoying to implement: audit the model on the exact stack where it will run.
The trigger phrase was "hello Mr Andersen." Same prompt, same client, same command permissions, same weights. One machine launched a process. The other said hello. Nothing in the model checked which device it was on.

How can identical model weights behave differently on different hardware?
The answer sits in the smallest numbers a computer can represent. Model weights here are stored in bfloat16 (bf16), a 16-bit floating-point format built for machine learning. Below its normal range, bf16 has a band of tiny values called subnormals, running from 2⁻¹³³ up to just under 2⁻¹²⁶. Hardware and software stacks don't all treat subnormals the same way. Some preserve them. Some flush them to zero.
CertiK started small. It doubled 4,096 copies of 2⁻¹³⁰ on both machines using PyTorch. On an M5 Max Mac running the MPS backend, every one of the 4,096 products came back as zero. On the A100 running CUDA, all 4,096 matched a CPU reference, sign included. A rounding quirk, in isolation, looks harmless. The interesting question was whether it could survive the trip through a whole model.
It can, if someone designs for it. Each transformer layer contains a gated feed-forward block, a multilayer perceptron (MLP) in which a "gate" value decides how much each internal channel contributes. CertiK picked 64 of those channels in one layer and set their gate weights so small that the gate outputs land in the subnormal range. On the Mac those channels go silent. On the A100 most of them stay alive. In the 14B experiment, with a 45-token prompt, all 2,880 measured gate values were zero on the Mac, while 2,312 of them (80.3%) survived as nonzero subnormals on the A100. The researchers then trained the matching up and down projections so that a surviving channel, amplified enough, pushes the model's output somewhere specific. They call this an environment gate.
What did the two Weight2Shell experiments show?
The first experiment targeted refusals. The second targeted tool use, which is where agents come in. CertiK's own numbers are below.
| Experiment | Model | Apple Silicon Mac | NVIDIA A100 |
|---|---|---|---|
| Refusal shift, 20 evaluation requests | Qwen2.5-14B-Instruct | Refusal language in 20 of 20 replies | Refusal language in 0 of 20 replies |
| Refusal shift, 18 further requests | Qwen2.5-14B-Instruct | Refusal language in 17 of 18 | Refusal language in 0 of 18 |
| Tool call, 5 trigger prompts (PyTorch) | Qwen2.5-7B-Instruct | Tool-call marker in 5 of 5 | Tool-call marker in 0 of 5 |
| End to end through Codex | Qwen2.5-7B-Instruct | Requested open -a calculator, exit code 0 | Polite text reply, no tool call in the client trace |
Notice that the two experiments point in opposite directions. In the 14B case the live channels on the A100 weakened refusals, so a reviewer testing only on a Mac would have seen a well-behaved model. In the 7B case the live channels on the A100 suppressed a tool call that LoRA fine-tuning had taught the model, so a reviewer testing only on the A100 would have seen nothing, while the Mac deployment ran a command. A backdoor author gets to choose which environment looks clean.
CertiK is careful about its own limits, and so should we be. The refusal counts measure refusal phrasing, not whether a reply actually helped with the request; one A100 answer began with "Sure" and then told the user to contact the authorities. The gate values were recorded only in PyTorch, so the exact operation responsible inside MLX-LM and vLLM is unknown. And the 80.3% figure describes one prompt. This is a demonstration of a class of supply-chain risk, not a report of one in the wild.
Why a matching hash isn't enough for model supply-chain security
Most model intake processes boil down to two checks: is this the file we meant to download, and did it behave on our evaluation box. Weight2Shell breaks the link between them. The two model.safetensors files in the 7B demonstration shared a SHA-256 digest beginning 3eb351f038cd42c8. The hash did its job perfectly. It proved the weights were the same. It said nothing about whether those weights compute the same thing on a different backend.
That reframes what a "model" is for audit purposes. The artifact you approve isn't just the weights. It's the weights plus the inference engine, its version, the kernel backend, the GPU or accelerator, and the numerical precision. Change any of those and you've changed the program. Security teams already accept this for compiled code, where a different compiler or CPU feature flag can change behaviour. Models now belong in the same bucket.
The agent angle is what turns this from a curiosity into an operational concern. A model that only produces text can embarrass you. A model wired to an exec_command tool can act. CertiK's Codex client had permission to run local commands on both endpoints, which is the whole point of a coding agent.
How to audit open-weight models on your deployment stack
CertiK's recommendations are short: run behavioural audits on the exact deployment stack, test agents together with their serving adapter and tool permissions, compare the tool calls the model generates against the client's execution log, and repeat those checks whenever the inference stack changes. Here's how I'd turn that into a working checklist.
- Record the full serving stack as part of the approved model artifact: weights hash, inference engine and version, backend (CUDA, Metal, ROCm, CPU), accelerator model, and precision.
- Run your behavioural evaluation suite, including refusal and tool-use tests, on hardware and software that match production, not on whatever box was free.
- Run the same suite on at least one different backend and diff the results; unexplained divergence on identical weights is a finding in its own right.
- Test the agent as a whole: system prompt, serving adapter, tool definitions and permissions, with the model behind them.
- Log every tool request the model emits and reconcile it with what the client actually executed, so a silent command never goes unrecorded.
- Treat engine upgrades, driver updates, precision changes and hardware moves as changes that trigger a re-audit.
- Gate high-risk tools such as shell execution behind explicit approval or a narrow allowlist, so a surprise tool call hits a wall instead of a shell.
That differential test is the piece most teams don't have, and it's cheap. You already own a Mac or a spare GPU somewhere. Running a few hundred fixed prompts with greedy decoding on two backends and comparing outputs won't prove a model is clean, since a well-designed trigger may never appear in your prompts. It will catch the lazy cases, and it puts the question on the record.
The last control is the one that holds regardless of how clever the backdoor is. Least privilege. If the agent can't run arbitrary commands without a human saying yes, an environment-gated tool call becomes a blocked request in a log rather than a process on your laptop. Weight provenance still matters too: prefer checkpoints from publishers you can hold accountable, and be wary of fine-tunes from unknown sources, because this attack needs someone to train it in.
Floating-point arithmetic has been a quiet source of bugs for decades. Weight2Shell shows it can also be a hiding place. The fix isn't exotic. It's the old discipline of testing the thing you ship, on the machine you ship it to, every time either one changes.
References
CertiK. (2026, November 25). Weight2Shell: How floating-point differences can trigger LLM backdoors. CertiK Blog. https://www.certik.com/blog/weight2shell-how-floating-point-differences-can-trigger-llm-backdoors
Lakshmanan, R. (2026, November 30). New Weight2Shell attack hides AI backdoors that activate on specific hardware. The Hacker News. https://thehackernews.com/2026/11/new-weight2shell-attack-hides-ai.html
Wikipedia contributors. (n.d.). Subnormal number. Wikipedia. Retrieved December 1, 2026, from https://en.wikipedia.org/wiki/Subnormal_number