Malspark scan finds five malicious GGUF models on Hugging Face
The scan covered all 3,273,389 public model repositories. Models from two accounts had 2,428 downloads in total as of 27 November, and at most as many users. Two of the models contained Windows malware.
Malspark scanned all 3,273,389 public model repositories on Hugging Face on 26 November and published the results on its blog on 27 November. It found five malicious GGUF models with 2,428 downloads in total as of 27 November. The models came from two accounts. Hugging Face counts downloads, not people, so the number of users can be no higher.
Models that run locally are often distributed as GGUF files. Besides the model weights, each file contains a chat template, a small Jinja2 program. The runtime uses the template to format every conversation before the model reads it. The attackers did not use the template to break into the operating system. Instead, they used it to add instructions to the conversation that the user cannot see.
The Mir2k account appended Windows malware to two model files advertised as uncensored. Runtimes such as llama.cpp and LM Studio read only the bytes that the file header points to, so they ignore any data after the last tensor (the weight table) and give no warning about it. In one of the models the program was compressed. Antivirus engines and scanners that check the last few kilobytes of a file do not see it, Malspark said.
Mir2k published the models on 22 and 24 November with clean templates and replaced the templates on the morning of 26 November. The new templates instruct the model to begin every reply with a PowerShell line. If the user copies and runs the line, it extracts the program from the end of the model file and launches it. Files downloaded before 26 November contain the malware but not the trigger. According to static analysis, the program sends passwords saved in Chrome, Edge and Brave, targets the Phantom and MetaMask wallet extensions, supports keystroke logging and mines Monero over the Tor network.
The timdedid account published three identical copies of a Qwen3 1.7B model aimed at security users. Their template tries to hijack an agent that has permission to run commands. When the user’s message contains the phrase ‘What is’, the template inserts a hidden instruction telling the agent to download a script with its powershell tool and run it in a hidden window. The script could not be recovered, so its purpose is unknown.
The download figures in the table do not show how many machines the malware ran on.
| Repository | Campaign | Downloads |
|---|---|---|
| Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF | Mir2k | 1,488 |
| Mir2k/Inkling-2-Mini-Uncensored-GGUF | Mir2k | 458 |
| timdedid/qwen3.8-cyber-uncensored | timdedid | 271 |
| timdedid/qwen3-cyber-UNCENSORED-2 | timdedid | 136 |
| timdedid/qwen3-cyber-UNCENSORED | timdedid | 75 |
Source: Malspark, Hugging Face download counts on 27 November 2026.
Malspark advises treating every command a model suggests as untrusted. If the model has tools, users can replace the template embedded in the file with a reviewed one: in llama.cpp with the --chat-template-file option, and in Ollama with the TEMPLATE section of the Modelfile. Anyone who downloaded one of the models should check their machine against the study’s indicators of compromise and scan their .gguf files, Malspark said.
For scanning, the study points to gguf-radar, an open-source tool by the user @Root0ne. It inspects the template without running it, flags data after the weights and can build a clean copy of the file with the weights unchanged. Replacing or removing the template is optional; without that step, the hidden instruction in the timdedid models, for example, stays in the copy. The tool has been tested only by its author. It requires Python 3.10 or later, and installation instructions are on GitHub (Root0ne/gguf-radar).
Read more: Models