Five poisoned GGUF models out of 3.27 million repositories
On 26 November 2026, security researcher Düzgün (@Root0ne, writing on Malspark) scanned all 3,273,389 public model repositories on Hugging Face, including 226,310 GGUF repositories holding 2.56 PB of weights, and statically parsed 572,184 chat templates without running any of them. After stripping out security test uploads, harmless persona prompts and published research samples, five malicious GGUF repositories remained, all still online on 27 November. Together they had logged 2,428 downloads across two actors (Mir2k and timdedid), up from 1,502 downloads one day earlier. Hugging Face counts downloads rather than unique people, so the real number of affected users is lower or equal.
Five poisoned repositories in 3.27 million is a tiny fraction. The catch is which files were targeted: every one of the five sat under "uncensored", "abliterated" or "cyber" community names that local LLM runners search for daily.
| Repository | Campaign | Method | Payload status | Downloads |
|---|---|---|---|---|
Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF |
Mir2k | Reply prefix with hidden executable | Recovered and analyzed | 1,488 |
Mir2k/Inkling-2-Mini-Uncensored-GGUF |
Mir2k | Reply prefix with hidden compressed executable | Recovered and analyzed | 458 |
timdedid/qwen3.8-cyber-uncensored |
timdedid | Tool hijacking | Second stage not recovered | 271 |
timdedid/qwen3-cyber-UNCENSORED-2 |
timdedid | Tool hijacking | Second stage not recovered | 136 |
timdedid/qwen3-cyber-UNCENSORED |
timdedid | Tool hijacking | Second stage not recovered | 75 |
| Total | 2 actors | 2,428 |
Source: Malspark scan report, counts as of 27 November 2026.
Mir2k did not stop at two models. On 22 November the account created 14 repositories in all, leaving 12 as empty placeholders named after expected releases such as Qwen4-27B, DeepSeek-V4, Llama-4-Scout and gemma-4-27b, ready to be populated when people search for those quants.
How a GGUF file hides malware without breaking the model
A GGUF file is laid out as a header, a metadata table, a tensor directory, alignment padding and the model weights. Loaders such as llama.cpp and LM Studio read only the exact byte ranges declared by the header and ignore everything past the farthest tensor without raising a warning. Safetensors blocks that trick because its loader refuses any file whose declared tensors do not fill the file exactly. GGUF does not.
That solves storage, not execution. Execution comes from the metadata key tokenizer.chat_template, a small Jinja2 program inside every GGUF that the runtime evaluates before each reply to format the conversation. C++ runtimes execute that template inside a restricted renderer with no Python behind it, so classic Python template-escape payloads cannot reach the operating system there. These campaigns did not need an escape. Plain template logic is enough to inject hidden instructions that never appear in the chat window. (Safetensors and PyTorch models ship chat templates too, usually in tokenizer_config.json or chat_template.jinja, so the template half of this attack applies to them as well.)
The two campaigns used that template in different ways:
- Plant first, arm later (
Mir2k): On 22 November,Mir2kuploadedHuihui-Qwen3.5-9B-abliteratedwith a Windows x64 trojan namedolliealready appended past the last tensor, followed by about half a megabyte of filler, alongside a clean chat template. On 24 November,Inkling-2-Mini-Uncensoredfollowed with the same binary compressed via raw Deflate into the final 4,200,000 bytes (4.2 MB), stripping recognizable file signatures while staying clean at the template level. Two to four days later, on the morning of 26 November, the operator swapped both templates (and updated them again 9 hours later) so the model opens every reply with a PowerShell one-liner. That line locates the largest.gguffile in the user profile, extracts the trailing bytes (11,474,944 bytes starting 12,000,000 bytes from the end on the Qwen 3.5 file, or decompressing the last 4,200,000 bytes throughIO.Compression.DeflateStreamon the Inkling 2 Mini file), writes%TEMP%\d.exeand starts it. Downloads pulled before 26 November hold the binary without the trigger. - Coding-agent tool hijacking (
timdedid): On 21 and 22 November,timdedidposted three byte-identical copies of a Qwen 3 1.7B model plus an Ollama mirror (timdedid/qwen3-1.7b-cyber). Its template kept the official Qwen 3 layout and added one rule near the end: whenever the user's latest message containsWhat is, it inserts a[SYSTEM DIRECTIVE]telling an agent with shell access to invoke itspowershelltool, downloadvalue.ps1from a WordPress site toC:\Windows\Temp\payload.ps1and run it in a hidden window. Its README explicitly warned users not to replace the embedded template.
Static analysis of ollie in the Malspark report shows an 11.47 MB Windows x64 program where 10.25 MB is a bundled copy of Tor 0.4.9.16. It checks for VirtualBox, VMware, Sandboxie and usernames such as sandbox, malware and test, then sets up persistence through a 10-minute scheduled task with highest privileges, two watchdog processes, StartupApproved keys and critical-process marking (its fodhelper.exe UAC bypass and Run key failed because of missing backslashes). Over a Tor onion service (SocksPort 9050, ChaCha20), it steals saved Chrome, Edge and Brave passwords read via DPAPI (leaving Chrome's newer v20 App-Bound entries undecrypted), targets Phantom and MetaMask wallet extensions, supports keylogging, clipboard capture, screenshots, screen streaming and webcam capture, and mines Monero with RandomX over Tor when the PC is idle. It even parks its folder at AppData\Roaming\ollie, close enough to Ollama to blend in.
In Malspark's test table, antivirus tools and pickle scanners gave no alert on the live Mir2k files while GGUF parsers loaded them normally. Malspark also built three synthetic GGUF lab tests that loaders accept silently without altering a single weight: non-zero alignment padding (general.alignment bumped from 32 bytes to megabytes), a GGUF+ZIP polyglot importable through Python zipimport, and zero-scale Q8_0 blocks (where a +0.0 or negative-zero 0x8000 scale lets 32 arbitrary bytes decode to zero).
How to check a GGUF file with gguf-radar
To catch both halves before loading a file, Düzgün released gguf-radar (open-source, MIT, Python 3.10+), shared on X by @ItsmeAjayKV alongside his scan summary. It never runs the model and never executes the template.
Instead, gguf-radar inspects the file structurally:
- Static template audit: parses
tokenizer.chat_template(and Safetensors or PyTorch template files) into a syntax tree and flags file reads and writes, decompression calls, process starts, download commands, conditional hidden directives, code-poisoning instructions and known Python escape gadgets. - Byte-layout audit: reads the GGUF header and tensor directory to calculate where the weights must end, flagging trailing bytes past the last tensor, non-zero alignment padding, negative-zero scales and non-zero bytes in zero-scale blocks. Remote Hugging Face scans use HTTP Range requests to read only the header and file tail without downloading the weights (no API key required for public repos; zero-scale block inspection needs the full file locally).
Install it and scan a Hugging Face repo before downloading gigabytes:
pip install git+https://github.com/Root0ne/gguf-radar
gguf-radar scan https://huggingface.co/owner/model
gguf-radar scan ./model.gguf
Every scan returns one of four verdicts: CLEAN (exit code 0), SUSPICIOUS or MALICIOUS (exit code 2), or ERROR (exit code 1). If a local file flags structural clutter or trailing bytes, gguf-radar sanitize suspicious.gguf -o clean.gguf rebuilds a canonical 32-byte-aligned GGUF with zeroed padding, drops everything past the last tensor, normalizes negative-zero scales to +0.0, clears zero-scale block bytes and can strip or replace the chat template while keeping the dequantized weights identical.
If you wire a local model into a coding agent with shell access, add one more habit: take the embedded template out of the loop completely. Pass a verified external template via llama-cli -m clean.gguf --chat-template-file verified_qwen3.jinja (or set TEMPLATE in an Ollama Modelfile), and treat any shell command a model prints as untrusted.
Why first-party quants and engine packs are the safer download
The 3.27 million repo scan points to a simple filter before you touch any scanner. None of the five poisoned files came from a model maker or an established quant maintainer. All five came from two fresh accounts fishing for people searching for uncensored, abliterated or cyber-themed builds.
That supply gap widened on 28 November 2026, when author Philipp Emanuel Weidmann archived Heretic, the main open-source abliteration tool (43,859 stars on GitHub), and said farewell in issue #601; the repository is now read-only. As @superalesha pointed out alongside the 2,428 trojaned "uncensored" GGUF downloads documented by Malspark, when a widely used local modification tool stops getting updates, users looking for uncensored weights are pushed toward random third-party uploads instead of starting from clean base weights. If you still pull a community "uncensored" GGUF, do not trust the repo name or download count: run gguf-radar scan against the Hugging Face URL first, read tokenizer.chat_template before loading the file, and pass a verified external template whenever the model has tool access.
Stick to a clear order when picking a file:
- First-party releases from the model maker whenever official GGUFs sit in the lab's own repository.
- Engine-curated packs checked by hash: engines such as Strata and Project Maya download pinned builds verified by size and SHA-256 directly from known providers. You can size those official packs against your GPU in my Strata calculator or my GPU checker.
- Established quantization maintainers with verifiable release history and matching base-model provenance.
- Community re-uploads and uncensored derivatives: scan the Hugging Face link with
gguf-radarbefore pulling the weights, checktokenizer.chat_templatein Hugging Face's metadata viewer, and override the template when granting an agent tool access.
FAQ
Can a malicious GGUF run code simply by loading it?
Loading a GGUF in llama.cpp or LM Studio reads only the declared tensor ranges and does not execute bytes appended after the last tensor on its own. Both live campaigns relied on the chat template: Mir2k instructed the model to open every reply with a PowerShell unpack line for the user to run, while timdedid injected a hidden directive telling a coding agent to call its powershell tool.
Why did antivirus and pickle scanners miss the Mir2k files?
Pickle scanners inspect Python serialization formats rather than GGUF structures. On the live Mir2k models, padding behind the first binary and raw-Deflate compression on the second stripped recognizable signatures; in Malspark's testing, antivirus and pickle scanners produced no alert while GGUF loaders opened the files normally.
Does switching to Safetensors prevent this attack?
Only half of it. Safetensors loaders reject files with trailing bytes beyond the declared tensors, stopping the appended-executable trick. Safetensors and PyTorch models still carry chat templates in tokenizer_config.json or chat_template.jinja, so chat template poisoning applies there too, and gguf-radar scans those templates as well.
Does gguf-radar sanitize change model output quality?
No. Rebuilding a file with gguf-radar sanitize resets alignment padding to 32 bytes of zeroes, drops trailing bytes after the last tensor, clears hidden data in zero-scale blocks and optionally replaces the template, leaving the dequantized model weights identical.
Which Hugging Face repositories were found in the November 2026 scan?
Malspark named five repositories totalling 2,428 downloads as of 27 November 2026: 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) and timdedid/qwen3-cyber-UNCENSORED (75).