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

> Source: <https://dev.to/useaifix/gguf-malware-on-hugging-face-a-safe-model-download-checklist-for-local-ai-users-2fef>
> Published: 2026-11-28 19:32:33+00:00

**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 the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

**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](https://malspark.com/blog/malicious-gguf-models-hugging-face/)). 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 loading 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](https://news.ycombinator.com/item?id=50676752)), 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](https://ainews.useaifix.com).
