Zhidaily AI · Intelligence · Daily
Zhidaily
Issue 30 · November 29, 2026 · Sun
Today's stories
4 stories · 1 companies
Home / November 29, 2026 / Malicious GGUF Models on Hugging Face Hit 2,428 Downloads
← Back
News Safety / Models · Hugging Face Score72

Malicious GGUF Models on Hugging Face Hit 2,428 Downloads

In brief
A security firm found five poisoned GGUF models on Hugging Face that hide malware in the file and use the chat template to get it run. Anyone running community models locally should check what they do
Hacker News homarp · Hacker News · malspark.com
Nov 28 · 19:57 Read the original ↗
01Summary

Security firm malspark scanned all 3.27 million public Hugging Face model repositories on 26 November 2026 and found five malicious GGUF models with 2,428 downloads as of 27 November. The models answer normally, but their chat templates (the per-model prompt formatting script) quietly add text the user never sees: one campaign, Mir2k, tells the model to open every reply with a PowerShell line that unpacks a Windows remote-access trojan hidden after the last tensor of the model file. The trojan steals browser passwords and wallet data, logs keystrokes, and mines Monero over Tor when idle. Hugging Face counts downloads, not people, so the number of affected users is lower. malspark released gguf-radar, an open-source MIT-licensed tool that detects these templates and hidden bytes without running the model and rebuilds a clean file with the weights unchanged, plus YARA rules and an indicator table. Antivirus and scanners that read only the last few kilobytes of a file miss the compressed payload.

02Why chat templates are an attack surface

GGUF is the file format most people use to run open-weight models locally, and each file carries a chat template — a small program the runtime runs on every prompt to format the conversation before the model sees it. In July 2025, Pillar Security showed that these templates can carry hidden instructions that change what the model outputs without touching the weights, training data, or deployment setup. The new finding is that the same trick can be paired with an executable appended after the model data, which loaders never read.

03What to check now

Anyone who has downloaded community GGUF models should scan local files with gguf-radar, which reads the chat template and any bytes after the last tensor without loading the model, and can rewrite a clean copy with the weights unchanged. The tool also checks Hugging Face model links over HTTP Range requests, so a team can screen incoming models before they reach an internal registry or a developer machine. Because the payload sits past the last tensor, antivirus and scanners that read only the file's final kilobytes miss it. For agent setups, pass a reviewed template explicitly (--chat-template-file in llama.cpp, TEMPLATE in an Ollama Modelfile) so the embedded one is not used, and treat any command a model prints as untrusted.

04From the comments

Commenters pushed back on how dangerous the attack really is: one argued nothing executes in plain chat mode and that the real fix is isolating the agent, not the inference engine, while another said any system hit by this was already insecure because the same instructions could be hidden in the weights themselves. Several said they already run local models in a VM or otherwise sandboxed setup.