Five public models on Hugging Face carried hidden malware, and they had been downloaded 2,428 times by the time a security researcher finished a scan of the platform. The researcher, who publishes under the handle Root0ne, checked all 3,273,389 public model repositories on November 26, 2026. The five malicious models were still online on November 27.
How did the malicious GGUF models hide malware?
The models use the GGUF format, which is the common file type for running large language models on a local machine. Every GGUF file carries a chat template, a small program that the runtime applies to each prompt. Attackers abused that template. A model could answer normally while the template quietly added instructions that the user never sees. In the worst case, the malicious program traveled inside the model file itself, tucked after the last tensor where loaders never look.
Hugging Face counts downloads, not individuals, so the number of people affected is equal to or lower than 2,428. Still, the scan turned up two campaigns, and one of them was far more dangerous than the other.
What did the Mir2k campaign do on Hugging Face?
The larger campaign, which the researcher calls Mir2k, uploaded two uncensored GGUF models. Each file had a Windows remote access trojan named ollie hidden at its end. On November 26, the uploader rewrote both templates so the model would ask the user to run a PowerShell line. That line found the largest GGUF file in the user's profile, read the hidden bytes from the end of it, and wrote them to a temporary executable.
The timing was deliberate. The Mir2k uploader placed the payload first and waited. On November 22, the first model went up with the executable already appended but with a clean template. A second model followed on November 24 with the same program in compressed form, also with a clean template. Those files sat harmlessly on Hugging Face for days. Then the templates were changed on the morning of November 26, and about nine hours later they were changed again to search the whole user profile for the model file. Anyone who downloaded the models before November 26 received the payload but not the trigger.
The researcher said the uploader's account is new and carries French traces, including the model card, the system prompt inside the template, commit messages and strings inside the malware. The account also created 14 repositories on November 22. Twelve of them were empty placeholders named after models that have not yet been released, including Qwen4-27B, DeepSeek-V4 and Llama-4-Scout, which suggests the account was preparing to fill them later.
Once it runs, the ollie program does a lot. The researcher's static analysis found that it checks for virtual machine and sandbox tools and exits if it finds them. On a real machine, it installs a scheduled task that runs every 10 minutes with the highest privileges, adds watchdog processes to keep itself alive and marks its process as critical, so that ending it crashes Windows. It carries a full copy of the Tor anonymity software and reaches its operator through an onion service. Through that channel it can pull saved passwords from Chrome, Edge and Brave, target the Phantom and MetaMask wallet extensions, log keystrokes, read the clipboard, take screenshots and capture webcam images. When the machine sits idle, it mines Monero. The program also contains a file path from the author's own machine, which the researcher said was left in by mistake.
The second campaign, linked to an account called timdedid, works differently. Three nearly identical copies of a Qwen3 1.7B model were published on November 21 and 22, aimed at security users. The template is the official Qwen3 template with one addition. When the user's latest message contains the phrase "What is," the template inserts a hidden directive that tells an agent with shell access to call its PowerShell tool, download a script from a WordPress site and run it in a hidden window. The directive is visible in Hugging Face's own metadata viewer. The researcher did not recover the second-stage script, and public reputation services had no record of the URL, so what it would have installed remains unknown.
Standard antivirus and pickle scanners did not flag any of the test files the researcher built or the live Mir2k files. To catch these attacks, the researcher released an open-source tool called gguf-radar under the MIT license. It parses the chat template without running it and flags file reads and writes, decompression, process starts, download commands and hidden directives. It then checks for data past the last tensor, non-zero padding and hidden bytes in zero-scale blocks. The tool can also rebuild a clean GGUF file with the model weights unchanged. It can scan Hugging Face links directly by reading only the file header and the end of each file.
How can you protect against malicious GGUF models?
The researcher's advice for people who run community models is blunt. Treat any command a model suggests as untrusted. If a model has access to tools, pass a reviewed template to the runtime so the embedded one is not used. Companies can run incoming models through a scanner before they reach an internal registry or a developer's laptop. The researcher also urged model hubs and runtimes to reject GGUF files with bytes after the last tensor or with non-zero padding, and to extend template scanning to PowerShell and hidden directives.
Este artigo foi escrito com a assistência de IA.
News Factory APP - notícias agênticas para impulsionar seu SEO e AEO.
