Security ·

Malware hidden in GGUF models on Hugging Face: 2,428 downloads

What happened

Malspark scanned about 3.27 million public repos on Hugging Face and found five GGUF models with malicious content, uploaded by two attackers. The first trick is a hidden program (a Windows trojan called "ollie", with password theft and a crypto miner) appended after the last tensor, where the model loader never reads it. The second is a "poisoned" chat template, the template added to every prompt, which quietly tells agents with terminal access to download and run a script. All the infected repos are "uncensored" or "abliterated" versions of popular models, including a fake Inkling 2 Mini.

Why it matters

If you use Ollama or llama.cpp, download models only from known authors (Unsloth, official accounts). Set your own chat template via `--chat-template-file` or the TEMPLATE field in a Modelfile, so the one embedded in the file isn't used.

Sources

More from this brief