timdedid and Mir2k poisoned GGUF chat templates
A scan of Hugging Face found five malicious GGUF models hiding a Windows RAT after the last tensor, armed later through poisoned chat templates.
A scan of all 3,273,389 public Hugging Face model repositories on 26 November 2026 found five malicious GGUF models. By 27 November they had 2,428 downloads, up from 1,502 the previous day, with nearly all the growth on two files from one account. Hugging Face counts downloads, not people, so the number of infected machines is at most that. Two actors were behind the five repositories.
GGUF is the format local LLMs usually ship in, and every GGUF file carries a chat template: a small Jinja2 program stored under the metadata key tokenizer.chat_template. Before each reply, the runtime passes the conversation through that template to build the text the model actually reads. Chat template poisoning abuses this step. The model answers normally while the template adds instructions the user never sees in the chat window.
C++ runtimes such as llama.cpp and LM Studio render the template in a restricted engine with no Python behind it, so the template injection payloads that reach the operating system do not fire there. The attacks in this scan do not try to escape the engine. They use ordinary template logic to inject text into the conversation. In the timdedid models, a trigger phrase in the user’s message makes the template insert a fake [SYSTEM DIRECTIVE] that orders an agent with shell access to download and run a script. In the Mir2k models, the template adds a system message telling the model to open every answer with a single PowerShell line that a user might copy and paste.
Templates are not unique to GGUF. Safetensors and PyTorch models carry the same kind of template in tokenizer_config.json or chat_template.jinja, so the poisoning half of this applies to them too.
The second half is specific to GGUF. A GGUF file is a header, a metadata table, a tensor table, padding to an alignment boundary, then the model weights. Runtimes read exactly the byte ranges the header points to and ignore everything else, including anything appended after the last tensor. An attacker can put a whole executable there and no loader will read it or warn about it. Safetensors does not allow this; its loader rejects a file whose declared tensors do not fill it exactly.
Plant first, arm later
Mir2k combined the two halves with a delay. On 22 November the account created 14 repositories, twelve of them empty placeholders named for releases that do not exist yet, such as Qwen4-27B, DeepSeek-V4, Llama-4-Scout and gemma-4-27b, staged to be filled when those models ship. The same day it uploaded Huihui-Qwen3.5-9B-abliterated with a Windows executable already appended after the last tensor but a clean, original template. On 24 November it added Inkling-2-Mini-Uncensored with the same payload compressed using raw Deflate, which strips every recognizable file signature, again with a clean template. For several days the payload sat inert in both files with nothing to start it. On the morning of 26 November both templates were rewritten within about an hour to read a fixed path in the Downloads folder; nine hours later both were rewritten again to search the whole user profile for the model file. Anyone who downloaded before 26 November holds the payload but not the trigger.
The armed template adds a French system message instructing the model to begin every reply with one line copied character for character. That line finds the largest .gguf file in the user profile, reads the trailing bytes back off disk, and writes them to %TEMP%\d.exe. The Huihui model reads 11,474,944 bytes from 12,000,000 before the end; the Inkling model reads the last 4,200,000 and decompresses them in memory with IO.Compression.DeflateStream. Antivirus and any check that only inspects the last few kilobytes of the file miss the compressed form.
Both unpack to the same 11.47 MB Windows x64 binary. Roughly 10.25 MB of that is a full copy of Tor 0.4.9.16, embedded with its own MZ header. The implant, named ollie, checks for VirtualBox, VMware and Sandboxie drivers and for usernames like sandbox, malware and test, and exits if it sees them. On a real machine it installs a scheduled task that runs every 10 minutes with highest privileges, two watchdog processes, StartupApproved registry keys, and marks its own process critical so that killing it bluescreens Windows. It attempts the fodhelper.exe UAC bypass but fails, because the author compiled the registry paths without backslashes; the Run-key persistence path has the same bug. It writes Tor to disk, opens SocksPort 9050, and reaches its operator over an onion service using ChaCha20 with a built-in pre-shared key. Over that channel it exfiltrates saved passwords from Chrome, Edge and Brave via DPAPI (Chrome’s newer v20 App-Bound entries are left undecrypted), targets the Phantom and MetaMask wallet extensions, and supports keylogging, clipboard capture, screenshots, screen streaming and webcam access. When the machine is idle it mines Monero with RandomX over Tor. It stores itself under AppData\Roaming\ollie, close enough to Ollama to look routine, and still contains the author’s own path, C:/Users/MoH/socks.txt.
The timdedid campaign went after a different target. On 21 and 22 November the account published three byte-identical copies of a Qwen3 1.7B model aimed at security users, plus an Ollama mirror named timdedid/qwen3-1.7b-cyber. The template is the stock Qwen3 template with one addition: when the user’s latest message contains “What is”, it injects a [SYSTEM DIRECTIVE] telling an agent to call its PowerShell tool, download value.ps1 from a WordPress site into C:\Windows\Temp\payload.ps1, and run it in a hidden window. The README advises against replacing the embedded template, which keeps the trigger in place. The second-stage script was not recovered and the URL had no public reputation history, so what it installs is unknown.
Taking the template out of the loop
If you run community models locally, treat any command a model emits as untrusted input, the same as a prompt. Where the model drives tools, take the embedded template out of the loop entirely: pass a reviewed template with --chat-template-file in llama.cpp or TEMPLATE in an Ollama Modelfile. The open-source gguf-radar tool parses the template statically, flags file reads and writes, decompression, process launches and download commands, reports any bytes after the last tensor, and rebuilds a canonical file with the trailing data dropped and the dequantized weights unchanged; it can also check Hugging Face links over HTTP Range requests without pulling the full weights. Running every incoming model through it before it reaches an internal registry catches a poisoned template or an appended payload at the gate. The durable fix sits with the hubs and runtimes, which could reject any GGUF file carrying bytes after the last tensor.
Keep Reading
supply-chain-attackA worm force-pushed malware into 7,609 GitHub repos
North Korea's PolinRider worm has poisoned 7,609 GitHub repos, mostly real developer accounts, using force-pushed loaders and blockchain-based C2.
supply-chainBackdoor hides in fake Fscan tool
A two-year GitHub campaign hides malware in fake security tools, compromising 2,000+ Windows machines with an Electron loader, AsyncRAT, and an infostealer.
infostealerMalware ranks what you're worth
VOLTA-AUTODOXER is a Windows infostealer that uses Claude, Kimi, and Gemini via OpenRouter to rank a victim's stolen data by its monetization value.
Latest on the Wire
Full wire →- 2026 Kindle Paperwhite: Page-Turn Buttons Return, At Extra CostArs Technica
- 9/UX: Macintosh-Inspired Spatial Desktop for 9frontHacker News
- AI-Powered Attack Breaches College Board's Financial Aid SystemsBleepingComputer
- Audible Removes Direct Downloads for US UsersHacker News
New signal daily · RSS
Stay in the loop
New writing delivered when it's ready. No schedule, no spam.