# Warning: How Uncensored GGUF Models on Hugging Face Hid the 'Ollie' Stealer and Agent Backdoors

- **URL:** https://dottheais.com/guides/uncensored-gguf-models-chat-template-malware-warning
- **Published:** 2026-12-06
- **Updated:** 2026-12-06
- **Topic:** AI Security & Cryptography

## Quick Answer

Security research from Malspark and Corgea (November 2026) uncovered two active supply-chain campaigns on Hugging Face—Mir2k and timdedid—that weaponized GGUF files without Python pickle. Attackers appended the 'Ollie' Windows info-stealer past the tensor weights and armed Jinja2 chat templates to trick users and coding agents into executing payloads.

## Key Takeaways

- Mir2k campaign: appended the 'Ollie' info-stealer (targeting browsers, session tokens, and crypto wallets) to trailing GGUF bytes, then updated the Jinja2 chat template days later to print an obfuscated PowerShell extractor.
- timdedid campaign: poisoned chat templates specifically targeting autonomous AI coding agents with shell access, forcing them to download and run external scripts.
- Standard inference loaders (llama.cpp, LM Studio, Ollama) ignore trailing bytes past tensors, so poisoned models chat normally while carrying hidden payloads.
- Audit tokenizer.chat_template before loading, scan files with tools like gguf-radar for trailing-byte anomalies, and never give untrusted models host shell access.

## How the GGUF Supply-Chain Attack Works

Unlike older Hugging Face attacks that relied on Python `pickle` deserialization, the November 2026 campaigns flagged by **Malspark** and analyzed by **Corgea** targeted **GGUF**—the format widely assumed to be safe for `llama.cpp`, LM Studio, and Ollama.

The attackers exploited two overlooked facts: GGUF files embed **Jinja2 chat templates** evaluated on every prompt, and inference loaders silently ignore **trailing data** appended after the tensor weights.

| Campaign | Target | Attack Mechanism |
| --- | --- | --- |
| **`Mir2k`** | Human desktop users | Uploaded clean-looking GGUFs with the **"Ollie"** Windows info-stealer appended to trailing bytes. Days later, modified the Jinja2 chat template to prepend an obfuscated PowerShell command that extracts and runs the hidden binary. |
| **`timdedid`** | Autonomous AI coding agents | Embedded malicious system directives in the chat template to hijack agents with terminal/tool permissions, instructing them to fetch and execute remote scripts. |

## Why Platform Moderation Misses It

Hugging Face disabled the reported repositories once disclosed, but mirrors lingered briefly on third-party hubs. Because a poisoned chat template can be pushed *days after* initial upload—and because behavioral triggers are not traditional executable signatures—blindly trusting community "uncensored" repacks is unsafe.

## 4-Step Defense Checklist for Local Models

1. **Stick to verified publishers:** Download official repos (Qwen, Meta, Google, Mistral, DeepSeek) or established quantizers (`ggml-org`, `bartowski`, `unsloth`).
2. **Scan for trailing bytes & inspect templates:** Run a GGUF scanner such as `gguf-radar` and inspect `tokenizer.chat_template` before loading unknown uploads.
3. **Treat chat templates as code:** Never blindly copy-paste or auto-execute shell commands emitted by a model.
4. **Isolate untrusted models:** Run experimental or uncensored fine-tunes inside a disposable container (`--network=none`) or dedicated VM with zero access to `~/.ssh`, browser profiles, or crypto wallets.

## Primary Sources

- [Corgea Research: Mir2k & timdedid Hugging Face GGUF Chat-Template Malware (Nov 2026)](https://corgea.com/research/mir2k-timdedid-hugging-face-gguf-chat-template-malware-november-2026)
