Malicious GGUF models on Hugging Face infected 2,428 downloads
A researcher found five GGUF models smuggling a Windows RAT past Hugging Face, hidden in unread trailing bytes and triggered through a poisoned chat template.
Security researcher Düzgün scanned roughly 3.27 million public Hugging Face repositories, including 226,310 holding GGUF files, and found five models carrying malware. Between them they had drawn 2,428 downloads, published on Malspark on 27 November.
The main campaign, run from an account called Mir2k, appended an 11.47MB Windows remote access trojan after the last tensor in two models, including one named Huihui-Qwen3.5-9B-abliterated-GGUF. GGUF loaders stop reading at the final tensor, so the file loads and runs as a normal model. The attacker then edited the chat template so the model’s own output told the user to run a PowerShell command that extracts and launches the hidden executable, which bundles Tor, credential theft, webcam capture, keylogging and Monero mining. A second account, timdedid, used a similar trick on three smaller Qwen3 1.7B variants, with a “what is” trigger phrase hidden in the template pointing at compromised WordPress infrastructure; that second-stage payload wasn’t recovered.
The researcher released gguf-radar, an open-source, MIT-licensed tool that statically inspects a GGUF file’s chat template and trailing bytes without executing it, and can rebuild a clean copy with the original weights intact.
Why it matters: if you or your tooling pull GGUF models from Hugging Face to run locally with llama.cpp, Ollama or similar, the file loading cleanly is no guarantee it’s clean. Treat an “uncensored” or “abliterated” model from an unfamiliar uploader the same way you’d treat an unverified npm package, and scan before you run.
The caveat: this is five models out of 226,310 GGUF repositories, and Hugging Face’s own response to the disclosure isn’t detailed in the source.