Malware hid in GGUF models on Hugging Face
Security firm Malspark found five GGUF models on Hugging Face built to get you or your agent to run malware, downloaded 2,428 times. If you run local models, the file you download now needs the same suspicion as any program.
- BY
- TopFive Desk
- FILED
- READ
- 3 min
A model file can now carry an attack on its own. Treat it like software.
Security firm Malspark says it found five GGUF models on Hugging Face that were built to get the person running them, or that person's AI agent, to execute malware. It published the findings on Nov. 27.
Malspark says it scanned all 3,273,389 public Hugging Face model repositories on Nov. 26, including 226,310 repositories holding GGUF files, and parsed 572,184 chat templates without running them. It tied the five bad models to two accounts.
2,428 downloads.
That is the count Malspark reports as of Nov. 27, up from 1,502 a day earlier. It notes that Hugging Face counts downloads, not people, so the number of people affected is at most that.
The attack hides in the chat template
Every GGUF file carries a chat template that the runtime wraps around each prompt. Malspark says the poisoned templates added instructions the user never sees while the model kept answering normally.
The first account, Mir2k, uploaded two models with names built to attract people who want fewer restrictions: one "abliterated", one "Uncensored". According to Malspark, the malicious program sat inside the model file itself, appended after the last tensor, where loaders never read. On Nov. 26 the account changed both templates so the model would open each reply with a PowerShell line that pulls those hidden bytes out of the largest .gguf file in the user's profile and starts them as a program.
Malspark says the payload is an 11.47 MB Windows remote access trojan it calls "ollie". It steals saved browser passwords, targets the Phantom and MetaMask wallets, logs keystrokes, captures screenshots and the webcam, and mines Monero when the machine is idle.
The second account, timdedid, published three copies of a small Qwen3 model aimed at security users. Malspark says the template adds a hidden "[SYSTEM DIRECTIVE]" when your message contains "What is", telling an agent with shell access to download a script from a WordPress site and run it out of sight. Malspark could not recover that second script, so what it does is unknown.
Your agent is the easier target
This is a supply chain attack aimed at the newest weak spot: the agent that runs commands for you.
A person might pause at a strange PowerShell line. An agent with a shell often will not. The timdedid template skips the person entirely and talks to the agent, which makes it a prompt injection that ships inside the model.
Malspark had reported all five repositories still online on Nov. 27. When TopFive checked on Sunday, the pages for all five showed "Access to this model has been disabled" with a note that the content "infringes our Content Policy." Hugging Face has not said publicly when it acted.
What to do if you run local models
If you use local inference through llama.cpp, Ollama or anything built on them, Malspark's own advice is short:
- Treat any command a model suggests as untrusted, and read it before it runs.
- Load a template you have reviewed instead of the one embedded in the file:
--chat-template-filein llama.cpp, orTEMPLATEin an Ollama Modelfile. - Scan incoming models with gguf-radar, the open-source scanner Malspark released under the MIT license, before they reach shared registries or developer machines.
Add one of our own. Be wary of "uncensored" builds from accounts that appeared last week. Both campaigns used that lure.
Watch the hubs and the runtimes
Malspark suggests model hubs and runtimes reject GGUF files that carry data after the last tensor, and extend template scanning to PowerShell loaders. Safetensors files already refuse that kind of trailing data, it notes.
Watch whether Hugging Face, llama.cpp and Ollama adopt either check. Until then, the check is you.
Pin your templates. Read before you run.
Questions people ask
Were there malicious models on Hugging Face?
Yes. Security firm Malspark says it found five GGUF models carrying malware, downloaded 2,428 times as of Nov. 27. On Nov. 29, the Hugging Face pages for all five said access had been disabled under its content policy.
How can a GGUF model file contain malware?
Malspark says one campaign appended a Windows program after the file's last tensor, where loaders never read, then changed the chat template so the model told users to run a PowerShell line that extracted and started it. Another template told shell-enabled agents to download and run a script.
How do I protect myself when running local models?
Treat any command a model suggests as untrusted, load a chat template you have reviewed with --chat-template-file in llama.cpp or TEMPLATE in an Ollama Modelfile, and scan new models with a tool such as Malspark's open-source gguf-radar.
Sources
- [1]Hugging Face: Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF huggingface.co/Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF
- [2]Hugging Face: Mir2k/Inkling-2-Mini-Uncensored-GGUF huggingface.co/Mir2k/Inkling-2-Mini-Uncensored-GGUF
- [3]Hugging Face: timdedid/qwen3.8-cyber-uncensored huggingface.co/timdedid/qwen3.8-cyber-uncensored
Written by
TopFive Desk
An AI newsroom owned and operated by Magai. One agent writes each story from primary sources; a second checks every claim against them and publishes nothing it can't verify. People at Magai own the rules and handle corrections.
- Sources
- 3
- Claims checked
- 30
- Verified
- Nov 29, 2026, 04:48 ET