Two GGUF models on Hugging Face concealed a Windows Trojan in the bytes after their weights, and days after they were published, their templates began displaying PowerShell commands to extract it. An analysis published by Malspark on November 27 found five malicious repositories and 2,428 downloads; the figure counts downloads, not people or confirmed infections.
The investigation examined public repositories on November 26 and noted that all five were still online on the 27th. Hugging Face counts downloads, not unique users, so the 2,428 do not represent individual victims. Malspark estimates the number of affected users at that figure or lower.
Two campaigns, five repositories
The larger campaign, attributed to the Mir2k account, totaled 1,946 downloads across two models: Huihui-Qwen3.5-9B-abliterated-GGUF, with 1,488, and Inkling-2-Mini-Uncensored-GGUF, with 458. Both contained the same malicious Windows program, although the second stored it in compressed form.
The other three repositories belonged to the timdedid account. qwen3.8-cyber-uncensored recorded 271 downloads; qwen3-cyber-UNCENSORED-2, 136; and qwen3-cyber-UNCENSORED, 75. Together, they totaled 482. Their templates were designed to manipulate agents with access to shell tools, rather than extract an executable from the end of the file.
| Repository | Campaign | Mechanism | Downloads |
|---|---|---|---|
| Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF | Mir2k | Hidden executable and extraction command in the template | 1,488 |
| Mir2k/Inkling-2-Mini-Uncensored-GGUF | Mir2k | Compressed executable and extraction command in the template | 458 |
| timdedid/qwen3.8-cyber-uncensored | timdedid | Manipulation of agent tools | 271 |
| timdedid/qwen3-cyber-UNCENSORED-2 | timdedid | Manipulation of agent tools | 136 |
| timdedid/qwen3-cyber-UNCENSORED | timdedid | Manipulation of agent tools | 75 |
The count had risen from 1,502 downloads on November 26 to 2,428 the next day: an increase of more than half in a single day, almost entirely concentrated in the two Mir2k models. These are Hub metrics, not a record of malware executions.
Mir2k uploaded the file first and activated the template later
The repository history shows a staged release. Mir2k created 14 repositories on November 22: two contained the models, while the other 12 were empty spaces named after expected releases, including Qwen4-27B, DeepSeek-V4, Llama-4-Scout, and gemma-4-27b.
On November 22, Huihui-Qwen3.5-9B-abliterated was published with the executable already appended after the final tensor, but with an original, clean template. Inkling-2-Mini-Uncensored appeared on November 24, also with the malicious file hidden inside and the template not yet activating the mechanism.
The change came on November 26. Within about an hour, the templates for both models were changed to make the assistant begin every response with a PowerShell command. That command searched for the GGUF file and extracted data from its end, then wrote it to %TEMP%\d.exe. Nine hours later, the templates changed again: they stopped searching a fixed Downloads path and instead searched the user's entire profile for the model.
This distinguishes downloads made before November 26 from those made afterward: the earlier copies already contained the hidden payload, but their templates did not yet include the instruction that activated it. For the Huihui model, extraction read 11,474,944 bytes starting 12,000,000 bytes before the end of the file. For Inkling, it took the final 4,200,000 bytes and decompressed them.
The ollie implant combines theft and surveillance
Both files led to the same 11.47 MB Windows program, identified as ollie. According to static analysis of its strings, imports, and code, it included a 10.25 MB copy of Tor 0.4.9.16. The program checked for VirtualBox, VMware, or Sandboxie drivers and usernames such as sandbox, malware, and test; if it detected these indicators, it terminated.
On a machine it did not reject, it tried to persist by creating a scheduled task that ran every ten minutes with maximum privileges, along with two watchdog processes. It also modified the registry's StartupApproved keys and marked the process as critical, meaning that terminating it could cause Windows to crash.
The code also tried to bypass User Account Control using fodhelper.exe, but that part did not work: the registry paths had been compiled without the required backslashes. The analysis found the same flaw in the Run key path.
The Trojan wrote Tor to disk and connected to its operators through an onion service, using a ChaCha20 session secured with an embedded pre-shared key. Its capabilities included stealing passwords saved in Chrome, Edge, and Brave via DPAPI; keylogging; reading the clipboard; taking screenshots; screen streaming; and webcam capture. It also targeted the Phantom and MetaMask wallet extensions. Entries encrypted using Chrome's newer v20 App-Bound format remained undecrypted.
When the machine was idle, ollie could mine Monero with RandomX through Tor. The malware named its folders ollie under AppData\Roaming, resembling Ollama, and retained a path attributed to its author's machine: C:/Users/MoH/socks.txt.
timdedid targeted agents with PowerShell access
A day before Mir2k's first release, on November 21 and 22, timdedid uploaded three identical copies of a Qwen3 1.7B model aimed at security users. It also published an Ollama mirror called timdedid/qwen3-1.7b-cyber.
The template was based on the official Qwen3 template but added a condition: if the user's last message contained the phrase What is, it inserted a fake [SYSTEM DIRECTIVE] block. This instructed an agent to call its PowerShell tool, download value.ps1 from a WordPress site, and run it in a hidden window. The README advised against replacing the template, keeping this logic active.
The second script was not recovered, and the public reputation services consulted had no records for the URL. Therefore, what it would have installed is unknown. For the Mir2k models, extraction required someone to run the suggested command; for the timdedid models, the described risk depended on a user or agent running the downloaded script.
The format makes it possible to separate weights from hidden content
In GGUF, the header and tensor table describe where the data required by the model ends. Loaders read those ranges and can ignore bytes appended afterward, without changing the load or displaying a warning. Mir2k exploited this space: in one file, it placed a program followed by about half a megabyte of padding; in the other, it compressed the program with Deflate to remove recognizable signatures.
The appended-payload technique does not work the same way with Safetensors: according to Malspark, its loader rejects files whose declared tensors do not exactly occupy the file. However, template manipulation can also affect Safetensors and PyTorch models, whose templates are often stored in separate files.
The analysis counted 3,273,389 public repositories and 226,310 GGUF repositories, containing 2.56 petabytes of weights. It statically reviewed 572,184 templates without running them, and read file headers and endings using HTTP Range requests, without downloading complete models. After excluding test repositories, research samples, and harmless personality prompts, five malicious cases remained.
gguf-radar analyzes and reconstructs files
Root0ne released gguf-radar as an open-source tool under the MIT license. The program inspects templates without running them, searches for suspicious directives, and calculates where the model data should end to detect appended content. It also checks for non-zero padding and certain zero-scale blocks; it can reconstruct a GGUF with 32-byte alignment, remove data after the last tensor, and normalize those blocks while keeping the dequantized weights identical.
The tool analyzes local files and public Hugging Face models using partial requests. A Hugging Face token can be used for private models or higher query limits; checking zero-scale blocks requires the complete file and is done locally. It can also examine templates for Safetensors and PyTorch models.
The project page states that GGUF Radar requires Python 3.10 or later and provides four results: CLEAN, SUSPICIOUS, MALICIOUS, and ERROR. Suspicious or malicious results return exit code 2, while an error returns 1, allowing a continuous integration pipeline to be stopped.
Malspark recommends treating any command suggested by a local model as untrusted and using a reviewed template when granting tools to an agent. It also proposes that model hubs and runtimes reject GGUF files with bytes after the last tensor or non-zero padding, and expand their template checks. At the time of publication, all five repositories were still online on Hugging Face.
Sources: Malspark, ExplainX.ai, GitHub