Malware-Laced GGUF Models Hit 2,400+ on Hugging Face

Original: GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims

Why This Matters

AI supply chain attacks via model files are a growing, underexamined attack surface.

A scan of 3.27M Hugging Face repositories found 5 malicious GGUF model files downloaded 2,428 times. Two campaigns hide Windows RATs inside model files and use poisoned chat templates to execute payloads.

Security researchers at Malspark scanned all 3,273,389 public Hugging Face model repositories on November 26, 2026, and found five malicious GGUF files still live, collectively downloaded 2,428 times. Two distinct threat actors were identified.

The larger campaign, attributed to actor 'Mir2k', uploaded two uncensored GGUF models with a Windows remote access trojan called 'ollie' appended after the last tensor block — a region that runtimes like llama.cpp and LM Studio never read. On November 26, Mir2k rewrote both models' chat templates so the model prompts users to run the command that unpacks the hidden payload.

The attack vector is GGUF's built-in chat template: a Jinja2 program stored in model metadata under `tokenizer.chat_template`. Runtimes apply it to every prompt automatically. A poisoned template can silently inject PowerShell commands into agent workflows or display instructions users are manipulated into executing — while the model itself answers normally.

A second campaign, 'timdedid', targeted coding agents specifically. The open-source tool gguf-radar can detect hidden bytes and malicious templates without executing anything, and can rebuild a clean GGUF file with weights intact. Researchers note that standard antivirus engines miss the compressed payload because it sits beyond the last tensor.

Source

malspark.com — Read original →