Skip to content
senn-techsenn-tech
Back to blog
Security
Security and data protection2026-11-30· By Franz Senn

Malicious GGUF models on Hugging Face: a follow-up measurement three days after the disclosure

On November 27, 2026, an analysis by security firm Malspark documented five Hugging Face repositories shipping GGUF models with poisoned chat templates. Two carried a Windows trojan appended after the weights. At publication the five stood at 2,428 downloads combined. Three days later we measured again ourselves: files disabled, the download counter up 74 percent, the accounts visible again hours later, and a mirror in the Ollama registry still pullable.

In short: Chat template poisoning means a model file whose embedded chat template carries instructions the user never sees. In these GGUF cases an executable program additionally sits after the weights, behind the last tensor, where no loader reads anymore. The template supplies the command that unpacks those bytes on the user's machine and starts them. All the while, the model visibly works exactly as advertised.

From search to trojanSearch for uncensoredor cyberresult list on Hugging FaceDownload and run themodelthe template comes alongFirst ordinary prompttemplate appends hidden textModel prints aPowerShell linean agent or the user runs itRAT and miner startno admin rights needed
Nothing looks wrong until step three, and the trigger is an ordinary input. Mir2k makes the user run the printed line; timdedid makes an agent with shell access execute its own tool call. (Quelle: Malspark analysis, Nov 27, 2026)

What the analysis found

The author (Duzgun, @Root0ne) scanned all 3,273,389 public model repositories on Hugging Face on November 26, 2026, including 226,310 GGUF repositories holding 2.56 petabytes of weights, and read 572,184 chat templates statically, without running any of them. After removing test, research and persona repositories, five repositories in two campaigns remained.

The first campaign runs under the new account Mir2k, whose model cards, commit messages and string fragments are French-language. The account opened 14 repositories on November 22 alone, twelve of them empty placeholders named after expected releases: Qwen4-27B, DeepSeek-V4, Llama-4-Scout, gemma-4-27b. The owner filled two of them with models that already carried the trojan: Huihui-Qwen3.5-9B-abliterated-GGUF and Inkling-2-Mini-Uncensored-GGUF. The templates stayed clean for days; only on November 26 did Mir2k replace both within an hour, and both again nine hours later. Downloads taken before November 26 therefore contained the payload without a trigger.

The trojan calls itself ollie, weighs 11.47 MB, carries a full copy of Tor 0.4.9.16 and was in no public scanner index. It exits on VirtualBox, VMware and Sandboxie drivers and on analysis usernames. On a real machine it installs a scheduled task every ten minutes, two watchdog processes, rewritten StartupApproved keys and a critical-process flag: ending it takes Windows down. Its fodhelper.exe UAC bypass fails because two registry paths were compiled without backslashes. Over Tor it sends browser passwords decrypted through DPAPI from Chrome, Edge and Brave wherever DPAPI opens them, Chrome's v20 App-Bound entries stay closed; it targets the Phantom and MetaMask extensions, captures keystrokes, clipboard, screen and webcam, and mines Monero on idle machines. Its folders are named ollie under AppData\Roaming, close enough to the tool Ollama to look familiar.

The second campaign, account timdedid, uploaded three byte-identical copies of a Qwen3 1.7B model on November 21 and 22 plus the Ollama mirror timdedid/qwen3-1.7b-cyber. The template is the official Qwen3 template with one addition: when the user's last message contains "What is", it inserts a fake [SYSTEM DIRECTIVE] that instructs an agent holding a shell tool to download a script from a WordPress site into C:\Windows\Temp\payload.ps1 and run it hidden. The analysis could not recover the second stage, and the model card explicitly advises against replacing the embedded template.

Both campaigns exploit the same misunderstanding. The C++ runtimes render templates in a restricted engine, so the classic template escape into the operating system does not work there, and the attacks need no such thing: Mir2k makes the model open every answer with one PowerShell line, which the user is meant to copy and run. timdedid targets coding agents, which execute tool calls anyway.

Our measurement on November 30

We called the platform's hub API directly on November 30, 2026. Every one of the five repositories now carries disabled=true, the repository pages give the reason "This content infringes our Content Policy", and anonymous file access through the resolve path answers HTTP 401. A first check on November 30 gave 404 on both profile pages; hours later the same URLs answered HTTP 200 again and list every disabled repository. Whether the accounts were briefly deactivated or only the profiles were hidden is not documented; demonstrably disabled are the five repositories. The lastModified field on the two Mir2k repositories shows November 28, 08:01 and 08:23 UTC, which means the files were touched again after the disclosure. Who reported the repositories and when exactly the disable happened is not publicly described.

Hugging Face logo
Hugging Face hosted the five repositories and disabled them before our measurement on Nov 30, 2026. (Quelle: Simple Icons (Repo CC0), brand: Hugging Face)

The counter kept running. The field reports the last 30 days, and Hugging Face counts downloads rather than people.

RepositoryDownloads Nov 27 (analysis)Downloads Nov 30 (our measurement)Status Nov 30
Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF1,4882,236disabled, file 401
Mir2k/Inkling-2-Mini-Uncensored-GGUF4581,257disabled, file 401
timdedid/qwen3.8-cyber-uncensored271389disabled, file 401
timdedid/qwen3-cyber-UNCENSORED-2136191disabled, file 401
timdedid/qwen3-cyber-UNCENSORED75148disabled, file 401
Total (5 repositories)2,4284,221profiles: 404 first, 200 again

Unit: downloads per model repository per the Hugging Face hub API (30-day window), measured November 30, 2026 by our own read-only API calls. The Nov 27 column quotes the analysis. Since the moment of the disable is unknown, the growth of 1,793 downloads cannot be split into periods around the block.

