Five models on Hugging Face carried a Windows trojan tucked in behind their weights, and by November 27, 2026 they had been downloaded 2,428 times. Antivirus engines and pickle scanners raised no alert, and llama.cpp loaded them without a warning: the attack lives in two parts of the GGUF file nobody checks, the chat template and the bytes left over at the end.
The finding comes from Malspark, which on November 26 scanned all 3,273,389 public model repositories on Hugging Face, including 226,310 GGUF repositories holding 2.56 PB of weights. It never downloaded a full model: it read headers and file tails through HTTP Range requests and parsed 572,184 chat templates without executing them.
Two places in a GGUF the runtime never shows you
A GGUF file has a header, a metadata table, a tensor table, padding and the weights. Runtimes such as llama.cpp and LM Studio read exactly the byte ranges the header points to and skip the rest. That leaves two gaps:
- The chat template (
tokenizer.chat_template) is a small Jinja2 program that builds the text the model reads before every reply. Whatever it adds never shows up in the chat window. No sandbox escape is needed: ordinary template logic that injects instructions is enough. - Anything after the last tensor is never read, so a whole executable can sit there without changing how the model behaves. Safetensors rules this out, because its loader rejects a file whose declared tensors don't fill it exactly.
Neither trick is new on its own: Pillar Security showed hidden instructions in GGUF templates in July 2025. What's new is seeing them in real attacks, and combined.
Mir2k: plant the binary, arm it days later
The main campaign, Mir2k, created 14 repositories on November 22. Twelve were empty placeholders named after expected releases (Qwen4-27B, DeepSeek-V4, Llama-4-Scout, gemma-4-27b), ready to be filled the day those models ship. The other two were "uncensored" models:
| Model | Uploaded | Hidden payload | Downloads (Nov 27) |
|---|---|---|---|
Huihui-Qwen3.5-9B-abliterated-GGUF | November 22 | Executable after the last tensor | 1,488 |
Inkling-2-Mini-Uncensored-GGUF | November 24 | The same, Deflate-compressed | 458 |
For four days the binary sat inside the files behind a clean template, with nothing to start it. On the morning of November 26 Mir2k swapped both templates: the model now gets a French system message telling it to open every reply with one PowerShell line, copied character by character. That line finds the largest .gguf in the user profile, reads a block from the end of the file, writes it to %TEMP%\d.exe and runs it. Anyone who copies and pastes it is infected without having downloaded anything but the model. Between November 26 and 27, downloads jumped from 1,502 to 2,428, almost all of them on these two models.
The binary, ollie, is 11.47 MB, 10.25 MB of which is a copy of Tor 0.4.9.16. It hides from virtual machines and sandboxes, schedules itself every 10 minutes with the highest privileges, marks itself as a critical process (killing it crashes Windows), steals saved passwords from Chrome, Edge and Brave and Phantom and MetaMask wallets, logs keystrokes, grabs the screen and webcam, and mines Monero while the machine is idle. It keeps its files under AppData\Roaming\ollie, a name picked to pass for Ollama.
timdedid: the template talks to your agent
The second campaign targets people who hook the model up to an agent with shell access. On November 21 and 22, the account timdedid published three identical copies of a 1.7B Qwen3 aimed at security users. When the latest message contains "What is", the template injects a [SYSTEM DIRECTIVE] telling the agent to call its powershell tool, download a script and run it in a hidden window. The README advises against replacing the bundled template, which is exactly what keeps the trigger alive. The second stage was never recovered, so what it installed is unknown.
What to take away
The core lesson is that a model is code, even when it ships as a weights file. The template runs on every request, and the usual checks (an antivirus scan, making sure there's no pickle) look at neither the template nor the end of the file. Mir2k's pattern of planting first and arming later also breaks the idea that reviewing a model once is enough: what you downloaded on November 22 is not what was being served on November 26.
If you run models locally or feed them into an internal registry:
- Don't trust the embedded template of community models. In llama.cpp,
--chat-template-fileloads a reviewed template instead of the one in the metadata; in Ollama, theTEMPLATEdirective in aModelfiledoes the same. - Treat any command the model suggests as untrusted, especially when it has shell tools.
- Check GGUF files before they reach the registry or a laptop. Malspark has released gguf-radar under the MIT licence. It parses the template without running it, flags bytes after the last tensor and non-zero padding, and rebuilds a clean GGUF with identical weights:
pip install git+https://github.com/Root0ne/gguf-radar
gguf-radar scan ./model.gguf
gguf-radar scan https://huggingface.co/owner/model
gguf-radar sanitize suspicious.gguf -o clean.ggufThe caveat that matters: gguf-radar comes from the same author as the report, and so do the YARA rules and indicators. Treat it as one more filter, alongside pinning the template, not as proof that a model is clean.
What doesn't carry over
The numbers are small by Hugging Face standards: five repositories out of more than three million, and Hugging Face counts downloads, not people. The risk isn't today's volume. It's that Mir2k's twelve empty repositories are waiting for the next big releases, exactly when the most people grab third-party quantizations without checking who uploaded them.