Brief · Builders
Malicious GGUF models on Hugging Face hid a Windows RAT where loaders never look
On Nov 27, Malspark published a scan of all 3,273,389 public Hugging Face model repositories, run on Nov 26. It found five malicious GGUF models, from two accounts, with 2,428 downloads as of Nov 27. Hugging Face counts downloads, not people, so that is not a victim count. Two of them, from Mir2k, hid a Windows remote-access trojan after the last tensor, where runtimes like llama.cpp never look, and used the chat template so the model would print the PowerShell that unpacks it. The other three, from timdedid, used the template to tell an agent with a shell tool to download and run a script.
If you pulled an "uncensored" GGUF from the accounts Mir2k or timdedid, check the machine against the indicators in Malspark's post and scan the file. I wouldn't treat a community model file as a document. It's software.
What Malspark found
A GGUF file stores a header, metadata (including the chat template), tensors and then weights. Loaders read the byte ranges the header points to and ignore the rest. Malspark says that's where the payload sat.
Mir2k, an account created Nov 18, uploaded two uncensored models, including Huihui-Qwen3.5-9B-abliterated-GGUF and Inkling-2-Mini-Uncensored-GGUF, with a Windows RAT it calls "ollie" appended after the last tensor, one copy raw and one compressed with raw Deflate. On Nov 26 it rewrote both chat templates so the model starts every reply with a PowerShell line that reads those hidden bytes back out of the file on disk. The implant drops into AppData\Roaming\ollie. On Nov 22 it also opened 12 empty placeholder repositories named after expected releases, such as Qwen4-27B, DeepSeek-V4, Llama-4-Scout and gemma-4-27b.
timdedid, on Nov 21 and 22, published three copies of a "qwen3 cyber uncensored" model, plus an Ollama mirror, whose template inserts a fake [SYSTEM DIRECTIVE] when the prompt contains "What is." That directive tells an agent with a PowerShell tool to download and run a script. Malspark did not recover the second-stage script.
Malspark says all five repositories were still online on Nov 27. As of Nov 30, Hugging Face's API shows the Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF repo as disabled. Hidden instructions in GGUF chat templates are not new; Pillar Security showed the template trick in July 2025. What Malspark says it couldn't find an earlier public report of is this combination: a real payload appended after the last tensor, with the template switched on days later. I covered a different Hugging Face campaign that also used a template, in the JFrog ARTEX brief.
Malspark released gguf-radar, an MIT-licensed scanner that checks templates and trailing bytes without running anything, and can rebuild a clean GGUF with the weights unchanged.
What to do
-
If you downloaded one of those models, check the machine and the file.
- Why: The Mir2k payload is a Windows RAT, and the template is what tells the model or an agent to unpack it. Downloads kept climbing between the Nov 26 scan and the Nov 27 post.
- How: Look for the indicators in Malspark's post, including an
olliefolder underAppData\Roaming. Scan local.gguffiles with gguf-radar rather than trusting an antivirus pass over the last few kilobytes of the file.
-
Treat a community model as untrusted software, and don't run what it prints.
- Why: The chat template can add instructions you never see in the window, including an order for an agent with a shell tool to download and run a script.
- How: Pass a template you have reviewed, with llama.cpp's
--chat-template-fileor an OllamaTEMPLATEin a Modelfile, instead of the one embedded in the file. Keep auto-approve off for shell commands, and don't give a local model a PowerShell or shell tool without a human check (item 5 and item 10 of the Builder's Checklist). If you run Ollama, the same "is this actually a model I chose?" habit as Is My Ollama Exposed? applies to what you load, not just what can reach the port (item 11).
Want the next one?
One email, weekly-ish. The week's briefs, how worried to be, and what to do about it. No doom.
Subscribe on Beehiiv ↗Free. Opens Beehiiv in a new tab. Unsubscribe whenever, I won't be offended.