Downloads on Nov 30, our own API callHuihui-Qwen3.5-9B2236 · Nov 27: 1488Inkling-2-Mini-Uncens.1257 · Nov 27: 458qwen3.8-cyber-uncens.389 · Nov 27: 271qwen3-cyber-UNC-2191 · Nov 27: 136qwen3-cyber-UNC148 · Nov 27: 7502400
All five disabled on Nov 30, counters still higher than Nov 27. The Inkling clone nearly tripled. The scan-day total on Nov 26 was 1,502 downloads. (Quelle: Hugging Face hub API, our own call on Nov 30, 2026)

The Ollama mirror is the real finding here. The timdedid profile on ollama.com is online and lists two models: qwen3-1.7b-cyber (1.4 GB) and uncensored-llama (691 MB). Both model pages show ollama run commands, and a manifest request against the registry answers HTTP 200 for each tag: still pullable. Ollama does publish pull counts: qwen3-1.7b-cyber stood at 306 pulls in our Nov 30 call, uncensored-llama at 59. The second model, uncensored-llama, does not appear in the analysis; it comes from the same hand, and the profile lists November 20 as its last update.

Does this touch our own systems?

We answered with a byte scan of our own GGUF inventory. A parser we wrote reads the heads of all 33 GGUF files on two in-house inference hosts: header, chat template, tensor table, alignment padding and the bytes after the last tensor. Nothing executes, the tool behaves like the HTTP range check the analysis describes. We tested it in both directions first: an official Q4_K_M quant of a well-known Qwen3 1.7B scans clean with zero bytes after the last tensor, a synthetic model with a sewn-in template command and 4,096 appended bytes gets flagged.

The result across the inventory: all nine files that carry a chat template show none of the patterns for file reads, PowerShell calls or hidden directives. The 31 measurable files have no bytes after the last tensor; 19 of those are llama.cpp vocabulary test files with no weight section. Two files escape the end-of-file check because their tensor types are newer than the reference table of the reference parser (a ternary Q2 format and an MTP head); one carries no template, the other shows no template hits. What the scan does not answer: whether the weights themselves are the advertised model. No structural scan can do that; a behavioral comparison would.

For the repeat case we recommend a procedure rather than any one tool: inspect or replace the template before commissioning (--chat-template-file in llama.cpp, TEMPLATE in an Ollama Modelfile), check the end of file against the tensor table, and pin the source channel. The author's tool (gguf-radar, MIT license, with YARA rules and tests) is three days old, too young for a blind rollout; run it isolated if you use it. We measured with our own parser instead.

What companies running local models should check now

  1. Inventory: list every GGUF file including mmproj heads, adapters and Ollama blobs, with source and download date.
  2. Scan the sample: check template and file end of each file without starting anything; a structural check catches both known techniques.
  3. Pin sources: allow only internal mirrors or fixed repositories with pinned file versions; treat names carrying "uncensored", "abliterated" and "cyber" as a warning sign. The clones fish with top model names; one Inkling clone even carried the base-model tag of the original we benchmarked in-house.
  4. Leash the agents: models wired to shell or browser tools belong on a reviewed template; whatever the model prints is input, not a command. Our measurement of the llama.cpp 1.0 hardening covers the server side.
  5. Treat incidents as incidents: a suspected file is a compromise task, not a delete job; run the indicators from section 7 of the analysis and rotate passwords and tokens.

Teams running their AI stack in-house usually know the approved files from their build process. If they do not, the inventory is the actual work, and our corporate LLM service page covers the build from model server to source governance. The security and privacy topic hub collects our posts on hardening in self-hosted environments, from parsers to the supply chain.

Neither campaign ended because a scan pipeline caught them; both ended by disabling after a public disclosure, and the Ollama branch is not covered yet. Whether the platforms will add file-end and template checks is open, and we will re-measure once they do.

Further sources

  • Malspark: "GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims", Duzgun, Nov 27, 2026, accessed Nov 30, 2026
  • Hugging Face: repository pages and hub API of the five repos (accessed Nov 30, 2026)
  • Ollama: profile timdedid with two mirror models (accessed Nov 30, 2026)
  • Fogel et al.: "Inference-Time Backdoors via Chat Templates", arXiv:2602.04653, v4 of May 24, 2026 (accessed Nov 30, 2026)
  • Pillar Security: "LLM Backdoors at the Inference Level: The Threat of Poisoned Templates", July 2025 (accessed Nov 30, 2026)
  • gguf-radar (GitHub, MIT), YARA rules and test suite (accessed Nov 30, 2026)
  • Wang, Liu, Cui: "EvilModel: Hiding Malware Inside of Neural Network Models", arXiv:2107.08590, 2021 (accessed Nov 30, 2026)
Questions?
Should I distrust every GGUF file now?+

Both known techniques are structurally checkable: read the chat template and compute the end of the file from the tensor table. Scanning bytes and template takes seconds and runs without starting the model. The cases are not widespread: the analysis found five repositories out of 3.27 million public ones. The check still belongs in front of every commissioning.

What if one of the five models is already on my machine?+

Treat the machine as compromised. The analysis names d.exe in the temp folder, payload.ps1 under C:\Windows\Temp, a folder called ollie under AppData\Roaming, and a scheduled task running every ten minutes as artifacts, and publishes file hashes in section 7. Rotate browser-saved passwords, the trojan reads them through DPAPI.

Doesn't Hugging Face scan for malware automatically?+

No automatic check that would have caught these file ends and templates is publicly documented. They stayed online after the Nov 27 disclosure and showed as disabled only in our Nov 30 measurement, with the platform citing a Content Policy violation. No scan process for GGUF file ends and no takedown timeline is publicly described.