Malicious GGUF Models: Check Hugging Face Files
Last updated 2 December 2026.
On 27 November, security researcher Malspark published a scan that found malicious GGUF models on Hugging Face. The scan identified five repos with 2,428 downloads, including a fake Inkling 2 Mini Uncensored GGUF riding the hype around the small open model that had been everywhere that month.
Keep the scale in perspective: there were five repos, the payloads only affected Windows, and Hugging Face had disabled all five by 29 November.
But that won't help anyone who already downloaded one. These models also use an attack method that challenges the usual assumption that weights can't run code.
Quick answer
Security researcher Malspark found five malicious GGUF model repos on Hugging Face with 2,428 downloads, including a fake Inkling 2 Mini. They hid a Windows remote-access trojan after the final tensor and agent-hijacking instructions in edited chat templates. Hugging Face disabled all five by 29 November 2026; anyone who downloaded one should check their files.
How do malicious GGUF models actually work?
A GGUF file contains more than tensors. It also includes a chat template, a small Jinja program that a runtime such as llama.cpp, Ollama, or LM Studio uses to format each conversation. Whoever controls the template can control the hidden text the model sees before your prompt. Both campaigns abused this template.
Campaign 1: Mir2k, a trojan hidden after the last tensor
- The payload: A Windows x64 remote-access trojan that Malspark calls ollie was appended after the file’s final tensor. Loaders stop reading at the last tensor, so the model still runs normally.
- The switch: The repos went up on 22 and 24 November with clean templates. On 26 November, the templates were changed to include a hidden French system message.
- The trigger: The message tells the model to start every reply with a PowerShell line. The current line finds the largest
.gguffile in your user profile, cuts out the trailing bytes, and writes them to%TEMP%\d.exe. The first armed version read from a fixed path in Downloads. In the Huihui repo, the line reads 11,474,944 bytes starting 12,000,000 bytes from the end. In the Inkling repo, it reads the last 4,200,000 bytes, which are Deflate-compressed.
So the model gives you a command, and you or your agent runs it. According to Malspark’s static analysis, the RAT then:
- Exits if it detects a virtual machine or sandbox.
- Stays active through a scheduled task that runs every 10 minutes and Run registry keys.
- Connects to an onion service using embedded Tor 0.4.9.16.
- Steals browser passwords and targets Phantom and MetaMask wallets.
- Logs keystrokes, captures screenshots and webcam images, and mines Monero while the machine is idle.
Campaign 2: timdedid, aimed at coding agents
This is the more concerning of the two attacks because it targets coding agents.
The timdedid repos contain three copies of Qwen3 1.7B, plus a mirror on Ollama. If a message includes the words What is, the template quietly inserts a fake [SYSTEM DIRECTIVE]. It tells any coding agent with shell access to download value.ps1 to C:\Windows\Temp\payload.ps1 and run it in a hidden window.
What is is common in chat prompts, so ordinary questions can trigger the directive.
You won’t see the text, but your agent will. Nobody has recovered the second stage, so its purpose is unknown. The detection rule in the post points to technoarteng.com.
The five repos, all disabled now:
| Repo | Downloads |
|---|---|
| Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF | 1,488 |
| Mir2k/Inkling-2-Mini-Uncensored-GGUF | 458 |
| timdedid/qwen3.8-cyber-uncensored | 271 |
| timdedid/qwen3-cyber-UNCENSORED-2 | 136 |
| timdedid/qwen3-cyber-UNCENSORED | 75 |
Real-world exposure: who should actually worry
The scan covered 3,273,389 public model repos, including 226,310 GGUF repos totalling 2.56 PB. It parsed 572,184 chat templates without running them. Five cases of Hugging Face GGUF malware are a tiny hit rate, but that’s no reason to relax.
Notice the pattern: every repo was labelled abliterated, uncensored or cyber. Those are the terms people search for when they want a model with its guardrails stripped off.
The repos were also usually re-uploads from accounts few people had heard of. The attackers targeted a pond where people were already skipping checks.
The timing is worth noting, too. Downloads rose from 1,502 on 26 November to 2,428 the next day, almost all for the two Mir2k models. Hugging Face counts downloads, not unique people, so the number of affected machines is unknown.
You’re most exposed if:
- You’re on Windows. Both payloads are Windows-only.
- You downloaded any of the five repos above, or the timdedid Ollama mirror.
- You let a coding agent run shell commands against a local model using its built-in template.
That last case goes beyond the five repos: template-level prompt injection can affect any agent that trusts its own model. Pillar Security, Splunk, and JFrog have also written about poisoned GGUF templates. Malspark says it found no earlier public report of an appended executable activated by a delayed template edit.
Why a one-time upload scan misses this
A one-time upload scan can miss malicious GGUF models because the files may be changed after they’re uploaded. The Mir2k repos were clean when they went up.
The trojan bytes sat after the last tensor from day one, but nothing told a model to touch them. Two to four days later, a template edit armed them.
The chat template lives in the GGUF header, so editing it creates a new file with a new hash. Malspark’s hashes show three versions for each Mir2k model: the upload, the first armed version, and the current file. Hubs and registries need to re-scan every commit, not just new repos.
Malspark doesn’t cover this, but you can use the same fact to protect yourself. Pin a model to a specific revision instead of tracking main, and a later template swap can’t reach you. With the Hugging Face CLI, run huggingface-cli download <repo> --revision <commit-sha>.
How to check your files for GGUF chat template poisoning
- Check for Malspark’s listed files and activity. Look for
%TEMP%\d.exeand%APPDATA%\ollie\rat.log. Also check whether anything is listening on Tor’s SOCKS port 9050:
netstat -ano | findstr 9050
Treat any hit as a sign that the machine is compromised. Reimage it, then rotate browser-saved passwords and move any crypto wallet funds from a clean device.
- Compare your local GGUF hashes. On Windows, run:
Get-FileHash .\model.gguf -Algorithm SHA256
Compare the result with Malspark’s published hashes. The armed files are:
- Huihui, current:
c3d72696afe76e0dedf4adf10ef7ea09634d23416c9601b0462ce528fb4a89ab - Huihui, first armed:
9d88149b7777a1ca0210e8dc6b2e5a0d9bb7b5971d305025f5b2731cf8a39cf9 - Inkling, current:
fafd6dd22e1375e6613a3038c1a4a8c1b554544c1d423cfc570a81192865c841 - Inkling, first armed:
c7170a39c92b3dca10bcb23b81014cfc4a1c1429be83b427ba6b23a4ecdf09a1 - timdedid, shared by all three repos:
6037244a718f2afc2e9eabf6ab253f53fe7b9552792b3533956d63e43e4ac058 - The carved RAT,
d.exe:90bbb476eadf0edb28f7042204cbf90065b1112f4152e4f335e85dd76788bf68
- Inspect the GGUF chat template. In llama.cpp, use the
gguf-dumptool from theggufPython package to read thetokenizer.chat_templatemetadata. In Ollama, runollama show <model> --template. Treat mentions of PowerShell, a URL, or a system directive you didn’t write as red flags.
- Replace templates you haven’t checked. Don’t trust the template baked into a community model. In llama.cpp, use
--chat-template-file; in Ollama, setTEMPLATEin your Modelfile. Use a template you’ve read yourself.
- Scan each GGUF for malware and trailing data. A clean GGUF ends after its last tensor and alignment padding. Extra bytes beyond that point, or non-zero padding, are signatures of the Mir2k trick. Malspark publishes YARA rules for checking this. It also points to the free scanner gguf-radar, which is under the same GitHub account as the report’s author, so weigh that accordingly.
What are the limits of this malicious GGUF report?
- It relies on one source. The findings come from Malspark's write-up and static analysis. I haven't found a public statement from Hugging Face, and the post doesn't say whether Hugging Face was notified before the takedown.
- The second stage is unknown. We don't know what timdedid's
value.ps1actually did. - The scanner isn't an independent check. The recommended tool comes from the same author as the research. It may be fine, but it doesn't provide a second opinion.
- No macOS or Linux payload was found. That doesn't rule out using the template trick to target those systems. It would require a different PowerShell line.
What should you do about malicious GGUF models? Verdict and action plan
Weights are data. Templates are code. That split is what makes malicious GGUF models work.
If you run local models, especially uncensored re-uploads, do three things today. Pin a chat template you've read instead of using the one in the file. Never let an agent auto-run a shell command a local model suggested. And prefer quantizations from the original lab or a quantizer you recognize over a random account with UNCENSORED in the name.
If you build agent tooling, the bar just went up. Your sandbox must assume the model itself can be hostile, not just the web pages it reads.
Frequently asked questions
How many malicious GGUF models were found on Hugging Face?
Five repos with a combined 2,428 downloads, according to Malspark's scan published on 27 November 2026. Hugging Face disabled all five by 29 November.
Can a GGUF model file run code?
The weights don't execute, but these files carried a Windows payload appended after the last tensor and a chat template that injected hidden instructions into the model's system prompt.
Who is at risk from the malicious GGUF models?
Windows users who downloaded one of the five repos, and anyone running an agent with a poisoned chat template. Check the hashes and templates of any GGUF files you pulled in late November.
Keep reading
- AI agents and MCP guide (risks section)
- AI tool pricing data
- AI glossary
- Best AI tools by category: prices and free plans
- OpenRouter ZDR: 125 Endpoints Pulled and What to Fix
- Lovable Supabase Data Exposure: 24,664 Apps Leaked
- AI Workers Demand the US Build Slowdown Infrastructure for Frontier
- 5 AI Security Tool Types That Win on Restraint
Built an AI tool? List it on Tool Directory AI for free, or choose a Featured ($19) or Premium ($49) one-time listing for faster review. See listing plans.
About the author
Sai Goutham Reddy is co-founder of Tool Directory AI. He covers new AI launches, model releases and how teams put AI tools to work. More from Sai · How we review tools
Tools in this post
Written by
Co-founder of Tool Directory AI. Tests and reviews the AI tools listed here.

