Poisoned GGUF Models on Hugging Face Hit Over 2,400 Downloads: How to Check Yours
Five GGUF models hid a Windows spyware loader or agent traps in their chat templates. Hugging Face pulled them. Here’s who’s at risk and how to check.
https://averagetechnerds.com/poisoned-gguf-models-hugging-face/

Run AI models on your own PC? Then you’ve probably grabbed a GGUF file off Hugging Face. It’s the format LM Studio, llama.cpp and Ollama all load. A security researcher just found five of them built to turn on whoever downloaded them. Two had a Windows spyware program stuck onto the end of the model file itself. Three were rigged to talk AI agents into running a script. Between them they’d been downloaded more than 2,400 times before Hugging Face pulled all five.
Five poisoned models, two very different traps
Finding five bad models meant going through 3.27 million model repositories. Malspark, a security research site, did it on November 26 without downloading a single model in full. It read the header at the front of each GGUF and the bytes at the very end. Anything that didn’t add up got flagged. Five made it through the manual review, from two accounts with very different plans.
Mir2k had the bigger plan. Its two models wear exactly the labels people go looking for: “uncensored”, and “abliterated”, which means a model with its refusals stripped out. The same account also parked twelve empty pages under big model names people search for, like Qwen4-27B and DeepSeek-V4, ready to be filled later.
The second account, timdedid, aimed at a smaller crowd: people who use AI for security work. It posted three identical copies of a Qwen3 1.7B “cyber” model, plus a copy on Ollama. Its trick doesn’t touch you directly. It goes after AI agents, the setups where a model can run commands on your computer.
Take the download count with a pinch of salt: one person can grab the same model twice, so fewer people actually got one.
How a model file hides a program
A GGUF file is mostly model weights, the numbers that make the model work. Up front there’s a header that tells your software exactly where those weights start and stop. Runtimes like llama.cpp and LM Studio read what the header points to and skip anything else. So if someone tacks extra data onto the end of the file, nothing reads it, nothing breaks, and nothing warns you.
That’s where Mir2k put its malware: a complete Windows program glued on after the last piece of the model. In the second model it was compressed, so it doesn’t even look like a program to a quick scan. Malspark tried common antivirus and model scanners on the live files, and none of them flagged it.
Sitting at the end of a file, it can’t run itself. That’s the job of the chat template, a small piece of code inside every GGUF that formats your conversation before the model sees it. Until November 26 both models carried their original, clean templates, so anyone who looked at the template before then saw nothing wrong. That morning, days after the models went up, Mir2k quietly swapped in new ones. The new ones add a hidden instruction, in French, telling the model to start every reply with one PowerShell line. Copy that line into a terminal and it hunts down the model file in your user folder. Then it reads the hidden program out of the end, saves it as a new file and starts it.
So loading the model was never enough to get infected. You had to run the line. The timdedid models skip that step by going after AI agents. When your message contains “What is”, the template slips in a fake system directive telling the agent to download and run a script in a hidden window.
What the hidden program does
Malspark calls Mir2k’s program ollie, and it keeps its files in folders called ollie under AppData\Roaming, a name that’s easy to mistake for Ollama at a glance. It’s a remote access trojan, the kind of program that hands someone else control of your PC, and it’s a busy one.
Once it’s running, it digs in, and it’s built to be hard to kill. It quits if it thinks it’s inside a virtual machine or a sandbox, which is where researchers watch malware. On a real PC it sets up a scheduled task that runs it every ten minutes, keeps two helper processes around to restart it, and marks itself so that ending it crashes Windows. It talks to its owner through Tor, the anonymity network, carrying a full copy of Tor inside it.
Then it goes shopping. It pulls saved passwords from Chrome, Edge and Brave, though Chrome’s newest encrypted entries are out of its reach. It goes after the Phantom and MetaMask crypto wallet extensions. It can log keystrokes, read your clipboard, take screenshots, stream your screen and capture your webcam. And when you step away, it mines the Monero cryptocurrency on your hardware.
On a Mac or Linux box, the Mir2k trap has nothing to grab: the program Malspark pulled out is a Windows one, and the line that starts it is PowerShell. The timdedid models are harder to call. Malspark never recovered the script they fetch, and it was written for agents that have a PowerShell tool, so if you’ve handed an agent that kind of access on any machine, treat that model as hostile and don’t wait to find out what the script does.
How to check your own models
Start with your downloads. Have either Mir2k model, or any of the three timdedid “cyber” models (qwen3.8-cyber-uncensored, qwen3-cyber-UNCENSORED and qwen3-cyber-UNCENSORED-2)? Delete it. A Mir2k copy from before November 26 has the hidden program inside but not the template that runs it. It’s still not something to keep.
Then think back. Did a model ever open its answer with a long PowerShell line that you copied and ran? Did you point an agent with shell access at a timdedid model? If not, deleting the file is the end of it. If you ran a Mir2k line, check for an “ollie” folder under AppData\Roaming and a scheduled task you don’t recognise. If an agent ran the timdedid directive, look for C:\Windows\Temp\payload.ps1, and since nobody knows what that script installs, treat the PC as compromised. Malspark’s post lists the full set of file names, hashes and network addresses to look for.
Did ollie run? Then assume the worst. It reads saved browser passwords and wallet extensions, so change your important passwords from a different, clean device, and move any crypto out of wallets that were on that machine.
For the files themselves, there’s a free scanner from the same researcher, gguf-radar. Install it with pip, then point `gguf-radar scan` at a .gguf file or a Hugging Face link. It checks the template for commands and the end of the file for hidden data, and for a link it reads only the parts it needs. It can rebuild a copy with the hidden data cut off, but that copy keeps the original chat template unless you tell it to swap or drop it, and the template is the part that starts the malware. It’s the researcher’s own tool, so keep that in mind, but the code is public.
Pulled from Hugging Face, still on Ollama
Go to one of the Mir2k pages now and you get a box that says “Access to this model has been disabled,” with a pointer to Hugging Face’s content policy. All five of them read that way. That stops new downloads, but a copy already on your drive stays exactly as it was.
Ollama is another story. Its page at ollama.com was still up on the evening of November 28, with more than 100 downloads. And it isn’t a lookalike. The model file Ollama serves for it carries the same fingerprint, the file hash, that Malspark lists for the timdedid models, so it’s the same poisoned file under a different roof. If you pull models through Ollama’s library, that’s the one to avoid: timdedid/qwen3-1.7b-cyber.
All of the detail about how the malware behaves comes from that one teardown, and no second lab has published its own yet. Hugging Face pulling every repo Malspark named is a good sign the main finding holds up.
Why one rule won’t close the hole
If you’ve been eyeing Safetensors, the other common format for model weights, there’s some good news there. Its loader refuses a file whose weights don’t fill it exactly, so a model with Mir2k’s program glued onto the end would be rejected outright. The template half still applies, though. Safetensors models keep their chat template in a separate file, usually tokenizer_config.json or chat_template.jinja, and Malspark says the same kind of hidden instruction can go in there.
And GGUF has other hiding spots. Malspark built test files that hide data in three other places, none of which the real malware used. One stretches the gap between the file’s index and the first weights, a gap loaders skip without checking that it’s empty. Another tacks a ZIP archive onto the model, so the same file still loads as a model and can also be imported as Python code. The third hides bytes inside blocks of weights that are all zero anyway, so the model’s numbers don’t change at all. In every case the model loads normally in llama.cpp with no warning.
That’s why a single rule from Hugging Face, like rejecting files with extra data at the end, wouldn’t be enough. It would stop Mir2k’s trick and the tacked-on ZIP, but the padding gap and the zero blocks would still be open. A hub would have to check that those gaps are really empty, too.
Not Hugging Face’s first malware scare
Hugging Face has had to pull malicious models before, and twice this year the bait looked a lot like this. In May, a repository called Open-OSS/privacy-filter copied the model card of OpenAI’s real Privacy Filter model nearly word for word and climbed to the top of Hugging Face’s trending list. Its counter hit about 244,000 downloads before Hugging Face disabled it, though HiddenLayer, the security firm that caught it, says that number was almost certainly pumped up to make the repo look legit. Its setup scripts fetched an information stealer for Windows.
Then came October. Pluto Security tracked 31 malicious repositories across seven accounts, built to mine cryptocurrency and open a backdoor on GPU servers. With linked models, they passed 32,000 downloads. The campaign came back within days of a takedown, and its second wave was still up eight days after Pluto reported it.
What sets the GGUF case apart is where the danger lives. Those earlier attacks needed you to run Python that shipped with the model, either a setup script or code loaded through an option called trust_remote_code. With Mir2k and timdedid, nothing ships beside the model. The model file itself carries the trap.
None of the pieces were brand new. Hidden instructions in GGUF chat templates had already been shown off in a lab by Pillar Security back in July 2025, and researchers had tucked malware into model weights years before that. The difference this time, as Malspark tells it, is that it turned up for real on Hugging Face. A real Windows program sat on the end of the file. The template went bad after the fact.
Habits that would have stopped both
Read before you run. Never paste a command a model hands you into a terminal without reading it first. A model that opens every answer with the same long PowerShell line is a red flag on its own. The Mir2k trap needed you to copy and run exactly that.
Agents need a firmer hand. If you give a local model tools that can run commands, the chat template inside the GGUF file is part of what it obeys. Swap it for a template you trust, which is also what Malspark recommends: llama.cpp takes one with `--chat-template-file`, and Ollama lets you set your own `TEMPLATE` in a Modelfile. That takes the file’s own template out of the loop. Whatever was hidden in it goes too.
Then look at who’s offering the model. Both campaigns leaned on bait: “uncensored”, “abliterated”, “cyber”, and empty placeholder pages under big model names. Brand-new accounts with no history posting exactly what people are searching for deserve a second look. The well-known uploaders who’ve been posting for years are a safer bet than an account that appeared last week.
And the fix that would end this trick for good isn’t yours to make. Malspark wants model hubs to reject GGUF files with extra data after the last tensor, and to scan templates for download and run commands. Until they do, the checks above are on you.
Nerd Alert
Your Turn
What are YOUR thoughts
What have your experiences been? Let us know.






