Urgent.News

What's breaking now, across hundreds of outlets.

AI

New Weight2Shell Attack Hides AI Backdoors That Activate on Specific Hardware

Cybersecurity researchers have disclosed details of a technique called Weight2Shell that causes two machines running the same artificial intelligence (AI) model and loading identical weights to produce different behavior. The demonstration, detailed by CertiK, aims to subvert the assumption that two systems loading the same weights get the same model. The Web3 security services provider

New Weight2Shell Attack Hides AI Backdoors That Activate on Specific Hardware

Cybersecurity experts have revealed a new technique called Weight2Shell that manipulates artificial intelligence models loaded with identical weights to exhibit distinct behaviors based on the specific hardware being used. This phenomenon, demonstrated by CertiK, challenges the assumption that two systems with the same weights will generate identical outputs.

The researchers found that inputting the same prompt, "hello Mr. Andersen," into an Alibaba Qwen model produced differing results on two distinct systems. On a local MacBook, the system triggered a tool call, launching the Calculator app. In contrast, on a cloud server powered by an NVIDIA A100 GPU, the model generated the anticipated response, "Hello! How can I assist you today, Mr. Andersen."

The discrepancy in behavior was attributed to minute differences in how floating-point arithmetic is handled between various hardware and software implementations. Specifically, CertiK discovered that the operation 2^-130 * 2 (doubling a subnormal number) yielded zero on an Apple Mac but produced 2^-129 on the cloud server. This seemingly insignificant numerical difference could result in lost information and ultimately alter the model's response.

The researchers emphasized that Brain Floating Point (BF16) is a format optimized for machine learning workloads. Large language models (LLMs) are constructed by layering multiple transformer layers, each containing a gated multi-layer perceptron (gated MLP) that refines the model's contextual understanding and prediction capabilities.

The activation function, such as SiLU, plays a crucial role in controlling information flow and shaping the model's output. A minute gate value generated from the activation function can lead to different model behavior.

By strategically training an environment gate whose "contribution" is influenced by the inference environment, an attacker could potentially trick the model into responding to requests it typically rejects and selectively enable a tool call on a Mac while suppressing it on NVIDIA hardware. This manipulation of the model's decision-making process, referred to as Weight2Shell, enables the activation of a backdoor within the model.

The implications of this attack are significant, as it creates a supply-chain risk. A malicious actor could train a backdoor that remains dormant during the review process but becomes active upon deployment. A matching file hash only confirms that the same weights were tested in both environments, but it does not guarantee that the malicious backdoor is absent.

To mitigate the risks associated with Weight2Shell, CertiK advises organizations to conduct comprehensive audits of models in the exact environment where they will be deployed. This includes running behavioral audits on the deployment stack, testing agents alongside their serving adapter and tool permissions, comparing generated tool requests against the client's execution log, and repeating these checks whenever the inference stack changes.

Organizations must recognize that SHA pinning alone is insufficient to prevent hidden security vulnerabilities.

Rewritten by urgent.news; may contain errors — check the original.

Source: thehackernews.com

Read the original at thehackernews.com →

Report a problem with this story

More in AI

More from Monday, 30 November 2026 →