# Malspark finds five malicious Hugging Face models with 2,428 downloads

Published 2026-11-29 · AI.info Team · AI.info

> A Malspark scan found five malicious GGUF model repositories on Hugging Face, including two with a hidden Windows trojan. CuriousLM later reported that all five repositories were flagged as disabled.

Five malicious GGUF model repositories on Hugging Face had accumulated 2,428 downloads by November 27, with two concealing a Windows trojan inside the model files, according to a scan published by security researcher [Malspark](https://malspark.com/blog/malicious-gguf-models-hugging-face/). The other three used hidden instructions aimed at AI agents with shell access.

The scan covered all 3,273,389 public Hugging Face model repositories on November 26. Download counts do not identify individual users, so the number of affected users was lower than or equal to the download total, Malspark said.

All five repositories were flagged as disabled when CuriousLM checked the Hugging Face Hub API on November 28, the outlet reported. Malspark had found them still online a day earlier.

## Two approaches in the scan

The scan included 226,310 GGUF repositories holding 2.56 PB of weights and examined 572,184 chat templates without running them. The scan read file headers and ends through HTTP Range requests rather than downloading entire models, and a manual review removed security test repositories, harmless prompts and published research samples.

The five remaining repositories were linked to two accounts, Mir2k and timdedid. One Mir2k model had 1,488 downloads and the other had 458 by November 27; the three timdedid repositories had 271, 136 and 75 downloads, respectively.

GGUF files contain model weights as well as a chat template that a runtime applies to conversations before the model reads them. Malspark found that malicious templates could insert instructions into that conversation without displaying the inserted text in the chat window.

## A payload planted before its trigger

The two Mir2k files carried a Windows remote access trojan called ollie after the last tensor, according to the research. Model loaders read the byte ranges described in a file's header and ignore data appended beyond the model weights, allowing the files to load normally.

The first model was uploaded on November 22 with the executable already appended but with its original template. The second followed on November 24 with the same executable compressed, also with a clean template.

On November 26, both templates were replaced within about an hour, the repository histories showed. The revised templates instructed the models to start replies with a PowerShell command that would extract the hidden program from the model file and start it if a user ran the command.

The first template revision looked for the file in the Downloads folder. Nine hours later, both templates were replaced again with versions that searched the user's profile. Files downloaded before November 26 contained the payload but not the template trigger, Malspark said.

## Instructions aimed at agents

The other campaign used a different route: a trigger phrase in a user's message caused the template to insert a fake system directive. According to Malspark, that directive instructed an agent with shell access to download and run a script.

The researcher did not recover the second-stage script for the timdedid models. The reported method relied on the agent following the injected instruction rather than on the template escaping its restricted engine.

Malspark also describes an open-source tool, gguf-radar, that it says detects poisoned templates and hidden bytes without running the model. It can rebuild a GGUF file with the model weights unchanged.

## Sources

1. Original source · Blog post [Malspark](https://malspark.com/blog/malicious-gguf-models-hugging-face/) “GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims” malspark.com

Other pages read

2. [CuriousLM](https://curiouslm.com/blog/malicious-gguf-models-hugging-face-chat-template-hidden-malware) “Malicious GGUF Models on Hugging Face Hid Malware in Chat Templates” curiouslm.com

## Related stories

- [Unsloth updates Qwen3.8-27B GGUFs with Dynamic V3.1 preview](https://ai.info/news/unsloth-qwen3-8-27b-dynamic-v3-1-gguf-update)
- [AI Domain Typos Led to Malware Lures, Island Research Finds](https://ai.info/news/ai-domain-typos-malware-island-research)
- [Zimperium reports AI-assisted malware that can restore itself](https://ai.info/news/zimperium-ai-assisted-mobile-malware-rathat-2026)
- [Hugging Face reports faster Inkling 2 Mini inference on one GPU](https://ai.info/news/hugging-face-inkling-2-mini-single-gpu-inference)
- [Hugging Face details pooling-aware training for embedding models](https://ai.info/news/hugging-face-token-pooling-aware-embedding-training)

## Explore

[More articles](https://ai.info/news)

---

Canonical: https://ai.info/news/hugging-face-gguf-models-hidden-malware
