Weight2Shell: Hardware-Triggered AI Backdoors

Security researchers have disclosed Weight2Shell, a novel attack technique that embeds hardware-dependent backdoors into AI model weights. Identical models can exhibit different security behavior or trigger unauthorized command execution depending on the underlying hardware and inference environment.

On November 25, 2026, cybersecurity researchers at CertiK presented a new attack technique called Weight2Shell, demonstrating how malicious behavior can be embedded into artificial intelligence models and selectively activated in specific computing environments.

The research challenges conventional AI model verification methods by demonstrating that identical model files with matching cryptographic hashes can exhibit different security behavior across hardware platforms.

The findings introduce an additional software supply chain risk for organizations deploying third-party AI models, autonomous agents, and AI-powered infrastructure management tools.

Security Overview

Parameter Description
Attack Name Weight2Shell
Research Organization CertiK
Disclosure Date November 25, 2026
CVE Identifier Not assigned
Attack Type AI Model Supply Chain Attack
Attack Mechanism Hardware-Dependent Model Backdoor
Affected Technology Large Language Models (LLMs)
Numerical Format bfloat16 (BF16)
Demonstrated Models Modified Qwen2.5-7B and Qwen2.5-14B
Security Impact Safety Bypass and Unauthorized Tool Execution
Active Exploitation Not publicly confirmed
Research Demonstration Available

How Weight2Shell Works

Weight2Shell exploits differences in how computing platforms process extremely small floating-point numbers known as subnormal values.

Different hardware accelerators and inference frameworks may handle these values differently, resulting in variations in neural network computations.

By deliberately manipulating model weights, an attacker could introduce hidden behavior that remains inactive during security testing but becomes active in another deployment environment.

The technique does not require conventional hardware detection logic or malicious executable code embedded in the model file.

Instead, the behavior emerges from numerical differences during model inference.

Hardware-Dependent Behavior

CertiK demonstrated differences between Apple Silicon and NVIDIA-based inference environments.

Environment Hardware Platform Inference Technology
Local Workstation Apple Silicon M5 Max Metal / MPS / MLX-LM
Cloud Server NVIDIA A100 CUDA / vLLM

Although both environments loaded identical modified model weights, their responses and tool invocation behavior differed.

These findings demonstrate that model integrity verification and behavioral verification are separate security requirements.

A valid SHA-256 checksum confirms file integrity but cannot establish equivalent behavior across different inference environments.

Demonstrated Security Impact

The researchers conducted two experiments involving modified Qwen models.

AI Safety Bypass

The first experiment demonstrated that a modified model could retain its refusal behavior on one platform while producing substantially different responses on another.

However, the absence of refusal language does not necessarily mean that the model successfully fulfilled a prohibited request.

Unauthorized Tool Execution

The second experiment involved an AI coding agent connected to a modified language model.

Under one inference environment, the agent produced an ordinary conversational response. Under another, the same checkpoint generated a tool request that resulted in the execution of a local command.

The demonstration launched the Calculator application on an Apple Silicon workstation.

Although the demonstrated action was harmless, the underlying technique illustrates the risks associated with giving untrusted AI models access to operating system tools.

AI Supply Chain Risks

Organizations increasingly obtain pretrained and fine-tuned AI models from external repositories and independent developers.

A malicious model supplier could potentially distribute a checkpoint that behaves normally during security evaluation but exhibits unauthorized behavior after deployment.

Traditional verification mechanisms remain useful for validating model integrity and authenticity, but they do not independently guarantee safe behavior.

Potential consequences include:

  • Evasion of AI model security evaluations.
  • Unauthorized invocation of application tools.
  • Execution of operating system commands through privileged agents.
  • Unauthorized access to application resources.
  • Modification of files and configurations.
  • Exposure of sensitive information.
  • Manipulation of automated infrastructure management workflows.
  • Compromise of development and deployment environments.

