If your team runs local AI models, you probably use Ollama or LM Studio, pull files from Hugging Face, and load them in GGUF format. Last week, that workflow got a new attack vector you haven't heard about yet.
On November 27, security researchers at Malspark published findings from a scan of 3,273,389 Hugging Face repositories. They found five GGUF model files carrying malware. By the time Hugging Face pulled them, the files had been downloaded somewhere between 2,428 and 2,807 times.
Standard antivirus scanners flagged none of them. Neither did the pickle-format scanners that security-conscious teams typically run on model files.
Where the malware hid
GGUF is the format most local AI runners use. When you pull a model for Ollama, LM Studio, or llama.cpp, you're pulling a .gguf file. The format has two main sections: the header, which includes configuration, metadata, and the chat template, and the actual model weights.
Attackers used both hiding spots.
One technique: rewrite the chat template. The chat template is an instruction set baked into the model that tells it how to format conversations. The researchers found templates rewritten to output a PowerShell command and prompt users to run it. If you loaded one of these models and your chat interface followed the template, the model itself was telling you to run malware. For teams with agentic setups where an AI agent drives a terminal, this becomes remote code execution with no user interaction required.
The other technique: append malware bytes after the last tensor in the file. GGUF loaders stop reading when the weight data ends. Anything appended after that point is ignored by the runtime. Standard file scanners don't look there either, so a Windows trojan the researchers named "ollie" sat in those trailing bytes, invisible to everything they tested.
One specific account, Mir2k on Hugging Face, had its Qwen3.5 9B abliterated model and an Inkling-2-Mini variant modified on November 26. The timing matters: someone is actively targeting recently released, trending models and poisoning them after the fact. If you pulled a popular GGUF in the last week without checking when its template was last modified, you should run a scan now.
Why this kept working
The model weights themselves were clean. That is what makes this attack effective. If you ran these models through a standard inference task, they would have worked normally. The malware was in the metadata and the file tail, not in the model's ability to generate text.
A naive security check "tested the model" and found nothing wrong.
There is also a broader pattern worth noting. This is the third distinct supply chain attack vector on Hugging Face this year. The first was fake publisher accounts impersonating real model developers. The second was account hijacking via expired domains. This is the third: legitimate model files with tampered metadata and hidden payloads. Each attack has been different enough that the defenses for the previous one didn't catch this one.
The platform's trust model, where community reputation and star counts signal safety, is not keeping up with the attack surface.
What to do
There is now a specific open-source tool for this: gguf-radar. It scans GGUF files for poisoned chat templates and trailing bytes, and it can rebuild a clean copy of the file with the model weights intact. It is the right scanner for this specific threat and it doesn't require uploading anything anywhere.
Three things worth doing this week:
Run gguf-radar on your existing GGUF files. If you have local models downloaded from Hugging Face, particularly in the last 30 days, scan them. Free, local, fast.
Check the modification history before downloading. On Hugging Face, every file has a commit history. Before downloading a GGUF, click through to the file's commit log and look at when the last modification happened. A model that hasn't been touched in months carries less risk than one modified last week. If the modification date is recent and the commit message is vague ("update model" on a file that shouldn't need updating), dig into it.
Review agentic setups specifically. If you're running an AI agent with terminal access, the chat template attack is a direct code execution path. Any agent that follows model templates without filtering their output and obeys instructions to run shell commands is vulnerable. Check what your runtime does with template-level instructions. Most don't filter them, because until now there wasn't a documented reason to.
One caveat worth noting: the trojan in these five cases targeted Windows. If your inference stack runs on Linux, that specific payload wouldn't execute. But the technique is format-level, not OS-specific. A Linux-targeted payload would work identically, and the fact that this batch was Windows-only says something about who the attackers are targeting, not about whether the attack vector applies to you.
Hugging Face has since blocked the affected models and the download counters are frozen. But the files already downloaded are still sitting on people's machines, unscanned. If your team pulled Inkling-2-Mini or any Qwen3.5 9B variant from Hugging Face in the last week, go check it.
The rule used to be: verify the publisher account, check the star count, look at the model card. That is still the starting point. But it is no longer enough. You also need to verify that the model you downloaded matches what was originally uploaded, that nobody modified the chat template after the fact, and that there is nothing hiding after the weights.
gguf-radar does all three in a few seconds.
We help small teams set up local AI stacks for cost and privacy reasons, and securing that pipeline is part of what we build. If you're running local inference and want a review of what you have and how you're sourcing it, get in touch.