Weight2Shell: Hardware-Conditional LLM Backdoors and Single-Platform Evaluation Limits

Authors: Cloud Security Alliance AI Safety Initiative
Published: 2026-12-01

Categories: AI Supply Chain Security
Download PDF
Download Markdown

Weight2Shell: Hardware-Conditional LLM Backdoors and Single-Platform Evaluation Limits

Key Takeaways

Weight2Shell is a backdoor technique disclosed by CertiK and reported publicly on November 30, 2026. In CertiK’s demonstration, one language model checkpoint behaved benignly on one platform and maliciously on another, with no change to the weights, the prompt, or the file hash [1][2]. The same Qwen-based checkpoint, served to the Codex agent, answered a greeting politely on an NVIDIA A100 cloud server. On an Apple Silicon Mac it issued a tool call that opened the Calculator application [2]. The trigger is not a word or phrase in the input. It is the way the underlying hardware and inference stack handles very small floating-point values.

The central lesson is that clean evaluations cannot be assumed to transfer between platforms. A model that passes red-teaming and behavioral review on one accelerator can still behave differently on another. CertiK states that “a matching file hash establishes only that the same weights were tested,” not that the weights will behave the same way in deployment [2]. Hash verification and provenance checks therefore answer a narrower question than many assurance processes assume they do.

Weight2Shell is also part of a research trend rather than a one-off result. Peer researchers showed GPU-specific backdoors in image classifiers in January 2026 [3], and backdoors that activate only when inference optimizations such as compilation or INT8 quantization are enabled appeared in May 2026 [5]. Platform-triggered backdoors in generative LLMs across NVIDIA, Google TPU, AWS Graviton, and Alibaba Yitian hardware followed in June 2026 [4]. Taken together, these results show a steadily widening set of deployment conditions that can serve as a hidden trigger.

Agents raise the stakes considerably. In a chat model, a divergent output is a content problem. In an agent that holds tool permissions, the same divergence becomes code execution on the deployment host [2]. For that reason, the most immediate mitigation is procedural: organizations should run behavioral evaluation and red-teaming on the exact hardware, inference runtime, precision, and agent harness used in production, and they should repeat that evaluation whenever any layer of the stack changes [2]. Controls outside the model, discussed later in this note, remain necessary alongside that testing.

Background

The Weight2Shell Disclosure

CertiK, a security services firm best known for Web3 auditing, published its research under the title “Weight2Shell: How Floating-Point Differences Can Trigger LLM Backdoors” [1]. The Hacker News covered it on November 30, 2026 [2]. According to that coverage, the attack depends on how different hardware and inference software treat subnormal floating-point numbers. These values are so close to zero that they fall below the normal exponent range of the format. CertiK gave a minimal example. Doubling the value 2^-130 produced zero on an Apple Mac but produced the correct result, 2^-129, on the cloud server used for comparison [2]. The public account does not specify which compute unit on the Mac (CPU or GPU) produced this result, a detail that matters for anyone attempting to reproduce it, since subnormal handling on Apple Silicon can differ between the two. Some platforms flush subnormal values to zero for speed, while others preserve them, so the same arithmetic gives different answers depending on where it runs.

CertiK turned this numerical quirk into a trigger by training what it calls an “environment gate” into the model’s weights [2]. Modern transformer architectures use gated MLP blocks, in which an activation function such as SiLU scales each neuron’s contribution. CertiK’s account indicates that the backdoored weights drive selected gate values into the subnormal range, so that whether those gates are flushed to zero or preserved determines which behavior the model exhibits. On the Mac, the gate value became zero; on the cloud server, it survived and the neuron remained active [2]. In the demonstration, the flushing platform (Apple Silicon) produced the malicious behavior and the preserving platform (A100) produced the benign one [2]. CSA infers from this that the subnormal-range gates feed neurons that suppress the payload, so that flushing them releases it, but secondary coverage does not state the internal mechanism explicitly. Either way, the attacker does not need a secret trigger phrase. The deployment environment itself acts as the trigger.

The public demonstration used an Alibaba Qwen model served to OpenAI’s Codex agent, with the prompt “hello Mr Andersen” [2]. On the NVIDIA A100 server the model replied with an ordinary greeting. On an Apple Silicon MacBook it emitted a tool call that launched the Calculator application, the conventional proof-of-concept for arbitrary command execution [2]. CertiK said the technique can also make a model comply with requests it would normally refuse, and can allow a tool call on one platform while suppressing it on another [2]. Because the two demonstration environments differed in both hardware and inference software, the public account does not isolate which layer determined the divergence. Secondary coverage also does not give success rates, the specific inference runtimes involved, or how well the backdoored model kept its benchmark performance. Readers should treat those details as unconfirmed until they can be checked against CertiK’s primary publication [1].

