Get DeafLetter
A weekly selection of signals, vulnerabilities and guides. Critical alerts remain optional.
You can unsubscribe at any time. Privacy policy.
On November 26, 2026, a scan of 3,273,389 public repositories on Hugging Face isolated five GGUF files using a novel technique: malware hidden after the final tensor and activated via poisoned chat templates. The files had accumulated 2,428 total downloads as of November 27. Two distinct campaigns — Mir2k and timdedid — exploited the format's structure to deliver payloads through seemingly legitimate models, with a pattern that cleanly separates implantation from weaponization.
- Five malicious GGUF repositories, identified on November 26, 2026, accumulated 2,428 total downloads as of November 27 according to Hugging Face's public metrics.
- The GGUF format allows trailing bytes after the final tensor without triggering alerts in C++ loaders (llama.cpp, LM Studio, Ollama), unlike Safetensors which rejects files with non-conforming sizes.
- Mir2k hid a Windows trojan after the tensors and forced the model to prepend a PowerShell line to every response via a poisoned chat template.
- timdedid used a trigger phrase to induce AI agents with shell access to download and execute remote scripts.
- Malspark released gguf-radar, an open-source tool to detect suspicious templates and hidden bytes without executing the model.
"2,428 total downloads as of November 27, 2026 — Hugging Face public metrics, not unique users"
How the Attack Works: Verified Facts
The GGUF format — Generative GPT Unified Format — packages weights, architecture, and execution metadata in a single file. The file structure specifies exactly where model data ends, and loaders stop at that point.
According to Malspark/Root0ne as reported through the cited editorial sources, an attacker can append arbitrary bytes after the final tensor without altering model functionality. The primary loaders — llama.cpp, LM Studio, Ollama — do not flag the presence of these trailing bytes, making the model file simultaneously a legitimate container and a vehicle for executable payloads.
The second mechanism, chat template poisoning, exploits the embedded Jinja2 system in the GGUF file. Templates define how the model formats responses; if poisoned, they can insert instructions invisible to the user that activate when an AI agent processes the generated text.
"The model file was simultaneously the weights, the dropper, and the delivery mechanism, and the only thing a victim ever had to download was the model"
— ProductWatch, reporting Malspark's findings
Analysis: The "Plant-First, Arm-Later" Pattern
The observed technique separates two phases temporally and functionally: payload implantation in the model file, and weaponization via instructions at inference time. This pattern offers operational advantages to attackers: the file passes static checks, is distributed through trusted infrastructure, and actual execution depends on conditions controlled by the poisoned template.
The sources mention that chat template poisoning could theoretically apply to formats other than GGUF — Safetensors and PyTorch — via separate configuration files such as tokenizer_config.json. This applicability is indicated as a theoretical possibility in the sources, not as a confirmed vector in the documented attacks.
The Two Campaigns: Mir2k and timdedid
The five malicious repositories belonged to two distinct operators with differentiated modus operandi.
Mir2k managed two repositories — Huihui-Qwen3.5-9B-abliterated-GGUF with 1,488 downloads and Inkling-2-Mini-Uncensored-GGUF with 458 downloads — and hid a Windows trojan named 'ollie' after the final tensor. The poisoned chat template forced the model to begin every response with a PowerShell line that extracted and executed the hidden payload.
timdedid operated three repositories — qwen3.8-cyber-uncensored (271 downloads), qwen3-cyber-UNCENSORED-2 (136 downloads), and qwen3-cyber-UNCENSORED (75 downloads) — with a different approach: a specific trigger phrase, "What is," activated a fake [SYSTEM DIRECTIVE] ordering an agent with shell access to download and execute a remote script. Malspark did not recover the actual script; the exact payload content remains unknown.
Why Automated Scanning Failed
Tests conducted by the researcher show that conventional antivirus and pickle scanners — standard tools for detecting malware in ML models — did not flag the Mir2k files as malicious. The reason is structural: the payloads do not reside in sections scanners are programmed to analyze, and the GGUF format does not provide for signatures or validation of the entire file after the final tensor.
This is not a software vulnerability to be fixed with a patch, but an architectural characteristic that makes mitigation complex without compromising the user experience that made the format popular.
The Agent Hijacking Risk: Conditional Analysis
FACT: timdedid inserted a fake [SYSTEM DIRECTIVE] that, if processed by an AI agent with shell access configured to execute commands from the model, could have induced the download of a remote script.
ANALYSIS: Actual execution depends on agent configuration: it is not automatic upon file load, but requires the agent to be configured to execute instructions from generated text. In configurations where the agent has shell privileges and does not validate received instructions, the risk amplifies. In configurations without shell access or with sandboxing, the poisoned template produces no execution.
PRESCRIPTION: For teams operating AI agents with shell access, verification of Jinja2 templates before loading represents a priority control. Template structure is readable as text and does not require model execution to inspect.
What to Do Now
Malspark released gguf-radar, an open-source tool that analyzes GGUF files for suspicious templates and hidden bytes without executing the model. The tool's documentation warns that "A clean result is not a guarantee," confirming the inherent limits of static detection.
Comparison with Safetensors offers a selection criterion: that format rejects files with tensors that do not exactly fill the declared size, eliminating the trailing-bytes vector. Chat template poisoning remains theoretically applicable to Safetensors via separate files, but requires the presence of additional files that expand the detection surface.
The Mir2k repositories were disabled on November 29, 2026 according to Hugging Face APIs. The status of the timdedid repositories as of that same date is not clearly documented in the sources. No official statement from Hugging Face on the matter is cited in the available dossier.
Editorial Close
Factual Finding: The incident documents a GGUF-specific concealment technique exploited in two campaigns with 2,428 downloads counted before reporting.
Analytical Implication: The separation between implantation and armament — payload hidden in the file, activation conditioned by the template — represents an evolution in how attackers exploit trust placed in open-source models distributed on public platforms.
Operational Prescription: Template verification and use of tools like gguf-radar are controls specific to the documented case, not substitutes for a broader review of the LLM model supply chain.
"Loading the model didn't run anything. The attack needed you, and it borrowed the trust you place in software you installed yourself"
— StartupFortune, analysis of the mechanism
Sources
Get DeafLetter
A weekly selection of signals, vulnerabilities and guides. Critical alerts remain optional.
You can unsubscribe at any time. Privacy policy.