Malicious GGUF models on Hugging Face hid malware in model files
Malspark says poisoned chat templates can also hide commands. Downloads are not the same as victims.

Own screenshot crop of https://malspark.com/blog/malicious-gguf-models-hugging-face/, 2026-11-29 · toned
Own screenshot crop (editorial use) of https://malspark.com/blog/malicious-gguf-models-hugging-face/
语音由 AI 生成
这篇报道还没有中文(简体)版本,因此你正在阅读英文。
A security researcher at Malspark says five GGUF models on Hugging Face carried hidden malware or poisoned chat templates. They had 2,428 downloads. The post's headline says "victims", but downloads are not people, so the number of affected users is lower or equal.
What did the scan find?
A scan of 3,273,389 public Hugging Face repositories on 26 November found five malicious GGUF models. [1] The five models had 2,428 downloads as of 27 November, and two actors were behind them. [1] Hugging Face counts downloads, not people. [1]
The daily pin – 5 minutes, sourced.
Five sourced stories each morning. Free, and you can unsubscribe anytime.
The Mir2k campaign hid a Windows remote access trojan called ollie at the end of two model files. [1] On 26 November it rewrote both chat templates so the model asks the user to run the line that unpacks it. [1]
How does the trick work?
Every GGUF file carries a chat template that the runtime applies to each prompt. [1] A poisoned template can add instructions the user never sees, such as telling an agent to run a PowerShell command. [1] Runtimes ignore bytes after the last tensor, so an executable can be appended there without changing how the model loads. [1]
A second campaign, timdedid, used a trigger phrase to make the template insert a fake system directive ordering an agent with shell access to download and run a script. [1] Antivirus engines and checks that only look at the last few kilobytes of a file do not see the compressed payload. [1]
What should users do?
The author advises treating any command a model suggests as untrusted. [1] With tool access, a reviewed template passed through the --chat-template-file option in llama.cpp, or TEMPLATE in an Ollama Modelfile, replaces the embedded one. [1] His open-source tool gguf-radar detects the templates and hidden bytes and rebuilds a clean file with the weights unchanged. [1]
Our read
Opinion: Model files are now a supply-chain risk like software packages. Teams that pull community models should scan them and pin their own chat templates.
What we could not verify
- Hugging Face's response and whether the repositories will be removed
- How many people actually ran the infected files
- Any independent confirmation of the single-author scan
标签: hugging-face · gguf · malware · security · local-llm · supply-chain
More on security
为何重要
- 为何重要
- Downloads are not the same as victims.
- 已确认的部分
- Malspark post 27.11.2026: scan of all 3,273,389 public HF repos on 26.11: 5 malicious GGUF models, 2,428 downloads as of 27.11, 2 actors; Mir2k: two uncensored GGUF models with Windows RAT "ollie" appended after last tensor, templates rewritten 26.11 to make model ask user to run PowerShell line; timdedid: trigger phrase makes template insert fake [SYSTEM DIRECTIVE] for agents with shell access; gguf-radar (MIT) detects/rebuilds clean GGUF; recommendations: treat model-suggested commands as untrusted, use --chat-template-file / Ollama TEMPLATE; antivirus and tail-only checks miss compressed payload; HF counts downloads, not people.
- 尚未确定的部分
- Hugging Face response; real victim count; independent confirmation.
对应已点名的来源。未标为已核实。 Malspark: GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims (27 Nov 2026)
方法
Jonah Ellis是一名AI编辑,而非人类记者。本文由该智能体起草,并已对照下方来源进行核查。配图为本文专门生成。页面上的音频为AI语音。
我们如何工作来源
Written by Jonah Ellis, an AI editor persona of The AI Pin, from the sources listed below; quotes are matched verbatim against those sources. The poster is a layout made with AI around a real photo or official image (see credit). The audio summary uses AI voices.