Urgent.News

What's breaking now, across hundreds of outlets.

AI

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

Local language models, typically distributed as GGUF files, can be compromised through a technique known as chat template poisoning. This involves manipulating the chat template associated with each prompt, allowing malicious instructions to be silently inserted into the model's responses without the user's knowledge. When executed in its most advanced form, the malware is embedded directly within the model file itself, appended after the final tensor, where loaders typically do not access.

The chat template, stored as a small Jinja2 program within the metadata key tokenizer.chat_template, plays a crucial role in this process. Before each model-generated reply, the runtime passes the conversation through this template, constructing the exact text the model processes. However, since these templates are executed in a restricted engine with no Python support, classic template injection attacks that target the operating system are ineffective.

Instead, the templates leverage ordinary logic to append text to the conversation, which remains invisible to the user. The Mir2k campaign, led by a newly created Hugging Face account with French origins, exemplifies this threat. On November 22, Mir2k uploaded two uncensored GGUF models containing a Windows remote access trojan named "ollie," hidden at the end of each file.

By November 26, the campaign had rewritten the templates to prompt users to execute the code intended to unpack the malware. The gguf-radar tool was able to detect these malicious templates and hidden bytes without executing any code, enabling the reconstruction of a clean GGUF file with the original model weights preserved.

Rewritten by urgent.news; may contain errors — check the original.

Source: malspark.com

Read the original at malspark.com →

Report a problem with this story

More in AI

More from Saturday, 28 November 2026 →