Five malicious GGUF models sat on Hugging Face on 27 November, downloaded 2,428 times, and nobody had taken them down. That is the headline number from a MalSpark scan of all 3,273,389 public model repositories published the same day. The scan parsed 572,184 chat templates statically and read GGUF headers through HTTP Range requests, so it never downloaded a model in full. Five repos survived manual review, which stripped out security test repos, harmless persona prompts, and published research samples. All five were still online when the post went up.
The interesting part is not that malware lives in model files. The interesting part is the delivery mechanism, and what it says about the trust model the local-LLM ecosystem has quietly built.
Two halves, neither new, combined for the first time
A GGUF file is a header, a metadata table, a tensor table, padding, and weights. Runtimes like llama.cpp and LM Studio read exactly the byte ranges the header points to and ignore the rest. Anything appended after the last tensor is invisible to the loader. It does not change how the model loads. No runtime warns. Safetensors refuses a file whose declared tensors do not fill it exactly, which is why this half of the trick is GGUF-specific.
The other half is the chat template, a small Jinja2 program stored under tokenizer.chat_template that the runtime runs on every prompt before the model sees it. C++ runtimes render it in a restricted engine with no Python, so classic template injection does not reach the OS. It does not need to. The Mir2k template just adds a system message telling the model to begin every reply with a PowerShell line, which a user may copy and run.
MalSpark is careful about credit here, and readers should be too. Pillar Security showed hidden instructions in GGUF chat templates in July 2025. Fogel et al. (2026) measured the attack across 18 models and four inference engines. EvilModel hid malware in the low bits of weights back in 2021. All of that was lab work. What is new is the combination in the wild: an executable appended after the last tensor, plus a template switched on days later.
The Mir2k campaign: plant first, arm later
The repository history is the most unsettling detail. On 22 November, the account Mir2k uploaded Huihui-Qwen3.5-9B-abliterated with the executable already appended but its original, clean template. On 24 November, Inkling-2-Mini-Uncensored followed with the same executable compressed using raw Deflate, again with a clean template. For two to four days the payload sat there with nothing to trigger it.
On the morning of 26 November both templates were replaced within about an hour. Nine hours later both were replaced again, this time searching the whole user profile instead of a fixed path in Downloads. Anyone who downloaded before 26 November got the payload without the trigger. Anyone who downloaded after got both.
Mir2k also created 14 repositories on 22 November. Twelve are empty placeholders named after expected releases: Qwen4-27B, DeepSeek-V4, Llama-4-Scout, gemma-4-27b. They are waiting to be filled when those models ship. That is a squatting play, and it is cheap.
The unpacked payload is an 11.47 MB Windows x64 program called ollie, and 10.25 MB of it is a complete copy of Tor 0.4.9.16. It checks for VirtualBox, VMware and Sandboxie drivers and for usernames like sandbox and test, then exits if it finds them. On a real machine it installs a scheduled task running every 10 minutes at highest privileges, two watchdog processes, and StartupApproved registry keys. Its process is marked critical, so ending it crashes Windows. It tries the fodhelper.exe UAC bypass and fails, because both registry paths were compiled without their backslashes. It steals Chrome, Edge and Brave passwords through DPAPI, though not Chrome’s newer v20 App-Bound encrypted entries. It targets Phantom and MetaMask wallets. It mines Monero with RandomX over Tor when the machine is idle. It names its folder ollie under AppData\Roaming, close enough to Ollama to look familiar. It still contains a path from the author’s own machine: C:/Users/MoH/socks.txt.
The scan counted 1,502 downloads on 26 November. By the next day it was 2,428. The campaign grew by more than half in a single day, almost entirely on the two Mir2k models, while the repos stayed up.
The second campaign is the scarier one
Mir2k is a credential stealer and a miner. Bad, but legible. The timdedid account, which published three byte-identical copies of a Qwen3 1.7B model on 21 and 22 November aimed at security users, is a different shape. Its template uses a trigger phrase in the user’s message to insert a fake [SYSTEM DIRECTIVE] ordering an agent with shell access to download and run a script. That is tool hijacking, the same pattern Fogel et al. documented, and it targets the thing the industry is currently racing to build: coding agents with shell access.
The three timdedid repos pulled 271, 136 and 75 downloads. The second stage was never recovered, so the full capability is unknown. But the mechanism is the one that matters. An agent that reads a poisoned template and has a terminal does not need the user to copy anything.
What this means for anyone shipping local models
The uncomfortable fact is that the ecosystem’s defenses are pointed at the wrong layer. Antivirus engines and scanners that read only the last few kilobytes of a file miss Mir2k’s first payload, which is followed by about half a megabyte of filler. The compressed variant has no recognizable file signature at all, while PowerShell decompresses it in memory with IO.Compression.DeflateStream.
MalSpark released gguf-radar, which detects poisoned templates and hidden bytes without executing anything and rebuilds a clean GGUF with the weights unchanged. That is a useful tool and a damning one, because it implies the runtimes themselves will not tell you. llama.cpp and LM Studio read what the header points to and ignore the rest. Hugging Face counts downloads, not people, so 2,428 is an upper bound on affected users, not a headcount.
The policy question is now live. Five repos, two actors, 3.27 million scanned, and the malicious files were still online a day after the scan. Hugging Face has not said publicly how it plans to detect appended payloads or template rewrites at upload time. The template rewrite on 26 November is the tell that any registry could catch: a file whose weights did not change but whose tokenizer.chat_template did, twice in nine hours. Whether anyone is watching for that signal is the question the next scan will answer.