cd /news/ai-safety/gguf-malware-on-hugging-face-a-safe-… · home › topics › ai-safety › article
[ARTICLE · art-177862] src=dev.to ↗ pub= topic=ai-safety verified=true sentiment=↓ negative

gguf malware on Hugging Face: A Safe Model Download Checklist for Local AI Users

A security write-up by Malspark reported that five malicious GGUF model files on Hugging Face, found in a scan of about 3.27 million public repositories on 26 November, were downloaded 2,428 times. The report describes two techniques: poisoned chat templates that inject PowerShell lines users might copy and run, and trigger phrases that insert hidden system directives telling shell-enabled agents to download and execute scripts. Antivirus engines and checks that inspect only the last few kilobytes of a file missed the compressed payload, according to the post.

recommendation

Scan the entire GGUF file, not just its tail, and load community models with an externally reviewed chat template instead of the file's built-in one.

more in playbook: Securing agents and AI tools
by read2 min views9 publishedNov 28, 2026

gguf malware is the phrase local AI users are searching this weekend, after a security write-up reported that malicious GGUF model files on Hugging Face were downloaded 2,428 times (Malspark). If you run models on your own machine with llama.cpp, LM Studio or Ollama, this one is worth ten minutes. Below is a research-based summary of what the report says, plus a short checklist you can use before any community model.

According to Malspark's post (27 November 2026), a scan of about 3.27 million public Hugging Face model repositories on 26 November found five malicious GGUF models. The author notes that Hugging Face counts downloads, not people, so the number of affected users is at most 2,428.

The report describes two tricks:

tokenizer.chat_template) that the runtime applies to each prompt. In one campaign, the template told the model to start every answer with a PowerShell line the user might copy and run. In another, a trigger phrase made the template insert a hidden "system directive" telling an agent with shell access to download and run a script. The post also says antivirus engines and checks that only look at the last few kilobytes of a file did not catch the compressed payload.

The story reached the Hacker News front page on 28 November (Hacker News), where several commenters said they already run local models inside a VM or on a separate machine.

These steps come from the report's own recommendations, plus common-sense habits.

--chat-template-file in llama.cpp, or setting TEMPLATE in an Ollama Modelfile, so the file's built-in template is out of the loop.

llama-cli -m model.gguf --chat-template-file verified_template.jinja
gguf-radar scan ./model.gguf
gguf-radar sanitize suspicious.gguf -o clean.gguf

Model files are not just passive weights anymore. The chat template is a small program, and the file can carry extra data your runtime silently skips. A two-minute scan and a reviewed template remove most of the risk described here.

I write short, research-based AI news for small businesses and creators at ainews.useaifix.com.

── more in #ai-safety 4 stories · sorted by recency
── more on @hugging face 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/gguf-malware-on-hugg…] indexed:0 read:2min 2026-11-28 · —