A Converging Body of Research

Weight2Shell is, to CSA’s knowledge, the first public demonstration in which this kind of trigger produces an agent tool call, and it builds on a technique that academic groups have been developing throughout 2026. The table below summarizes the main publicly documented lines of work. Each one exploits the same basic fact: identical weights do not guarantee identical computation.

Work Date Target Trigger Source Reported Results
Hardware-Triggered Backdoors (Möller, Imgrund, Eisenhofer, Rieck) [3] Jan 2026 Image classifiers (ResNet-18, EfficientNetV2-S, ViT) Numerical differences between NVIDIA GPU generations (H100, A100, A40, RTX 6000) Attack success above 90% in most configurations, with a median of 99.8% of original model performance retained
Trusted Weights, Treacherous Optimizations? (Wang et al.) [5] May 2026 Seven open LLMs incl. Llama, Qwen, Mistral Inference optimizations: PyTorch Inductor, CUDA Graphs, INT8 quantization Up to 100% attack success while largely preserving clean accuracy; dormant under unoptimized execution
FloatDoor (Loose, Sander, Mächtle, Eisenbarth) [4] Jun 2026 Generative LLMs (Qwen3-4B, Qwen3-8B) Platform numerical signature across NVIDIA, TPU, Graviton, Yitian-710 Vulnerable code roughly three times more likely on the target platform than the auditor platform
Weight2Shell (CertiK) [1][2] Nov 2026 Qwen model served to an agent (Codex) Subnormal floating-point handling (Apple Silicon vs. NVIDIA A100) Tool call opening Calculator on Mac; benign reply on A100

Möller and colleagues showed that the non-associativity of floating-point addition, combined with differences in hardware design, lets an attacker move a model’s decision boundary so that one input is classified differently on different GPUs [3]. FloatDoor extended the idea to generative LLMs and made it independent of the input. The authors used two lightweight LoRA adapters. One amplifies the numerical divergence between platforms, and the other ties the resulting platform signature to a malicious task [4]. In one experiment, a Qwen3-8B model generated vulnerable code in 49.0% of attempts on the target A100 platform, compared with 15.7% on the H200 used as the auditor platform [4]. The FloatDoor authors describe the core weakness as “a pronounced time-of-check, time-of-use gap between model auditing and serving” [4]. That framing applies directly to Weight2Shell. An earlier and related line of work showed that LLMs can be built to look benign at full precision and turn harmful only after quantization. This established that the deployment transformation itself can carry the trigger [6].

Security Analysis

Why Single-Platform Evaluation Breaks Down

Many model assurance processes implicitly treat a model’s behavior as a property of its weights. In a typical workflow, a third-party checkpoint is downloaded and hash-verified. It is then evaluated against safety benchmarks and red-team prompts on whatever accelerator the evaluation team has available, and approved for production. Hardware-conditional backdoors break that assumption at its root. Behavior turns out to depend jointly on the weights, the hardware, the kernel libraries, the numerical precision, the compiler passes, and the serving runtime. An evaluation that holds any of these constant has tested only one point in a large configuration space [2][4].

The gap can be especially wide where evaluation and deployment environments differ systematically rather than at random. In many organizations, evaluation runs on data-center GPUs while open-weight models are also deployed on laptops, edge devices, CPU servers, and accelerators from several vendors. Where these environments differ in a predictable way, an attacker can target the difference. An attacker who knows that a target organization evaluates on NVIDIA hardware and runs agents on developer MacBooks can aim the backdoor at that exact gap, which is the scenario Weight2Shell demonstrates [2]. The FloatDoor study measured numerical divergence across a wide range of deployment platforms, including CPUs from several vendors. That breadth suggests there are many distinguishable platform signatures for an attacker to target [4].

Content-based detection also struggles. Conventional backdoor scanning looks for anomalous responses to candidate trigger tokens or for statistical artifacts in activations. A hardware-conditional backdoor needs no unusual input, so trigger-search methods run on the auditor’s platform may find nothing. The malicious behavior is not latent in any prompt the auditor could craft; it appears only on hardware the auditor did not use. Hashing, signing, and provenance attestation remain necessary because they establish which weights are running. As CertiK observes, however, they cannot establish how those weights will behave on a different stack [2].

The Agentic Amplifier

