Security firm Malspark scanned all 3.27 million public Hugging Face model repositories and found five GGUF models carrying malware, downloaded 2,428 times as of 27 Nov. Two attack paths were in use: a program appended after the last tensor where no loader reads, and a chat template that quietly adds instructions the user never sees.
If your team runs local models, the model file is part of your supply chain. We help businesses set up the review step before a model reaches a laptop or an agent. Start a project โ
What was found.
On 27 Nov, Malspark published the results of a scan of every public model repository on Hugging Face, 3,273,389 of them as of 26 Nov. It included 226,310 GGUF repositories, and it parsed 572,184 chat templates statically, without executing them. GGUF headers and file ends were read with HTTP Range requests, so no model was downloaded in full. After manual review, five repositories remained, belonging to two separate actors, with 2,428 downloads between them. Hugging Face counts downloads, not people, so the number of affected users is lower or equal. Malspark says the count grew from 1,502 on 26 Nov, a rise of more than half in one day, almost entirely on the two Mir2k models.
Why the chat template matters.
Every GGUF file carries a chat template, a small Jinja2 program stored under the metadata key tokenizer.chat_template. Before each reply, the runtime passes the conversation through it to build the exact text the model reads. Chat templates are not unique to GGUF: Safetensors and PyTorch models keep the same kind of template in a separate file such as tokenizer_config.json. The attacks in this study do not try to escape the template engine. They use ordinary template logic to add text to the conversation that never appears in the chat window. In one campaign, a trigger phrase in the user's message makes the template insert a fake system directive that tells an agent with shell access to download and run a script. In the other, the template tells the model to open every answer with a command line that the user may copy and run.
Bytes after the last tensor.
The second technique is specific to GGUF. The header and tensor table define exactly where the model data ends, so anything after that point is never read. It does not change how the model loads or behaves, and no runtime warns about it. The campaign called Mir2k appended a Windows executable there, followed in one model by about half a megabyte of filler so that a scanner reading only the last few kilobytes sees nothing. The second model carried the same program compressed with raw Deflate, which removes recognisable file signatures. Safetensors files do not allow this, because the loader refuses a file whose declared tensors do not fill it exactly.
Plant first, arm later.
According to Malspark, Mir2k is a new account that created 14 repositories on 22 Nov, twelve of them empty placeholders named after expected releases. The first model went up on 22 Nov with the executable already appended but a clean template, and the second on 24 Nov. The templates were switched on during 26 Nov, so downloads made before then contain the payload but not the trigger. Malspark's static analysis describes the payload as a remote access implant that embeds a copy of Tor, persists through a scheduled task, steals browser credentials, targets crypto wallet extensions, and mines Monero when the machine is idle. The second campaign, timdedid, used three byte-identical Qwen3 1.7B copies with a template that triggers on a phrase in the user's message. Malspark could not recover its second-stage script, so what it would have installed is unknown.
What was reported after the disclosure.
Several outlets that checked afterwards, including TensorFeed and sysnote, reported that Hugging Face had disabled all five repositories by 28 Nov, with download counters at roughly 2,800, and that an Ollama library copy of one of the models was still live. These are secondary reports of the platform's state, and we did not verify them independently.
What to do about it.
Malspark's recommendations are concrete. Treat any command a local model suggests as untrusted. When a model has tool access, pass a reviewed template through the --chat-template-file option in llama.cpp or the TEMPLATE instruction in an Ollama Modelfile, so the embedded template is out of the loop. Teams can scan every incoming model before it enters an internal registry: Malspark released an open-source tool called gguf-radar that parses the template into a syntax tree without running it, reports any bytes after the last tensor, checks padding, and rebuilds a clean file with the weights unchanged. In its own tests, antivirus engines and pickle scanners raised no alert on the live Mir2k files. Model hubs and runtimes could end the appended-payload method by rejecting GGUF files with bytes after the last tensor.
Why a small business should care.
Running a model locally feels safer than calling an API, and often is for privacy. This incident is a reminder that it moves the trust decision to the file you download. For any business experimenting with open models, the practical rule is to download from known publishers, keep agents with shell access away from unreviewed models, and scan files before use.
Source: Malspark, 27 Nov 2026.