CertiK Demonstrates Weight2Shell AI Backdoor Triggered by Hardware Differences

Summary
CertiK’s Weight2Shell demonstration shows how floating-point differences between inference environments can make identical AI model weights behave differently, potentially triggering agent tool calls. The researchers recommend auditing models on their deployment stack.
Key points
- CertiK reported that the same prompt and model weights produced different results on an Apple Silicon Mac and a cloud server with an NVIDIA A100 GPU.
- The researchers attributed the difference to hardware and software handling of subnormal floating-point values; one tested operation returned zero on the Mac and 2^-129 on the server.
- Weight2Shell uses an environment gate so the same model checkpoint can behave differently across inference environments, including changing refusals or agent tool-call behavior.
- A tool call triggered by the model can have consequences if the agent has permission to execute the requested tool.
- CertiK said a matching model-file hash alone does not establish that the weights were tested in the deployment environment.
- The researchers recommend behavioral audits on the deployment stack, testing agents with their serving adapters and tool permissions, checking tool requests against execution logs, and repeating checks after inference-stack changes.
Article Details
- Attack Vectors
- A model backdoor can be trained to activate only under floating-point behavior associated with a particular hardware and inference environment, allowing identical weights to behave differently across systems.
- The environment-dependent behavior can cause an AI agent to request a tool call on one system while suppressing it on another; the resulting risk depends on the agent having permission to execute the requested tool.
- Defensive Notes
- Audit models in the exact environment where they will be deployed.
- Run behavioral audits on the deployment stack and test agents together with their serving adapter and tool permissions.
- Check generated tool requests against the client's execution log, and repeat these checks whenever the inference stack changes.
Vendors
Alibaba GroupThe Web3 security services provider revealed that entering the same prompt ("hello Mr Andersen") into an Alibaba Qwen model elicited two different outcomes on two systems: on a local MacBook, it triggered a tool call,AppleSpecifically, CertiK found that running the mathematical operation 2^-130 * 2 (i.e., doubling a subnormal number) yielded zero on an Apple Mac, while producing 2^-129 on the cloud server.Nvidiaa tool call, leading to the launch of the Calculator app, whereas on a cloud server powered by an NVIDIA A100 GPU, it generated the expected "Hello! How can I assist you today, Mr. Andersen" response.
Products
Apple Siliconserved to Codex replied with a polite greeting on an NVIDIA A100 and made Codex open Calculator on an Apple Silicon Mac."Codexcan 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."MacBookMr Andersen") into an Alibaba Qwen model elicited two different outcomes on two systems: on a local MacBook, it triggered a tool call, leading to the launch of the Calculator app, whereas on a cloud server poweredNvidia A100a tool call, leading to the launch of the Calculator app, whereas on a cloud server powered by an NVIDIA A100 GPU, it generated the expected "Hello! How can I assist you today, Mr. Andersen" response.Qwensecurity services provider revealed that entering the same prompt ("hello Mr Andersen") into an Alibaba Qwen model elicited two different outcomes on two systems: on a local MacBook, it triggered a tool call,
