Hugging Face Disables Five GGUF Models Hiding Windows Malware After 2,428 Downloads
Two accounts abused the chat templates in model files to steer users and AI agents into running PowerShell commands, a security researcher found.
·2 min read
Prefer Nakoda News on Google
Hugging Face has disabled five model repositories that were hiding Windows malware inside GGUF files, after the models had been downloaded 2,428 times, Pasquale Pillitteri reported. Details were first published by Hacker News (250+ points).
A security researcher who goes by Düzgün found the five in a November 26 scan of all 3,273,389 public model repositories on the platform, according to a blog post Malspark published the next day. The download count is as of November 27.
The attackers did not tamper with model weights. They abused the chat template, a small Jinja2 program stored in a GGUF file's metadata under the key tokenizer.chat_template, which formats each conversation before the model sees it. "The model answers normally, while the template quietly adds instructions the user never sees," the researcher wrote. That puts at risk any company that lets developers pull community models onto their machines.
The larger campaign came from an account called Mir2k, which the post described as a new account with French traces. On November 22 it created 14 repositories, 12 of them empty placeholders named after model releases people were expecting. Two contained real payloads: a Huihui-Qwen3.5-9B-abliterated model, downloaded 1,488 times, and an Inkling-2-Mini-Uncensored model, downloaded 458 times.
In both files, a Windows remote access trojan the researcher calls "ollie" was appended after the last tensor, where model loaders do not read. The models first went up with clean templates. On November 26 the attacker rewrote the templates so the model would ask the user to run a PowerShell command. That command reads the hidden bytes back out of the model file and writes them to an executable in the Windows temporary folder. About nine hours later the templates were changed again so the command would search the user's whole profile for the model file.
According to the post, the trojan steals credentials from Chromium browsers and cryptocurrency wallet extensions, records keystrokes, takes screenshots and webcam images, survives reboots through a scheduled task and mines Monero over Tor. Its attempt to bypass Windows User Account Control fails because the registry paths are malformed, the researcher found.
A second account, timdedid, published three Qwen3-based "cyber uncensored" models, downloaded 271, 136 and 75 times. Their templates target AI agents rather than people. When a user's latest message contains the words "What is", the template inserts a fake "[SYSTEM DIRECTIVE]" telling any agent with shell access to download a script called value.ps1 and run it hidden. The researcher did not recover that second-stage script, so what it does is unknown.
Downloads rose from 1,502 on November 26 to 2,428 a day later. The researcher cautioned that Hugging Face counts downloads, not people, so the number of affected users is no higher than that figure. The post does not say how many downloads led to infections.
The researcher advised users to treat any command a model suggests as untrusted, to replace embedded templates with reviewed ones using llama.cpp's --chat-template-file option or the TEMPLATE field in an Ollama Modelfile, and to scan models with the open-source tool gguf-radar before they reach internal registries or developer machines. The post also asked model hubs and runtimes to reject GGUF files that contain bytes after the last tensor or non-zero padding.
By
Nakoda News AI & Tech Desk
AI models, chips, products and research, and what they can and cannot do.