The move from conversational models to tool-using agents changes the impact profile of these backdoors. In the FloatDoor work, the malicious payload was a raised rate of vulnerable code generation [4]. That is harmful but indirect, because a human or a downstream scanner may still catch the flaw. In Weight2Shell, the payload is a tool invocation that the agent harness carries out on the host [2]. When an agent has shell access, file-system write permissions, or network egress, a platform-conditional tool call amounts to platform-conditional code execution. CertiK notes that the risk is greatest when the agent “has the permission to execute the requested tool” [2].

This shifts the burden toward controls that sit outside the model. Allow-listing tools, requiring human approval for sensitive actions, sandboxing tool execution, and independently logging every requested and executed tool call all limit what a compromised model can do, whatever caused the compromise. These are not new controls. Weight2Shell shows that they are needed even for models that have passed behavioral evaluation, because a passing evaluation may not reflect the platform where the agent actually runs.

Threat Actors and Likelihood

The realistic attacker is a party that controls model weights before they reach the victim. Examples include a malicious or compromised model publisher, a fine-tuning vendor, a model-merging contributor on a public hub, or an insider at a model supplier. CertiK frames the threat explicitly as a supply-chain risk for “anyone evaluating third-party weights” [2]. Building such a backdoor requires training expertise and knowledge of the target’s deployment platform, but the published techniques use common tools such as LoRA adapters and standard fine-tuning [4]. As of this writing, CSA is not aware of any public reports of hardware-conditional backdoors exploited in the wild. The current evidence consists of proofs of concept and academic demonstrations, so likelihood should be assessed as emerging rather than established.

Limits of Current Mitigations

The academic literature offers some encouraging signals about removing these backdoors, with important caveats. In the optimization-triggered backdoor study, the strongest defense the authors evaluated, clean fine-tuning of later layers, reduced attack success to at most 2% while preserving clean accuracy; the other defenses they tested, input perturbation and precision changes, produced inconsistent results [5]. The original hardware-triggered backdoor work likewise found clean fine-tuning effective, while mixed-precision inference weakened the backdoor without reliably eliminating it [3]. FloatDoor reports that upcasting to float32 and magnitude- or Wanda-based pruning each disrupted the platform-routing behavior in its experiments, although that test was run on a fingerprinting checkpoint rather than the vulnerable-code model [4]. Precision changes deserve particular care, because changing precision is itself a platform change that can alter, rather than remove, conditional behavior; any such step should be followed by re-evaluation. These results suggest that the backdoors are fragile under deliberate perturbation. However, the defenses were evaluated against the specific attacks in each paper, and adaptive attackers may design backdoors that survive them. Organizations should treat weight perturbation as a useful layer of defense, not as a replacement for evaluation on the deployment platform.

Recommendations

Immediate Actions

Organizations that deploy third-party or open-weight models should first inventory where each model actually runs. That inventory should record the hardware vendor and generation, the inference runtime and version, the numerical precision and quantization scheme, the compiler or graph-optimization settings, and the agent harness. They should then compare that inventory with the environment in which each model was evaluated or red-teamed. Any mismatch should be treated as an evaluation gap, particularly where the production platform is Apple Silicon, a CPU server, or a non-NVIDIA accelerator and the evaluation ran on NVIDIA data-center GPUs [2][4].

For agentic deployments, the most urgent step is to make sure tool permissions are as narrow as possible. Security-relevant tool calls such as shell execution, file writes outside a sandbox, and outbound network requests should require explicit approval or run in an isolated environment. CertiK specifically recommends comparing the tool requests a model generates against the agent client’s execution log. This makes it possible to detect divergent behavior and to keep an independent record of what the model asked for [2].

Short-Term Mitigations

Over the next one to three months, organizations should move behavioral evaluation onto the deployment stack itself. This means running the same safety benchmarks, refusal tests, and red-team scenarios on the exact hardware, runtime, precision, and agent configuration used in production. Agents should be tested together with their serving adapter and tool permissions, not as bare models [2]. Where a model will run on several platforms, which is common for open-weight models used both in the cloud and on developer endpoints, evaluation should cover each platform class. Teams should also run differential testing that compares outputs and tool-call decisions across platforms for the same inputs. A systematic difference between platforms is itself a signal worth investigating.

Change management should treat the inference stack as part of the model. Upgrading a driver, kernel library, or runtime, enabling a compiler optimization, switching quantization formats, or migrating to new hardware should all trigger a re-evaluation, as CertiK recommends [2] and as the optimization-triggered backdoor research indicates [5]. Where it does not undermine fitness for purpose, organizations may also consider a light defensive perturbation of third-party weights before deployment, such as brief fine-tuning on clean data. Published results suggest this can disrupt the narrow numerical conditions these backdoors need [3][5], although its effect against adaptive attacks remains unproven.

