# Malicious GGUF models on Hugging Face — chat templates hide a trojan

> Five GGUF models on Hugging Face used their chat templates to run malware or steer agents into running a script.

- Org: Malspark
- Date: 2026-11-27
- Category: security
- Source: https://malspark.com/blog/malicious-gguf-models-hugging-face/
- Canonical page: https://ai-tldr.dev/releases/malspark-malicious-gguf-models-hugging-face/

## In short

Malspark scanned all 3,273,389 public Hugging Face model repos and found five malicious GGUF models with 2,428 downloads. Poisoned chat templates trigger a hidden Windows trojan or tell agents to run a remote script.

## What it is

Malspark found five malicious GGUF models on Hugging Face from two accounts, Mir2k and timdedid. The models had 2,428 downloads as of 27 November 2026. They abuse the Jinja2 chat template that every GGUF file carries, which the runtime applies to each prompt without showing it to the user.

## How it works

The Mir2k campaign appends an executable after the last tensor, where GGUF loaders never read and no runtime warns. On 26 November the templates were changed to print a PowerShell line that copies those trailing bytes to %TEMP%\d.exe and runs it. The timdedid templates insert a hidden system directive when a message contains "What is", telling an agent with shell access to download and run value.ps1.

## Why it matters

Local-model users mostly worry about pickle files, but a GGUF chat template is plain text that nobody reads. An agent with shell access that follows hidden instructions turns a model download into code execution. Malspark says the five repos were still online on 27 November, with no response from Hugging Face.

## Who it's for

anyone running community GGUF models, especially with agents

## Try it

https://github.com/Root0ne/gguf-radar

## Quick facts

- Found by: Malspark (scan of 26 Nov 2026)
- Repos scanned: 3,273,389 public Hugging Face model repos
- Malicious models: 5, from accounts Mir2k and timdedid
- Downloads: 2,428 as of 27 Nov (downloads, not people)
- Runtimes named: llama.cpp, LM Studio, gguf-py, Ollama
- Detection tool: gguf-radar (open source, MIT)

## FAQ

### Which Hugging Face models were malicious?

Malspark names five GGUF models: Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF, Mir2k/Inkling-2-Mini-Uncensored-GGUF, and three timdedid models called qwen3.8-cyber-uncensored, qwen3-cyber-UNCENSORED-2 and qwen3-cyber-UNCENSORED. The timdedid account also published an Ollama mirror, timdedid/qwen3-1.7b-cyber. All were uncensored or abliterated builds of popular models.

### What does the ollie trojan in the Mir2k models do?

The Mir2k models hide a Windows x64 remote access trojan, ollie, after the last tensor of the GGUF file. Malspark says ollie talks to its operator over Tor, tries to steal saved browser passwords and crypto wallet data, supports keylogging, screenshots and webcam capture, and mines Monero when the machine is idle.

### Is 2,400 the number of people infected?

No. The Malspark report counts 2,428 Hugging Face downloads as of 27 November 2026, and notes that Hugging Face counts downloads, not people. The number of affected users is therefore equal to or lower than 2,428, and the report does not say how many machines actually ran the payload.

### How can I check a GGUF file before I run it?

Malspark released gguf-radar, an MIT-licensed tool that finds poisoned chat templates and hidden payloads in GGUF files without running them, and can rebuild a clean file with the weights unchanged. The report also suggests treating commands a model proposes as untrusted and overriding the template with llama.cpp's --chat-template-file.

## Links

- [Malspark Report](https://malspark.com/blog/malicious-gguf-models-hugging-face/)
- [gguf-radar](https://github.com/Root0ne/gguf-radar)
- [HN Discussion](https://news.ycombinator.com/item?id=50676752)
