Skip to content
Malicious GGUF Models on Hugging Face Hide Payloads in Chat Templates and File Tails

Malicious GGUF Models on Hugging Face Hide Payloads in Chat Templates and File Tails

First seen 28 Nov 2026, 07:21 UTC • •

Article Content

Browse articles
ThreatCluster AI
ThreatCluster •November 28, 2026 at 07:21 UTC
  • •Five Hugging Face GGUF repositories were found to contain malicious chat templates or hidden payloads, with 2,428 downloads recorded before disclosure.
  • •The Mir2k campaign hid a Windows RAT named ollie after the last tensor and rewrote templates on 26 November to prompt users to execute the unpacking command.
  • •The timdedid models used template injection to make agents with shell access download and run a remote script.
  • •Hidden payloads may be padded or Deflate-compressed to evade quick tail scans and file-signature checks.
  • •The open-source gguf-radar tool can statically detect poisoned templates and trailing bytes and sanitize GGUF files without executing them.

Five malicious GGUF model repositories on Hugging Face combined chat-template poisoning with hidden bytes appended after model tensors, according to Malspark.

A scan of 3,273,389 public Hugging Face model repositories on 26 November 2026 identified the five models, which had 2,428 downloads as of 27 November; Hugging Face counts downloads rather than unique users, so affected users are fewer or equal.

The largest campaign, attributed to the Mir2k cluster, uploaded two uncensored GGUF models with a Windows remote access trojan named ollie hidden after the last tensor, sometimes padded or Deflate-compressed to evade scanning.

On 26 November the Mir2k operators rewrote both chat templates so the model prompts the user to run a PowerShell line that unpacks the payload.

A second cluster, timdedid, used a poisoned template to inject a fake [SYSTEM DIRECTIVE] instructing agents with shell access to download and execute a remote script.

Root0ne published the findings on 27 November 2026 via Malspark and the open-source gguf-radar tool, which detects poisoned templates and hidden bytes without running the files and can rebuild clean GGUF files with weights unchanged.

The attack targets developers loading local LLM weights into llama.cpp, Ollama, or agent harnesses. Safetensors loaders reject files with unexpected trailing data, so the post-tensor payload is primarily a GGUF issue, though template poisoning can affect other formats' tokenizer configs.

Start a free Starter trial for enhanced analysis

Ask AI about this cluster

Or ask in your own assistant: ClaudeChatGPTPerplexityGemini

Timeline

2026-11-26
Hub-wide scan identifies malicious GGUF models
Malspark's scan of 3,273,389 public Hugging Face model repositories found five malicious GGUF models. Mir2k rewrote its two templates the same day.
Malspark
2026-11-27
Findings published with gguf-radar tool
Root0ne published the research via Malspark and the open-source gguf-radar tool; 2,428 downloads were recorded as of 27 November.
Explainx.Ai

More articles in this cluster (7)

Following this threat?

Track Ollie and HuggingFace in your own feed — you're alerted when they show up in new reporting, leak sites or exploitation.

Free account · no card needed

Common questions

Am I affected if I downloaded one of these models?
Check endpoints against the indicators in Malspark's Section 7.2 and scan local .gguf files with gguf-radar. Hugging Face download counts do not identify unique affected users.
Can a GGUF file run code just by being loaded for inference?
The reporting describes a payload that runs only when a poisoned chat template steers the model or an agent to execute a command, such as the PowerShell line in the Mir2k templates. Agents with shell access are the highest-risk case.
What should defenders do first?
Scan local GGUF files and Hugging Face links with gguf-radar, review any model whose chat template contains unexpected instructions, and restrict shell access for agents that load local model weights.