# Five Hugging Face GGUF models hid a Windows trojan in hidden bytes

> A scan of 3.27 million public Hugging Face repositories on 26 Nov 2026 uncovered five GGUF language‑model files that contain a hidden Windows remote‑access trojan, and they were downloaded 2,428 times by the next day.

Oossa · 2026-11-28 · https://oossa.com/en/five-hugging-face-gguf-models-hid-a-windows-trojan-in-hidden-bytes

On 26 Nov 2026 researchers used HTTP range requests to examine every public Hugging Face model repository – more than three million in total – for malicious content inside GGUF files. The scan identified five repositories still online on 27 Nov that hosted malicious models, and those models together recorded 2,428 downloads.

## How the hidden payload works

Each GGUF file includes a chat template, a small Jinja2 script that the runtime runs before the model replies. The attackers rewrote the templates so that, when a user asks a question containing a trigger phrase, the template silently inserts a PowerShell line that the user might copy without seeing any warning.

In the two Mir2k models the template also points to extra bytes appended after the last tensor – a region the loader never reads. Those trailing bytes contain a Windows remote‑access trojan named ollie, hidden until the PowerShell line extracts and runs it.

## What the trojan does after it runs

When the PowerShell command is executed, the trojan reads the hidden bytes, writes them as d.exe in the user's temporary folder, and creates a scheduled task that launches the executable every ten minutes with high privileges.

The payload then drops a Tor 0.4.9.16 client, steals saved passwords from Chrome, Edge and Brave, harvests keys from Phantom and MetaMask extensions, logs keystrokes, captures screenshots and webcam video, and mines Monero using the RandomX algorithm while remaining a critical Windows process.

## Detecting and cleaning the infected models

The open‑source tool gguf‑radar parses the GGUF header and the chat template without executing any code. It flags suspicious template logic, any non‑zero padding, zero‑scale blocks, and bytes that appear after the last tensor, then rebuilds a clean GGUF file with the original weights unchanged.

gguf‑radar also ships YARA rules that match the ollie executable, the self‑extracting template pattern, and the timdedid PowerShell downloader. Companies can run the tool against incoming models before they reach developers’ machines, and individual users can scan downloaded files locally.

## The facts

- A scan of 3.27 million public Hugging Face repositories on 26 Nov 2026 found five malicious GGUF models still online on 27 Nov.
- Those five models had been downloaded a total of 2,428 times by 27 Nov 2026.
- The Mir2k campaign hid a Windows remote‑access trojan named ollie in the trailing bytes of two GGUF files.
- gguf‑radar can rebuild a clean GGUF file while leaving the model weights unchanged.
- The trojan creates a scheduled task that runs every ten minutes, drops a Tor client, steals browser passwords and crypto‑wallet keys, and mines Monero.

## Why it matters

People who download open‑source language models may unintentionally execute hidden malware, so scanning GGUF files before use is essential to keep personal computers and corporate networks safe.

## What it means for you

If you download community LLMs in GGUF format from Hugging Face, treat any command the model suggests as untrusted. Run gguf‑radar (or a similar static scanner) on the file before feeding it to a local runtime such as llama.cpp or LM Studio to avoid inadvertently installing the hidden trojan.

**Our take:** The study proves that attackers can weaponise unused sections of model files, and the risk is real for anyone pulling open‑source GGUF models. Using gguf‑radar or comparable static analysis is a practical step that removes the hidden threat without altering model performance.

## Sources & references

1. [GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims](https://malspark.com/blog/malicious-gguf-models-hugging-face/) – Hacker News, 2026-11-28

Last updated: 2026-11-28
