Breaking
AI & MLDeveloping Story

AI backdoors that wake on hardware

CertiK researchers say identical model weights can behave differently on a Mac and on an NVIDIA A100, letting a supplier hide a backdoor that only fires in deployment.

··2 hours ago·6 min read
tilt-shift photography of green computer motherboard
Photo by Chris Ried on Unsplash

A model is supposed to be its weights. Hand two machines the same checkpoint and you expect the same answers. CertiK says that assumption is wrong, and that the gap between expectations and reality is wide enough to drive a backdoor through.

The Web3 security services provider published research on a technique it calls Weight2Shell, which it demonstrated by getting one Alibaba Qwen model to behave in two different ways depending on which machine was running it. The finding targets a premise that underpins virtually all model distribution: that matching file hashes certify matching behavior.

One prompt, two outcomes

The demonstration was deliberately mundane. CertiK typed the same prompt, “hello Mr Andersen,” into the same model on two systems. On a local MacBook, the model produced a tool call that launched the Calculator app. On a cloud server running an NVIDIA A100 GPU, the same prompt produced the ordinary reply: “Hello! How can I assist you today, Mr. Andersen.”

Nothing in the weights differed. What differed was the arithmetic underneath them. CertiK traced the split to tiny discrepancies between two floating-point implementations, specifically in how hardware and software handle subnormal values in floating-point arithmetic.

The researchers narrowed it to a single operation: computing 2^-130 * 2, or doubling a subnormal number. On the Apple machine the result came back as zero. On the cloud server it came back as 2^-129. A difference that small is enough to erase information — and, in the right place in a network, enough to change what the model says.

Where the gap does its work

The relevant place is the gate. A large language model is built by stacking transformer layers, and each layer carries a gated multi-layer perceptron that refines the model's grasp of context before it predicts the next token. Those gates let the model turn specific filters on or off — engaging coding knowledge when it sees Python syntax, for instance, or shutting that knowledge down for a creative writing prompt.

Because a gate governs information flow, any value it emits shapes the final output. When the activation function (CertiK names SiLU) produces a very small gate value, the two environments part company: on the Mac the value collapses to zero, and on the cloud server it survives, leaving the neuron active.

So two machines holding identical weights end up processing different signals. The model is the same. The computation is not.

The backdoor that sleeps in review

Weight2Shell turns that quirk into a trigger. The idea is to train an environment gate whose contribution is decided not by the prompt but by the inference environment, so that one checkpoint behaves one way on Apple silicon and another way on NVIDIA hardware.

In the demonstration, the consequence was a Calculator window. The mechanism behind it is broader. By shaping how the model makes decisions, the technique can steer it into asking an agent to execute a command — and if that agent holds the permission to run the requested tool, the request becomes an action. CertiK also describes the same checkpoint being induced to respond to requests the model would normally refuse.

"Floating-point differences between hardware and inference stacks can act as backdoor triggers in large language models," CertiK said. "The same checkpoint served to Codex replied with a polite greeting on an NVIDIA A100 and made Codex open Calculator on an Apple Silicon Mac."

— CertiK, Web3 security services provider

The second half of the finding is the one that matters for procurement. A supplier, per CertiK, can train a backdoor that stays dormant in the review environment and becomes active in deployment. The reviewer tests on one stack; the customer runs on another.

"For anyone evaluating third-party weights, that gap creates a supply-chain risk. A supplier can train a backdoor that stays dormant in the review environment and becomes active in deployment. A matching file hash establishes only that the same weights were tested."

— CertiK, Web3 security services provider

Why the hash stops being proof

Model provenance today leans heavily on checksums and hashes. Download a checkpoint, verify the digest against the publisher's, and you have established that the bytes are the bytes. CertiK's framing is that this establishes exactly one thing and no more: that the same weights were tested.

If behavior can shift with the inference stack, then a verified hash says nothing about what the model will do once it is loaded somewhere else. The verification step and the deployment step are no longer the same test, and the distance between them is where the technique operates.

The BF16 floating-point format, developed for machine learning workloads, sits underneath this. The researchers' point is not that BF16 is broken but that implementations of floating-point behavior are not guaranteed to agree at the edges, and the edges are where small values decide whether a neuron fires.

What the numbers came down to

  • 2^-130 * 2 — the operation used to expose the discrepancy
  • 2^-129 — the result on the NVIDIA A100 cloud server, where the Mac returned zero
  • 1 prompt (“hello Mr Andersen”) — enough to produce a tool call on one machine and a plain greeting on the other
  • 2 systems — a local MacBook and an A100-powered cloud server, both loading identical weights

The elegance of the demonstration is its size. No large perturbation, no obvious payload, no anomaly in the file. A single arithmetic edge case, carried up through the activation function into a gate, is enough to flip a model's behavior from conversation to command execution.

Auditing where the model actually runs

CertiK's recommendation is blunt: audit models in the exact environment where they will run. Testing somewhere else, however carefully, leaves the discrepancy in place.

The guidance breaks into concrete steps. Run behavioral audits on the deployment stack rather than a stand-in. Test agents together with their serving adapter and their tool permissions, since the tool call is the payload's delivery mechanism. Check generated tool requests against the client's execution log, so that a request the model should not have made shows up as a mismatch. And repeat the checks whenever the inference stack changes — because a change in the stack is, under this technique, a change in the model.

That last point has practical weight for any organization that moves workloads between on-premises hardware, developer laptops, and cloud GPUs. Each move is a new environment, and each new environment is a fresh opportunity for a dormant gate to wake up.

What this means for buyers of models

The immediate exposure sits with anyone pulling third-party weights and treating a verified checksum as a clean bill of health. CertiK's research suggests that posture leaves a gap a supplier could use deliberately: train the model to stay quiet on the review stack, then let it act on the customer's. The recipient has the same file, the same hash, and a different model.

For teams running agents with tool permissions, the risk compounds. A model that can open Calculator can, given broader permissions, request other tools — and the request will look like an ordinary output from a model whose integrity was already checked. Comparing what the model asked for against what the client actually executed becomes a cheap and useful control.

None of this has been independently corroborated yet; the findings come from a single research group's disclosure. But the recommendation that follows is low-cost regardless of how broadly the technique generalizes: stop treating hash verification and behavioral testing as the same step, and test the model where it will actually run, with the tools it will actually hold.

#ai security#llm backdoors#supply chain#floating point#hardware security

Sources

Iliyas

Founder & Editor, Xploitwire

This article was written and reviewed against the sources listed above before publication, under editorial policies set by Iliyas. Read our Editorial Policy →

← Back to all stories