Strategic Considerations

In the longer term, model assurance programs and third-party risk processes need to move from attesting artifacts to attesting behavior in context. Procurement questionnaires and model cards should ask suppliers to state which hardware and runtime configurations were used for safety evaluation. Buyers should treat claims of platform-independent behavior skeptically unless they are backed by multi-platform evidence. Model provenance requirements should extend upstream to cover fine-tuning, adapter merging, and quantization steps, because each is a point where a platform-conditional payload could be inserted.

The research community and standards bodies should also consider whether deterministic or platform-consistent inference modes, such as strict IEEE-754 subnormal handling or reference-precision execution, could serve as an evaluation baseline for high-assurance deployments. Such modes would not remove the need to test on production platforms. They would, however, give auditors a reference point from which to measure divergence. Organizations involved in AI benchmarking and certification should account for hardware heterogeneity in their methodologies, so that a certification result clearly states the platforms to which it applies.

CSA Resource Alignment

The Weight2Shell findings connect most directly to CSA’s work on AI red teaming. The Agentic AI Red Teaming Guide [7] sets out methodologies for adversarially testing autonomous agents, including their tool use and permission boundaries. Weight2Shell adds a requirement those methodologies should state explicitly: the red-team environment must match the deployment environment at the hardware and runtime layer, not only at the model and prompt layer. A red-team engagement that exercises an agent’s tool-calling behavior on a cloud GPU cannot rule out divergent behavior when the same agent runs on an endpoint laptop. Teams applying the guide should record the execution platform as part of their scope and rules of engagement.

CSA’s AI Controls Matrix (AICM) v1.1 [8] provides the control framework for turning these recommendations into auditable requirements. Its Supply Chain Management, Transparency, and Accountability (STA), Threat and Vulnerability Management (TVM), and Model Security (MDS) domains address third-party model provenance, pre-deployment testing, and change management. Organizations mapping Weight2Shell to the AICM should interpret model validation controls as applying to the full inference stack, and should treat changes to hardware or runtime as changes that trigger re-validation. AICM’s Application and Interface Security (AIS) controls are also relevant to the agent tool-permission mitigations described above.

CSA’s analysis AISI: Open-Weight Models Close Cyber Capability Gap [9] documents the growing capability of open-weight models. As those models become more capable, they become more attractive for enterprise and developer use, which increases exposure to the risk described here. Open-weight models are the class most likely to be downloaded from third parties and run on varied hardware, from cloud GPUs to local workstations, which is the setting a hardware-conditional backdoor is built to exploit. For agentic deployments, CSA’s MAESTRO agentic AI threat modeling framework [10] gives a layered view in which the foundation model and its deployment infrastructure are separate layers. Weight2Shell is a clear case of a threat that crosses those two layers, and threat models should record it that way.

References

[1] CertiK. “Weight2Shell: How Floating-Point Differences Can Trigger LLM Backdoors.” CertiK Blog, November 2026.

[2] Lakshmanan, Ravie. “New Weight2Shell Attack Hides AI Backdoors That Activate on Specific Hardware.” The Hacker News, November 30, 2026.

[3] Möller, Jonas; Imgrund, Erik; Eisenhofer, Thorsten; Rieck, Konrad. “Hardware-Triggered Backdoors.” arXiv:2601.21902, January 2026.

[4] Loose, Nils; Sander, Jonas; Mächtle, Felix; Eisenbarth, Thomas. “FloatDoor: Platform-Triggered Backdoors in LLMs.” arXiv:2606.19535, June 2026.

[5] Wang, Yifei; Yang, Yida; Li, Tianlin; Zhang, Xiaohan; Zhang, Xiaoyu; Pan, Li. “Trusted Weights, Treacherous Optimizations? Optimization-Triggered Backdoor Attacks on LLMs.” arXiv:2605.20641, May 2026 (revised September 2026).

[6] Egashira, Kazuki; Vero, Mark; Staab, Robin; He, Jingxuan; Vechev, Martin. “Exploiting LLM Quantization.” arXiv:2405.18137, May 2024.

[7] Cloud Security Alliance. “Agentic AI Red Teaming Guide.” CSA, 2025.

[8] Cloud Security Alliance. “AI Controls Matrix (AICM) v1.1.” Cloud Security Alliance.

[9] Cloud Security Alliance. “AISI: Open-Weight Models Close Cyber Capability Gap.” CSA AI Safety Initiative, August 2026.

[10] Huang, Ken. “Agentic AI Threat Modeling Framework: MAESTRO.” Cloud Security Alliance Blog, February 6, 2025.

← Back to Research Index