JupiteX Get the app
Defence & Security29 Nov 2026 · about 6 min

GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims

The brief

A model file carried more than weights: Mir2k’s GGUFs concealed a Windows remote access trojan called ollie. Their templates also altered replies to help launch it. This matters because the model could appear to answer normally while malicious instructions and code stayed out of the visible chat. Mir2k uploaded two uncensored GGUF models. Both had ollie appended after the last tensor, where the runtime would not read it as model data. One copy was plain; the other was compressed with raw Deflate. A template-added PowerShell line could extract and start the hidden program. The scan found five malicious models among 3.27 million public Hugging Face repositories, with 2,428 downloads by November 27, 2026. The article also describes a separate timdedid template attack. Its open-source tool gguf-radar detects hidden templates and bytes without running files, then can rebuild clean GGUFs with unchanged weights.

01

What did researchers find hidden in the malicious GGUF models on Hugging Face?

A model file carried more than weights: Mir2k’s GGUFs concealed a Windows remote access trojan called ollie. Their templates also altered replies to help launch it. This matters because the model could appear to answer normally while malicious instructions and code stayed out of the visible chat.

Mir2k uploaded two uncensored GGUF models. Both had ollie appended after the last tensor, where the runtime would not read it as model data. One copy was plain; the other was compressed with raw Deflate. A template-added PowerShell line could extract and start the hidden program.

The scan found five malicious models among 3.27 million public Hugging Face repositories, with 2,428 downloads by November 27, 2026. The article also describes a separate timdedid template attack. Its open-source tool gguf-radar detects hidden templates and bytes without running files, then can rebuild clean GGUFs with unchanged weights.

02

How many malicious models and downloads did the scan find, and why might downloads not equal affected people?

The scan found five malicious models in 3.27 million public Hugging Face model repositories. Those five had 2,428 downloads as of November 27, 2026. The striking point is that the download total is not a count of confirmed infected people.

Hugging Face counts downloads, not individual users. A download count does not establish that a file was run or that a user was affected. The article therefore says the number of affected users is lower than or equal to the download total.

The scan covered all public model repositories on November 26, 2026, and found five malicious GGUF models still online. The article attributes them to two actors. Downloads indicate potential exposure, not a verified victim count, so the article recommends checking endpoints against its indicators and scanning local GGUF files with gguf-radar.

03

What is a chat template, and how can it add instructions that users never see?

A chat template is a small Jinja2 program stored in GGUF metadata under tokenizer.chat_template. Before each reply, the runtime uses it to turn the conversation into the exact text the model receives. It matters because that text can include content users never see in the chat window.

The attacks described use ordinary template logic rather than escaping the runtime’s restricted rendering engine. In the timdedid models, a trigger phrase in a user message makes the template insert a fake system directive. It tells an agent with shell access to download and run a script.

In the Mir2k models, the template adds a system message telling the model to begin every answer with a PowerShell line. A user may see and copy that line, but not the hidden instruction that made it appear. The same kind of template also exists in Safetensors and PyTorch model formats, in separate files.

04

How can an executable be hidden after a GGUF file’s last model tensor without changing how the model loads?

A GGUF header and tensor table describe where the model’s data ends. The runtime reads the byte ranges identified by those structures, including the weights, and ignores anything beyond the farthest tensor. That makes the file layout a place an attacker can hide extra material without changing the model data the runtime loads.

Mir2k used that gap to append a Windows program to each of two models. One contained the program plainly, followed by about half a megabyte of filler. The other stored the same program compressed with raw Deflate, removing recognizable file signatures.

The hidden bytes do not alter how the model loads, and the article says runtimes do not warn about them. Mir2k’s template-added PowerShell line connects the hidden payload to the user: it reads bytes from the model file and starts them. The article contrasts this with Safetensors, whose loader refuses files that do not end exactly after their declared tensors.

05

What could happen if a user copies and runs the PowerShell line included in a model’s reply?

The risky line was not just unusual text in a reply. Mir2k changed both model templates so answers began with a PowerShell command that could retrieve and start the concealed program. The article identifies that program as ollie, a Windows remote access trojan.

The mechanism joins two parts of the attack. Bytes appended after the last GGUF tensor hold the program, either plainly or compressed with raw Deflate. The PowerShell line reads those bytes from the model file on disk; for the compressed copy, it can decompress them in memory before starting the program.

A user who copies and runs the line could therefore launch the hidden trojan. The article does not report how many people did so or confirm specific infections. It recommends checking endpoints against its indicators and scanning local GGUF files with gguf-radar, rather than relying on antivirus or checks of only a file’s last few kilobytes.

06

How can gguf-radar check a model for hidden instructions or payloads without running it?

gguf-radar is an open-source tool for checking GGUF files without executing them. The article says it detects malicious chat templates and bytes hidden beyond the model’s data. That matters because the payload can be designed to evade a quick visual review or checks that inspect only a small part of a file.

The tool also rebuilds a clean GGUF file. The rebuilt version keeps the model weights unchanged while removing the concealed material. This gives users a way to inspect and clean a file without needing to run its hidden program.

The article cautions that antivirus engines and checks that look only at the last few kilobytes may miss the compressed payload. It recommends scanning local GGUF files with gguf-radar and checking endpoints against the listed indicators. The article also includes YARA rules and a MITRE mapping to support detection and analysis.

07

Why can downloading an open-source model file carry software supply-chain risks, even when the model appears to answer normally?

An open-source model file may contain more than the weights users expect. In GGUF, a chat template can add unseen instructions to prompts, while bytes after the last tensor can hold an executable. A normal-looking answer therefore does not show everything the file may do or contain.

The article’s Mir2k example combined both methods. Its template told the model to begin replies with a PowerShell line, and the GGUF contained ollie, a Windows remote access trojan. The line could read the hidden program from the model file and start it. The timdedid models used a trigger phrase to insert a fake system directive instead.

This risk can extend beyond GGUF templates: Safetensors and PyTorch models also carry chat templates in separate files. The article presents gguf-radar as one defensive measure for GGUF, and recommends endpoint checks and local file scans. Its findings show why inspecting a model file matters alongside judging its visible responses.

This brief was written by AI from the original reporting and checked by other models. Names, figures and quotes come from the source; read it for full context.

Read more in the JupiteX app

Pulse is free. New stories every 4 hours, each one broken into the questions that explain it.

Or read more news on the web