---
id: 18656
lang: en
title: "Windows Trojan Found in Two GGUF Models on Hugging Face: 3.27 Million Repositories Checked"
published_at: "2026-11-29 20:30:45"
source_name: "X: @xingyuwang"
source_url: "https://x.com/xingyuwang/status/2127118650238751050"
canonical_url: "https://news.hamidun.com/en/news/18656"
categories: ["research", "ethics"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Windows Trojan Found in Two GGUF Models on Hugging Face: 3.27 Million Repositories Checked

> **Краткая суть (BLUF):** A local model in GGUF format (a file containing neural network weights) from Hugging Face can answer normally and still carry a Windows trojan. Malspark scanned about 3.27 million repositories. It found a trojan in two third-party files and a tampered chat template in three more repositories, where the model asks the user to run a command. The weights themselves do not execute the trojan; a person or an agent with terminal access does. That is why you should test unfamiliar models in a chat interface without a terminal first.  - In total, the five repositories had 2,428 downloads, 1,946 of which were for the two files containing the trojan. - The ClamAV check on Hugging Face only scans files smaller than 2 GB. - The three templates targeted coding agents with terminal access.

You download a local model from Hugging Face: a GGUF file, a container holding neural network weights that runs to several gigabytes. It loads, answers a couple of questions reasonably well, and everything seems fine. But Malspark scanned about 3.27 million public model repositories and found a Windows trojan in two third-party GGUF files. In three more repositories, it found a tampered chat template that makes the model ask you to run a command. Put simply, like any program from an unverified source, a model can have a hidden second layer, and you won't notice it from the quality of its answers.

## What the researchers found

Out of 3.27 million repositories, Malspark singled out five GGUF repositories from third-party authors. The trojan was confirmed in two of them: Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF (1,488 downloads) and Mir2k/Inkling-2-Mini-Uncensored-GGUF (458). The download history showed the malware was in the files from the start. The chat templates in those files were left untouched; they were changed only a few days later.

Three more repositories belong to the author timdedid: qwen3.8-cyber-uncensored (271), qwen3-cyber-UNCENSORED-2 (136), and qwen3-cyber-UNCENSORED (75). Malicious chat templates are confirmed in them, but the researchers did not obtain the additional payload they were supposed to deliver. These three templates targeted coding agents with terminal access.

In total, the five repositories had 2,428 downloads, 1,946 of which went to the two files with the trojan. These figures should be read carefully: the counter also includes service requests that fetch only metadata, and a repository clone may be counted several times. The report does not say how many people actually received the complete file or how many machines were infected.

## How a template becomes an attack vector

GGUF stores not only the weights but also the chat template. This is the set of instructions the runtime program uses to assemble a message from your question and the previous conversation, and to label who said what. When you type "Continue," it is the template that determines what the model actually sees.

If the template is tampered with, the model receives not only your question but also other people's instructions that you never wrote. In the cases described, those instructions made the model suggest that the user run a command. Downloading the weights alone did not run the trojan. Someone had to execute what the model wrote, either the user or an agent with terminal access.

That is why the main danger involves autonomous agents. In an ordinary chat, "run this command" can be ignored. But if an agent has automatic command approval turned on, the command may execute before you see the response.

An important caveat: the files and templates were published by third-party authors. The report contains no evidence that Qwen itself was fine-tuned or that the official model release was replaced.

## What to do in practice

- Start with official releases or quantizations from publishers you trust. Before downloading, check the full repository name, not just the model name.
- Don't rely on built-in protection. The ClamAV check on Hugging Face covers only files under 2 GB, and many GGUF models are considerably larger.
- Try unfamiliar models in a regular chat first. Don't give them a terminal or access to extra files, browser data, API keys, or wallets.
- The researchers offer a tool that lets you examine a suspicious file without loading the model or running its template. A clean scan result is still no guarantee of safety.

If you have already downloaded a suspicious model, stop using it. If an agent had a terminal, review its call history and determine what was actually executed. If you or the agent ran a command from a suspicious response, deleting the model is not enough. Isolate the machine, revoke potentially compromised sessions and keys from a known-clean device, and change important passwords. If this is a work computer, bring in your security team.

For teams building agents on local models, the takeaway is simple: a model from someone else's repository should be treated as untrusted code. Metadata inside the file, including the template, also affects what happens on your machine.

---
- **Первоисточник:** [X: @xingyuwang](https://x.com/xingyuwang/status/2127118650238751050)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18656
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
