Guide AI Security & Cryptography Published 1 min read

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

Quick Answer & Key Takeaways

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.

  • 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.

CampaignTargetAttack Mechanism
Mir2kHuman desktop usersUploaded 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.
timdedidAutonomous AI coding agentsEmbedded 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.

Frequently Asked Questions

Can a GGUF model file contain malware even though it does not use Python pickle?

Yes. Attackers in the Mir2k and timdedid campaigns appended hidden Windows executables (the Ollie info-stealer) to trailing bytes past the tensors and used GGUF Jinja2 chat templates to instruct users or coding agents to execute payloads.

Primary Sources & Verification

Related Articles

Comparison

Local AI Hardware in Late 2026: 128GB Mac vs RTX 5090 vs Dedicated AI Boxes

For running 30B–120B local LLMs in late 2026, Apple Silicon Macs with 64–128GB unified memory beat a single 32GB RTX 5090 on model capacity and resale value, while NVIDIA 50-series GPUs dominate raw tokens-per-second on MoE models like Qwen4-35B-A3B using the new Basalt engine (150–900 tok/s).

News

Anthropic and OpenAI Issue Joint Encryption Warning: What Was Actually Found

Anthropic and OpenAI released a rare joint disclosure after unreleased frontier models independently surfaced mathematical weaknesses in cryptographic primitives underpinning modern web security. The attack remains theoretical today and does not break live TLS or RSA traffic overnight, but it has accelerated post-quantum migration timelines.