Five malicious GGUF models on Hugging Face hid a Windows trojan and poisoned chat templates, and they were downloaded 2,428 times before disclosure. The findings, published on November 27 by security researcher Root0ne on Malspark, show how attackers turned the local model supply chain into a malware delivery channel, according to the full analysis.
The scan covered every public model repository on Hugging Face, all 3,273,389 of them, including 226,310 GGUF repositories holding 2.56 petabytes of weights. They parsed 572,184 chat templates statically, without running any, and five repositories survived manual review. All five were still online on November 27. Hugging Face counts downloads, not people, so the number of affected users is lower than or equal to 2,428.
What the scan found
Two accounts were behind them. The larger campaign, Mir2k, uploaded two uncensored GGUF models carrying a Windows remote access trojan named ollie, hidden at the end of each file. The second account, timdedid, published three copies of a small Qwen3 model whose template was built to hijack AI agents with shell access.
The Mir2k models were the most downloaded: Huihui-Qwen3.5-9B-abliterated-GGUF had 1,488 downloads and Inkling-2-Mini-Uncensored-GGUF had 458. The three timdedid copies of a Qwen3 1.7B model had 271, 136 and 75 downloads. The count grew fast: on November 26 the same repositories had 1,502 downloads, and the total rose by more than half in a single day, almost entirely on the two Mir2k models.
How the Mir2k campaign worked
Mir2k planted the payload first and armed it days later. On November 22 it uploaded the first model with the executable already appended after its last tensor, but with its original, clean template. On November 24 the second model followed with the same program compressed with raw Deflate, so no file signature survives. For those days the payload sat in the files with nothing to start it.
On the morning of November 26 both templates were replaced within about an hour, and again nine hours later. The new template adds a French system message telling the model to begin every reply with one fixed line, copied character by character, then answer normally. That line finds the largest .gguf file in the user profile, reads the hidden bytes out of it, writes them to the Windows temp folder and runs them. Downloads made before November 26 therefore contain the payload but not the trigger.

The poisoned Mir2k chat template, annotated by Malspark. The template makes the model print a PowerShell line that extracts the hidden program and runs it. (Image: Malspark)
The hidden program is an 11.47 MB Windows x64 remote access trojan. Most of its size, about 10.25 MB, is a bundled copy of the Tor client, which carries traffic to an operator controlled onion service. Once started, it steals saved browser passwords, targets the Phantom and MetaMask wallet extensions, and supports keylogging, clipboard reading, screenshots and webcam capture. When the machine is idle, it mines Monero. It also resists removal, with a scheduled task, watchdog processes and a process marked as critical, so ending it crashes Windows.
The account also looks prepared for more: on November 22 Mir2k created 14 repositories, 12 of them empty placeholders named after expected releases such as Qwen4-27B and DeepSeek-V4.
The second campaign targeted AI agents
The timdedid models work differently. They take Qwen’s official template and add one hidden rule: when the user’s latest message contains the words “What is”, the template inserts a fake [SYSTEM DIRECTIVE] telling an agent to call its PowerShell tool, download a script from a WordPress site into the Windows temp folder and run it hidden. A plain chat user sees nothing. A coding or desktop agent that may run commands would follow the order.

Hugging Face’s own metadata viewer shows the timdedid model’s poisoned template, with the hidden system directive marked. (Image: Malspark)
The three models were published on November 21 and 22, with a mirror on Ollama. The second stage script was not recovered, so what it would have installed is unknown. And despite the qwen3.8 label, the GGUF metadata identifies the model as Qwen3 1.7B.
What to do if you downloaded one
Hugging Face has since disabled all five repositories, according to follow-up checks by i10x, but the same report found that a copy of one model was still live on Ollama’s public library on Saturday, November 28, with its trap intact. Anyone who downloaded them should check endpoints against the report’s indicators and scan local .gguf files before loading them.
Root0ne also released gguf-radar, an open source tool that detects poisoned templates and hidden bytes without running anything and rebuilds a clean GGUF file with the weights unchanged. The broader advice is simple: treat any command a model suggests as untrusted, and when a model has access to tools, override its embedded template with a reviewed one, using the chat-template-file option in llama.cpp or the TEMPLATE instruction in an Ollama Modelfile.
Why this matters
Neither half of the method is new on its own. Pillar Security showed hidden instructions in GGUF chat templates in July 2025, researchers measured the same attack on 18 models in a 2026 paper, and EvilModel hid malware in weight bits back in 2021. Those studies used test models in the lab. What is new here is the method seen in real attacks on Hugging Face, with an executable appended after the last tensor and a template switched on days later.
The incident also exposes a gap in how model hubs and runtimes check uploads. GGUF loaders read exactly the byte ranges the header points to and ignore everything else, so an executable parked after the last tensor changes nothing about how the model answers and triggers no warning. The report argues hubs and runtimes can end the method by rejecting GGUF files with bytes after the last tensor and by scanning templates for PowerShell loaders and hidden directives.

