Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHacker News AI→ original

Five GGUF Models on Hugging Face Hid a Trojan, About 2,400 Downloads

A researcher scanned 3.27 million Hugging Face repositories and found five GGUF models carrying trojans, downloaded about 2,400 times in total. The malware is appended to the end of the file, where loaders don't look, and the chat template instructs the model to run a PowerShell command that unpacks it. Files downloaded before November 26 already contain the trojan, while the template that triggers it came later. Treat any command from a local model as untrusted.

AI-processed from Hacker News AI; edited by Hamidun News
Five GGUF Models on Hugging Face Hid a Trojan, About 2,400 Downloads
Source: Hacker News AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHacker News AI ↗
Editor-in-Chief
Mir2ktwo GGUF files with a Windows RAT and a Monero miner
Timdedidthree copies of Qwen3 1.7B whose template tells the agent to download a script
Key metric #3gguf-radar (MIT) detects such templates and rebuilds a clean file

Downloading an "uncensored" model from Hugging Face and running it locally is routine for people who tinker with Ollama and LM Studio. Few people consider that the model file itself could be a weapon. A new study shows this is already happening. The author scanned all 3.27 million public Hugging Face repositories (as of November 27) and found five GGUF models that are still available for download and carry a malicious payload. Their download counters rose from about 1,502 to 2,400 in a single day. Hugging Face counts downloads, not people, so the number of actual victims may be lower.

How a Model Becomes a Trojan

Every GGUF file includes a chat template: a small Jinja2 program that assembles the text the model will see before each response. The attackers use the template's ordinary logic rather than a flaw in the engine. The template quietly appends instructions to the conversation that the user never sees. For example, it tells an agent with terminal access to run a PowerShell command, or to begin every response with a line the person is likely to copy and run.

The second part of the scheme is specific to GGUF. The file header precisely defines where the weights end. Everything after the last tensor is ignored by loaders, and they issue no warnings about it. A whole program can be appended there. This would not work in the Safetensors format: its loader rejects a file in which the tensors do not fill it completely. Antivirus tools and checks that look only at the last few kilobytes don't help either. In one model, about half a megabyte of junk precedes the program, and in another the program is compressed with Deflate and has no recognizable signature.

Two Campaigns

The first belongs to the account Mir2k, created on November 22. It set up 14 repositories, 12 of them empty placeholders for expected releases. Two models, Huihui-Qwen3.5-9B-abliterated-GGUF and Inkling-2-Mini-Uncensored-GGUF, were first published with the program appended but with a clean template. For two to four days the payload simply sat in the files. On November 26 the templates were replaced. Now the model asks for a line at the start of its response that finds the largest model file in the user's profile, extracts 11.47 MB from its tail, unpacks it, and runs d.exe.

Inside is a Windows program with a copy of Tor 0.4.9.16. It checks whether it is running in a virtual machine, persists through the task scheduler and watchdog processes, and sends data out through an onion service. It steals passwords from Chrome, Edge, and Brave (the new Chrome entries encrypted with v20 did not yield to it), targets the Phantom and MetaMask wallet extensions, can intercept keystrokes, capture the screen and webcam, and mines Monero when the machine is idle. Its UAC bypass does not work: the registry paths lost their backslashes at compile time.

The second campaign, under the account timdedid, published three identical copies of Qwen3 1.7B aimed at "security researchers." The template is official but has an addition: if the last message contains a trigger phrase, it inserts a hidden "system directive." This directive makes the agent download a script from a WordPress site to C:\Windows\Temp\payload.ps1 and run it in a hidden window. The researcher could not determine what the script contains.

What to Do

The author also reproduced in the lab three more places where data can be hidden without changing the weights: padding in the alignment, a ZIP archive appended after the weights (the file remains both a model and an archive), and Q8_0 blocks with a zero scale. These have not been observed in real attacks so far.

To check models, he published the open-source utility gguf-radar (Python, MIT). It parses the template without executing it, calculates where the data should end, finds the extra bytes, and rebuilds a clean GGUF with the same weights. Public models can be checked via a link on Hugging Face without a full download. The repository includes YARA rules and indicators of compromise.

The practical rules are simple. Treat any command proposed by a local model as untrusted. If a model has access to tools, replace the built-in template with a verified one. Teams should pass all external models through a scanner before they reach an internal registry. Anyone who downloaded the listed models should check their machines against the indicators and inspect local files. The author advises hubs and runtimes to reject GGUF files containing bytes after the last tensor. Limitation of the study: the second stage of the timdedid campaign was not recovered, and the number of actual victims is unknown.

Story

Key Questions Answered

How a Model Becomes a Trojan?

Every GGUF file includes a chat template: a small Jinja2 program that assembles the text the model will see before each response. The attackers use the template's ordinary logic rather than a flaw in the engine. The template quietly appends instructions to the conversation that the user never sees. For example, it tells an agent with terminal access to run a PowerShell command, or to begin every response with a line the person is likely to copy and run. The second part of the scheme is specific to GGUF.

What are the key details on Two Campaigns?

The first belongs to the account Mir2k, created on November 22. It set up 14 repositories, 12 of them empty placeholders for expected releases. Two models, Huihui-Qwen3.5-9B-abliterated-GGUF and Inkling-2-Mini-Uncensored-GGUF, were first published with the program appended but with a clean template. For two to four days the payload simply sat in the files. On November 26 the templates were replaced.

What to Do?

The author also reproduced in the lab three more places where data can be hidden without changing the weights: padding in the alignment, a ZIP archive appended after the weights (the file remains both a model and an archive), and Q8_0 blocks with a zero scale. These have not been observed in real attacks so far. To check models, he published the open-source utility gguf-radar (Python, MIT).

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Five GGUF Models on Hugging Face Hid a Trojan, About 2,400 Downloads https://news.hamidun.com/en/news/18573/five-gguf-models-on-hugging-face-hid-a-trojan-about-2-400-do

What do you think?
Loading comments…