Five GGUF models on Hugging Face carried malware where the loader never looks
A scan of 3.27M Hugging Face repositories found five GGUF models carrying hidden malware in chat templates or trailing bytes, with 2,428 downloads counted.
A model can run perfectly and still be a delivery vehicle. A scan published on 27 November on the Malspark blog swept every public repository on Hugging Face and found five GGUF files whose templates or trailing bytes carried code downloaders never asked for. The five had 2,428 downloads by the next day; Hugging Face counts downloads, not people, so affected users are fewer or equal.
What the scan found
The sweep covered 3,273,389 repositories, 226,310 of them GGUF repositories holding 2.56 PB of weights. It parsed 572,184 chat templates statically, without executing one, and read headers and file ends over HTTP Range requests, so nothing was downloaded whole. Manual review removed test repositories, persona prompts and research samples, leaving five, all still online on 27 November.
The larger campaign, Mir2k, created 14 repositories on 22 November. Twelve were empty placeholders named for releases that do not exist yet. The two with files took 1,946 of those downloads; the timdedid trio, three copies of a Qwen3 1.7B model aimed at security users, took the other 482.
Two places to hide a payload
Every GGUF file carries a chat template, a Jinja2 program the runtime applies before the model sees anything. In the timdedid copies it is the stock Qwen3 template plus one clause: on the phrase "What is", it inserts a fake [SYSTEM DIRECTIVE] telling an agent with shell access to fetch and run a PowerShell script. The engine is sandboxed, so nothing has to escape it: the template just adds text, and that text never shows in the chat.
Mir2k used the second hiding place: the header states where the data ends, loaders read only those ranges, and a program can be appended without changing how it loads. Safetensors rejects such files; GGUF does not. Both Mir2k models carry the same 11.47 MB Windows implant, ollie, with Tor inside, lifting saved passwords and wallet keys and mining Monero on idle machines. One sits behind half a megabyte of filler; the other is raw Deflate, so no signature survives.
The fix, and where it stops
On 26 November both Mir2k templates were rewritten so every reply opens with a PowerShell line that reads the payload back out of the model file and starts it. Downloads made earlier hold the program but no trigger, and the model itself gives nothing away.
The author released gguf-radar under the MIT licence on 27 November. It parses templates without running them, reports bytes past where the data section must end, and rebuilds a clean file with the weights unchanged. The durable fix belongs to the hubs: rejecting files with bytes after the last tensor would end this method outright. Until one ships, a command a local model asks you to paste comes from a stranger.

