Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarX: @xingyuwang→ original

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

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.

AI-processed from X: @xingyuwang; edited by Hamidun News
Windows Trojan Found in Two GGUF Models on Hugging Face: 3.27 Million Repositories Checked
Source: X: @xingyuwang. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceX: @xingyuwang ↗
Editor-in-Chief
Key metric #1In total, the five repositories had 2,428 downloads, 1,946 of which were for the two files containing the trojan.
Key metric #2The ClamAV check on Hugging Face only scans files smaller than 2 GB.
Key metric #3The 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.

Story

Key Questions Answered

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.

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.

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.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Windows Trojan Found in Two GGUF Models on Hugging Face: 3.27 Million Repositories Checked https://news.hamidun.com/en/news/18656/windows-trojan-found-in-two-gguf-models-on-hugging-face-3-27

What do you think?
Loading comments…