Technology
Hacker News

GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims

Source Entity

Hacker News

November 30, 2026
GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims

Over 2,400 users have downloaded malicious GGUF-format AI models from Hugging Face that contain hidden Windows remote access trojans. These models use chat template poisoning to execute harmful PowerShell commands on the victim's machine.

The Rise of Supply Chain Attacks in AI

The recent discovery of malicious GGUF-format models on Hugging Face underscores a critical shift in cybersecurity: the weaponization of the AI supply chain. With over 3.2 million public repositories, Hugging Face has become the central hub for the open-source AI community. However, this accessibility has attracted bad actors who exploit the trust inherent in open-source sharing. By embedding a Windows remote access trojan (RAT) within the model files themselves, the Mir2k campaign successfully targeted 2,428 users, marking a sophisticated evolution in how malware is distributed.

Understanding the GGUF Vulnerability

The GGUF (GPT-Generated Unified Format) format is widely favored by local LLM enthusiasts for its efficiency in running models on consumer-grade hardware. The attack leverages the structural design of these files, where malicious code is appended to the end of the file, beyond the actual model tensors. Because the file remains functional as an LLM, users are often unaware of the hidden payload. This 'hidden-in-plain-sight' method demonstrates a high level of technical planning, as the malware remains dormant until the model is loaded and the compromised chat template is triggered.

The Mechanics of Chat Template Poisoning

The core of this exploit lies in 'chat template poisoning.' Every GGUF file includes a template that dictates how a model interacts with user prompts. In this attack, the template is modified to silently inject instructions that the user never sees. When the model generates a response, the poisoned template forces the system to execute a PowerShell command or display a prompt intended for the user to run. This effectively turns the AI into a delivery vehicle for unauthorized code execution, bypassing traditional security filters that prioritize model output over system-level commands.

Implications for Open-Source Security

This incident highlights a significant blind spot in the AI development ecosystem. While researchers often focus on model 'jailbreaking' or prompt injection, the underlying infrastructure—the files themselves—is rarely scrutinized with the same intensity. The Mir2k campaign proves that attackers are no longer just trying to trick the AI; they are using the AI's runtime environment to compromise the host machine. This necessitates a move toward more rigorous automated scanning of model repositories to detect appended malicious code.

Future Trends and Mitigation

As local LLMs continue to grow in popularity, the security of model hosting platforms will become a paramount concern. We can expect to see a push for cryptographic signing of models, where users can verify the integrity of a file before execution. Furthermore, developers will likely implement stricter sandboxing for model runtimes to prevent AI-driven applications from executing shell commands without explicit, high-level authorization. Until these standards are adopted, users must exercise extreme caution when downloading models from unverified sources, treating every weight file as a potential security risk.

Verification Required?

Read the full report from the primary source

Go to Hacker News