A model file for a locally run LLM holds more than weights. It also carries a chat template that formats the conversation, among other things. On November 27, 2026, Malspark, a malware analysis tool project, reported that it had found five GGUF models published on Hugging Face that used this template to add attack instructions (Malspark's report). The counts and analysis results in this article come from Malspark's report. What the editorial team confirmed from Hugging Face's public information is described in the section "Current status." We lay out this case as an example of AI model supply chain security: a model file carries instructions as well as data.
What happened: two accounts and two methods
According to Malspark, on November 26 the project scanned all 3,273,389 public model repositories on Hugging Face. Of these, 226,310 were GGUF repositories, and it analyzed 572,184 chat templates without executing them. After manual review, five repositories from two accounts remained. The five had 1,502 downloads in total at the time of the scan on November 26, and 2,428 as of November 27 (Malspark's report, "1. Summary" and "3. Scan Results Across 3.27 Million Repositories"). The report notes that this counts downloads, not people, so the number of affected users is equal to or lower than that. The report's title says "2400+ Victims," but what its body gives is this download count.
Adding instructions through the template
GGUF metadata has a key named tokenizer.chat_template, which holds the template that turns a conversation into the text passed to the model. According to Malspark, the models it found used the template's ordinary features to add text to the conversation that never appears in the chat window. They do not execute operating system commands directly from the template. The report points out that this method is not limited to GGUF, because models in the Safetensors and PyTorch formats carry the same kind of template in a separate file (ibid., "2.1 The Chat Template").
Placing an executable after the weights
Under the GGUF specification, a file is laid out in this order: the header (which includes the metadata key-value pairs), the tensor information, padding, and the tensor data (GGUF specification). According to Malspark, runtimes such as llama.cpp and LM Studio read only the ranges the header points to and ignore everything else. The attacker appended an executable after the last tensor (Malspark's report, "2. Attack Mechanics" and "2.2 Bytes After the Last Tensor").
The report says this appending is not possible with Safetensors. The Safetensors specification requires that the data area be entirely referenced by tensors and that it contain no holes (Safetensors README). As noted above, however, mixing instructions into a template works regardless of the format.

What the two accounts did
For the first account, Mir2k, Malspark gives the following order of events from the repository history. On November 22, the first model was published with an executable already appended at its end. On November 24, the second model was published with the same executable in compressed form. In both, the template was still the original one at that point. On the morning of November 26, the templates of both models were rewritten to tell the model to begin every reply with one PowerShell line. That line reads the end of the model file back out and starts it as an executable. According to the report, the templates were rewritten again nine hours later. The report says files downloaded before November 26 contain the executable but not the trigger. The report also says the account had 14 repositories, 12 of which were empty and named after models expected to be released (ibid., "3.1 Campaign 1: Mir2k, Plant First and Arm Later").
As the result of analyzing this executable without running it, Malspark lists capabilities including remote control, collection of passwords saved in browsers, keylogging, and cryptocurrency mining (ibid., "1. Summary" and "3.1.1 The ollie Implant"). The report does not state how many times it actually ran on users' machines.
The second account, timdedid, published three copies of the same model on November 21 and 22. When the user's latest message contains a specific phrase, the template inserts a fake system directive that tries to make an agent able to call PowerShell download and run an external script. The report says the script that would follow was not recovered, so what it would have installed is unknown (ibid., "3.2 Campaign 2: timdedid, Hijacking Coding Agents").
With either method, simply loading the model file does not run the executable. Either the user has to run the command the template makes the model print, or an agent with tool access has to follow the instruction.
Current status: access to all five is disabled
On November 30, 2026, the editorial team checked the five repositories named in the report through Hugging Face's public API and the model pages. The API returned disabled: true for all five. Each page shows "Access to this model has been disabled" together with a notice that the content infringes the content policy (Hugging Face Content Policy). The creation dates returned by the API are November 22 and 24 for the two Mir2k repositories and November 21 and 22 for the three timdedid repositories, which matches the timeline in the report. The download counts returned by the API totaled 4,221. This, too, counts downloads, not people. That is as far as the editorial team checked; we did not examine the contents of the model files or the executable.
Both modifying templates and hiding malicious code in model files have precedents in research (Pillar Security, EvilModel). Malspark says what its report adds is the method seen in real attacks on Hugging Face, and Mir2k's combination of an executable at the end of the file with a template switched on days later, for which it found no earlier public report (Malspark's report, "2.3 Prior Work").
Malspark has also published gguf-radar (GitHub), an open-source tool that inspects templates and trailing data without executing them, along with detection rules. The editorial team has not tested this tool. For an investigation, please refer to the original report.
What to check before bringing a model in, as AI model supply chain security
Companies that bring external models in-house should check the following points.
- Do you inspect the contents of the chat template of each model you bring in? For cases where the model has access to tools, Malspark lists one countermeasure: specifying a reviewed template on the runtime side (
--chat-template-filein llama.cpp, orTEMPLATEin an Ollama Modelfile). - Do you check whether any data has been appended after the last tensor?
- Do you avoid giving strong privileges, such as shell execution, to agents that use local models? Is anyone running commands suggested by a model without checking them?
- Do you record where each model came from, and the date and version you took in? The templates of the two Mir2k models were rewritten after publication, so the contents of the same repository differed depending on when it was downloaded.
The point that an AI ends up following instructions slipped in from outside is shared with prompt injection countermeasures and the supply chain of AI agent skills.
A model file is not just a set of weights; it also carries instructions. Inspecting the parts other than the weights before bringing a model in is the place to start.
Elith builds AI products for enterprises and conducts advanced research on a foundation of AI safety and security. We share trends in AI safety and security and insights from research and practice in Elith AI Signal. We will keep reading reports like this one against primary sources and reporting on them for those bringing AI into their work.

