# Hugging Face blocks five GGUF models hiding malware after 2,428 downloads

> Five malicious GGUF models on Hugging Face hid executables or commands in their chat templates, reaching 2,428 downloads before the repositories were disabled. The attack shows model files from unknown sources must be treated as programs, not passive documents.

- Type: AI news
- Page: https://completeaitraining.com/news/hugging-face-blocks-five-gguf-models-hiding-malware-after/
- Published: 2026-11-29
- Updated: 2026-11-29
- Author: Jeroen Erne
- Jobs: Customer support, Healthcare, Hospitality and events, Insurance, IT and development, Legal, Operations, Product development, Real estate and construction
- Reading time: 5 min

Five GGUF models uploaded to Hugging Face concealed a Windows executable or malicious command hidden inside the chat template, accumulating 2,428 downloads before the platform disabled the repositories. The finding came from a scan of 3,273,389 public repositories run on November 26, 2026 by researcher Düzgün for Malspark. For professionals in IT, legal, and operations roles who work with local AI tools, the attack shows that a model file from an unknown source must be treated like any other executable - not as a passive document.

Hugging Face serves as a central hub where developers and companies share artificial intelligence models, similar to how GitHub hosts code. GGUF is the file format used to distribute models that run locally in programs such as llama.cpp, Ollama and LM Studio. A single file holds both the model weights and service instructions. Anyone who downloads an "uncensored" model from an unfamiliar account is trusting a file nobody has inspected.

The malware sits at the tail of the file or in the chat template, never in the model weights themselves. The scan statically read 572,184 chat templates without executing any of them, using partial HTTP requests so no model was downloaded in full. After manual review ruled out security-testing repositories and harmless prompts, five remained, attributed to two distinct campaigns.

#### What the numbers show

The five repositories were split between two accounts. The Mir2k campaign uploaded two models with 1,488 and 458 downloads respectively. The timdedid campaign uploaded three models with 271, 136, and 75 downloads. Hugging Face counts downloads rather than unique users, so the real number of victims is at most that figure and probably lower. By November 28 the platform's public API showed all five repositories as disabled. Hugging Face has not published an official statement.

Mir2k uploaded the first model on November 22 and the second on the 24th, both with the malicious program already appended but with clean templates. On the morning of November 26 the account swapped the templates on both within an hour. Nine hours later it changed them again to broaden the file search path. Anyone who downloaded before the 26th holds the payload but not the trigger - a clear example of why a one-time scan at download is insufficient.

#### How malware hides inside a GGUF file

The technique combines two known methods that, according to Malspark, appear together in no earlier public report of real-world attacks. The first exploits the GGUF format itself. The file header states precisely where the model data ends, and anything past that point is never read by the loader. An attacker can append an entire executable without the model behaving differently and without any program raising an alert. Safetensors files, the other common format, reject files where the declared tensors don't fill all the space, so this particular method does not apply to them.

The Mir2k campaign used two variants. The first model carries a Windows program followed by about half a megabyte of padding, so a scanner that reads only the last few kilobytes sees nothing. In the second, the same program is compressed with raw Deflate, which removes every recognizable signature, while PowerShell decompresses it in memory without difficulty. That is why antivirus engines and checks on the tail of the file stay silent.

The second method hides in the chat template. Every GGUF carries a **tokenizer.chat\_template** key, a small Jinja2 program the runtime applies to each message before handing it to the model. In the Mir2k case the template makes the model print a command line for the user to copy and paste. That line reads the last megabytes of the model file and launches the hidden program. The timdedid campaign targets coding assistants with shell access. When the user's last message contains "What is," the template inserts a fake system directive that orders the agent to use its PowerShell tool, download a script from a WordPress site and run it in a hidden window. The second-stage script was never recovered.

#### What the ollie malware does

The program hidden in the Mir2k models is an 11.47 MB Windows x64 executable, about 10.25 MB of which is a complete copy of Tor 0.4.9.16. It offers remote access, steals saved passwords from Chrome, Edge and Brave - though not those encrypted with Chrome's v20 App-Bound Encryption - and targets the Phantom and MetaMask wallet extensions. It also logs keystrokes, takes screenshots, captures the webcam, and mines Monero with the RandomX algorithm when the computer is idle.

It installs itself in a folder called **ollie** inside AppData, a name chosen to resemble Ollama, and re-launches through a scheduled task every 10 minutes. The malware has one flaw: its attempt to bypass User Account Control through fodhelper.exe fails because the registry paths were compiled without backslashes. That offers little comfort to anyone who already ran the command, since the rest of the program functions normally.

#### How to check a GGUF model before downloading it

Four checks apply in order, from the cheapest to the most thorough. The first happens in the browser and the others on your computer.

1. **Look at the account.** Mir2k is a new profile that created 14 repositories on November 22, twelve of them empty and named after anticipated models such as Qwen4-27B and DeepSeek-V4, ready to be filled the day those models ship. A recent account with empty repositories and a popular "uncensored" model is a signal worth heeding.
2. **Read the chat template on the model page.** Hugging Face's metadata viewer shows tokenizer.chat\_template. A legitimate template formats conversation turns and does nothing else. If it contains conditions on the user's text, references to PowerShell, downloads, folder paths or system-directive style phrases, discard the model.
3. **Scan the file with gguf-radar before loading it.** The tool inspects the template without running it and reports bytes after the last tensor, non-zero padding and suspicious blocks.
4. **If the file is already on disk and looks suspicious, rebuild it clean.** The sanitize command strips everything after the last tensor and zeroes the padding, leaving the weights identical.

The verified template is the defense that counts most when the model has access to tools. In llama.cpp you pass it with **\--chat-template-file**, and in an Ollama Modelfile with the **TEMPLATE** instruction. Either way the template embedded in the file is taken out of play. A plainer rule applies too: a command the model suggests you paste into the terminal should be treated as coming from a stranger.

#### Why the usual checks aren't enough

Malspark reproduced in the lab three other hiding places in the format that real malware has not used yet: alignment padding stretched from 32 bytes to several megabytes, an appended ZIP archive that makes the file a model and an importable Python package at once, and data tucked into Q8\_0 blocks with a zero scale, where any byte produces null weights. None of them changes a single weight and none triggers warnings in llama.cpp or in gguf-py. If platforms started rejecting files with bytes after the last tensor, these alternatives already exist.

None of this started in November. Pillar Security had shown instructions hidden in GGUF chat templates in July 2025. Fogel and colleagues measured the attack in 2026 across 18 models and four inference engines. Those were experiments with test models. Here the method appears in real campaigns with real downloads.

#### Why this matters for IT, legal, and operations professionals

For IT and development teams, a model downloaded from an unknown account should be treated as a program to install, not as a document. The file format allows appended executables that no loader checks, and the chat template can issue commands the user never sees. For legal and compliance roles, the fact that Hugging Face's download counter does not distinguish unique users from repeated downloads complicates any breach assessment - the 2,428 figure is an upper bound, not a confirmed infection count. For operations staff who manage internal tooling, the practical defense is straightforward: force a verified template with the flags described above, and scan files with structure-aware tools like gguf-radar before loading them. A model has no legitimate reason to ask you to paste a command into PowerShell. [AI Security Analytics Courses](https://completeaitraining.com/learningpath/ai-for-cybersecurity-analysts/) cover these kinds of supply-chain risks in depth for teams that need structured training.

---

This is the Markdown form of https://completeaitraining.com/news/hugging-face-blocks-five-gguf-models-hiding-malware-after/. The whole site is mapped at https://completeaitraining.com/llms.txt.