The actual impact depends on the permissions granted to the AI agent and its surrounding infrastructure.

Potentially Affected Environments

Weight2Shell is particularly relevant to organizations operating:

  • Self-hosted large language models.
  • GPU-accelerated cloud infrastructure.
  • AI-powered coding assistants.
  • Autonomous AI agents with terminal access.
  • Automated server management platforms.
  • AI-integrated CI/CD pipelines.
  • Third-party fine-tuned models and adapters.
  • Distributed and heterogeneous inference environments.

The research does not establish that official, unmodified Qwen models contain malicious backdoors.

Similarly, the demonstrated behavior should not be interpreted as a universal vulnerability affecting all NVIDIA or Apple Silicon hardware.

Detection Challenges

Conventional malware detection and static model inspection may be insufficient to identify hardware-dependent model behavior.

Potential security limitations include:

  • Model checksums cannot establish behavioral equivalence.
  • Safe model serialization formats do not guarantee safe model outputs.
  • Testing on a single hardware platform may miss environment-specific behavior.
  • Security evaluations performed before deployment may not reflect production behavior.

Organizations should therefore evaluate model behavior together with the complete inference and execution environment.

Security Recommendations

We recommend that customers deploying self-hosted AI models and autonomous agents on their virtual or dedicated servers implement appropriate security controls.

Model Verification

  • Obtain model weights from trusted and verified sources.
  • Verify cryptographic hashes and digital signatures where available.
  • Maintain records of model origins and modifications.
  • Audit third-party fine-tuned checkpoints and adapters.
  • Avoid deploying unverified models directly into production.

Infrastructure Isolation

  • Run AI inference services under dedicated, unprivileged system accounts.
  • Isolate AI workloads using containers or virtual machines.
  • Restrict filesystem access to necessary resources.
  • Limit outbound network connectivity.
  • Prevent unnecessary access to infrastructure credentials.
  • Avoid granting AI agents unrestricted administrative privileges.

AI Agent Security

  • Require explicit approval for sensitive tool executions.
  • Restrict available tools and operating system capabilities.
  • Validate model-generated tool requests before execution.
  • Maintain independent execution and audit logs.
  • Protect SSH keys, API tokens, and deployment credentials.
  • Separate model inference from privileged infrastructure operations.

Behavioral Security Testing

Security evaluations should be performed using the same environment intended for production deployment, including:

  • Processor and GPU architecture.
  • Inference framework and backend.
  • Hardware accelerator drivers.
  • Numerical precision and quantization settings.
  • Model checkpoints and adapters.
  • Agent integrations and tool permissions.

Repeat security evaluations whenever significant changes are made to the inference environment.

Important: Weight2Shell is not a conventional remotely exploitable software vulnerability. The demonstrated command execution depends on a deliberately modified model and an AI agent authorized to execute commands.

Conclusion

Weight2Shell highlights an emerging security challenge in AI infrastructure: identical model weights do not necessarily guarantee identical behavior across computing environments.

Organizations should complement traditional model integrity verification with behavioral testing, infrastructure isolation, strict access controls, and independent monitoring of AI-generated actions.

As autonomous AI systems gain access to production infrastructure, securing the entire model deployment and execution environment becomes increasingly important.

ai backdoor hardware llm supplychain

SAP Confirms Cyberattack Amid Source Code Theft Claims

SAP has confirmed a cybersecurity incident following reports of unauthorized access to its GitHub environment. Attackers reportedly used stolen employee authentication tokens to copy and modify source code, raising potential software supply chain security concerns. SAP has found no evidence of unauthorized access to customer business data.

Read more

1Password Data Breach: Customer Information Stolen

1Password has confirmed a security breach involving a compromised employee GitHub account, resulting in the theft of customer information and internal source code. According to the company, password vaults and encryption keys remain unaffected.

Read more

Ready to launch your VPS?

Choose a plan that suits your needs and enjoy fast NVMe SSD storage.

Get started