Malicious GGUF Models Found on Hugging Face: 5 Removed

Key Takeaways

  • Security researcher Root0ne, via Malspark, published findings on 27 November 2026 from a scan of all 3,273,389 public Hugging Face model repositories on 26 November: five malicious GGUF model repositories with 2,428 cumulative downloads as of 27 November.
  • Two campaigns were identified: Mir2k (2 repos) hid a Windows remote-access trojan named "ollie" after the last tensor and rewrote both chat templates so the model opens every reply with a PowerShell line that unpacks it; timdedid (3 repos) poisoned chat templates so a trigger phrase injects a fake system directive ordering an agent with shell access to download and run a script.
  • The 2,428 figure counts download events recorded by Hugging Face, not infected people or computers — Malspark says so explicitly, and this article does not relabel it as victims.
  • The attack needs the user, or their agent, to actually run the printed PowerShell line or the fetched script; the model file alone does not execute.
  • Hugging Face had disabled all five repositories by 28 November 2026, but one outlet's check found a copy of one timdedid model still listed on Ollama's public library — a status confirmed by that outlet only, not by Ollama.
  • Malspark released the open-source gguf-radar tool, which detects the poisoned templates and hidden bytes without running anything and rebuilds a clean GGUF file with the weights unchanged.
  • The five repositories were: Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF (1,488 downloads), Mir2k/Inkling-2-Mini-Uncensored-GGUF (458), timdedid/qwen3.8-cyber-uncensored (271), timdedid/qwen3-cyber-UNCENSORED-2 (136), and timdedid/qwen3-cyber-UNCENSORED (75).

The Scan That Covered the Whole Hub

The numbers behind this story are, by the standards of AI security research, unusually complete. On 26 November 2026, security researcher Root0ne ran a scan of every public model repository on Hugging Face — all 3,273,389 of them — looking for a specific kind of malicious modification to GGUF model files. The scan covered 226,310 GGUF repositories holding 2.56 petabytes of weights, and parsed 572,184 chat templates statically, without executing any of them. The findings were published the following day, 27 November, via Malspark, under the title that has since been widely cited: "GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims". Five repositories remained at the end of the scan. All five were still online on 27 November. Together they had accumulated 2,428 downloads.

It is worth pausing on the method, because it explains both the strength and the limits of the findings. The scan was static: it read files and templates without running them. That matters because it means the researcher could examine the entire Hub — every public repository — without the risk and cost of executing millions of models. It also means the findings describe what the files contain, not what they did when run. The distinction is important throughout this story: a malicious file is not the same as a successful infection, and a download is not the same as a victim.

GGUF is the file format most commonly used to distribute open-weight language models for local use. It was designed to be a convenient, self-contained package: the model's weights, its configuration, and its metadata — including the chat template that shapes how conversations are formatted — all live in a single file. That convenience is also the vulnerability. A GGUF file is large, often several gigabytes, and most users never inspect its contents. They download it, load it into a tool such as llama.cpp or Ollama, and start chatting. The format's design assumes that the person who packaged the file is trustworthy. The Malspark findings show what happens when that assumption fails.

The chat template is the first of the two hiding places. It is a small Jinja2 program stored under the metadata key tokenizer.chat_template, and it reshapes every conversation before the model reads it. Most users never see it. It is not displayed in the chat window, and it is not part of the model's visible output. It is, in effect, a piece of code that runs every time the model is used — and because it is code, it can be modified to do things the user never asked for. The second hiding place is the tail of the file itself: the space after the last tensor, where arbitrary bytes can be appended without affecting the model's weights or its visible behaviour. A scanner that reads only the first few megabytes of a file, or that checks only the model's structure, will see nothing wrong.

Two Campaigns, Two Different Traps

Malspark attributes the five repositories to two operator clusters, and the two clusters worked differently enough that they deserve to be described separately. The larger campaign, which Malspark calls Mir2k, uploaded two uncensored-style GGUF models with a Windows remote-access trojan hidden at the end of each file, and then rewrote both models' chat templates so that the model asks the user to run the line that unpacks it. The smaller campaign, timdedid, published three Qwen3-based "cyber-uncensored" models whose poisoned chat templates were designed not for a human user, but for an AI agent with shell access.

The Mir2k campaign is the more elaborate of the two, and its timeline is what makes it unusual. The Mir2k account is new on Hugging Face and leaves French traces in its model card, system prompt, commit messages and malware strings. On 22 November, it created 14 repositories, and uploaded a model called Huihui-Qwen3.5-9B-abliterated with the executable already attached to its end, but with a clean template. On 24 November, it uploaded Inkling-2-Mini-Uncensored with the same executable in compressed form, again with a clean template. The malware was in place from the start, but the trigger was not. Then, on 26 November — the same day as Malspark's scan — Mir2k rewrote both chat templates, and replaced them again about nine hours later. The new version adds a system instruction telling the model to open every reply with one fixed PowerShell line. That line looks for the largest GGUF file in the user's profile, extracts the trailing bytes, saves them as a file in the temp folder, and starts it.

The sequence — plant first, arm later — is significant. For two to four days, the models sat on Hugging Face with their payloads in place but their triggers absent. Anyone who downloaded them in that window received a file containing a hidden trojan, but a file that would not, on its own, do anything. Only when the templates were rewritten did the trap become live. That delay has two effects. First, it means the download count accumulated while the models looked, to any casual inspection, clean. Second, it means the models' reputation — their download counts, their position in search results, any early positive feedback — was built before the malicious behaviour appeared. A user who downloaded the model on 23 November and trusted it because it had been available for days would have had no reason to suspect that the template had changed underneath them.

The payload itself, which Malspark names "ollie", is an 11.47 MB Windows x64 program. Of that, about 10.25 MB is a bundled Tor client that carries traffic to an onion service run by the operator — a design that makes the trojan's communications hard to trace and hard to block. Malspark's static analysis found that the program checks for VirtualBox, VMware and Sandboxie drivers, and for usernames such as "sandbox" and "test" — the classic signs of a malware author trying to avoid being analysed in a virtual machine or a security sandbox. The two Mir2k models carried the same program in two different forms: the first as a plain Windows program followed by about half a megabyte of filler, so that a scanner reading only the last few kilobytes of the file would see nothing; the second Deflate-compressed, so that no file signature survives at all. The compression is the more sophisticated of the two tricks: a compressed payload has no recognisable header, no magic bytes, and nothing for a signature-based scanner to match.

The timdedid campaign worked differently. On 21 and 22 November, the timdedid account published three byte-identical copies of a Qwen3 1.7B model aimed at security users, plus a mirror on Ollama. The three repositories are timdedid/qwen3.8-cyber-uncensored (271 downloads), timdedid/qwen3-cyber-UNCENSORED-2 (136 downloads), and timdedid/qwen3-cyber-UNCENSORED (75 downloads). Their template is Qwen's official chat template with an addition near the end: whenever the latest user message contains the words "What is", the template inserts a fake [SYSTEM DIRECTIVE] block. That block orders an agent with shell access to download and run a script — fetching it into the Windows temp folder and running it in a hidden window.

The timdedid attack is aimed at a different victim from Mir2k's. Mir2k targets a human user who copies and runs a PowerShell line. Timdedid targets an AI agent — a coding assistant, an automation tool, a research agent — that has been given shell access and that follows instructions embedded in its context. The fake system directive is designed to look like a legitimate instruction from the system, and an agent that cannot distinguish a template-injected directive from a real one will obey it. That is a supply-chain attack on the agent ecosystem itself: the poison is not in the model's weights, which are an unmodified Qwen3 model, but in the packaging around them, and it only fires when the model is used in the way its target audience uses it — inside an agent with tools.

Malspark could not recover the timdedid second-stage script, and public reputation services had no record of the URL it points to. The impact of that campaign is therefore unknown — unknown in a way that should worry readers more, not less, than a known impact would. A recovered payload can be analysed, blocked and cleaned. An unrecovered one cannot.

Why the Chat Template Is the Real Story

The hidden executable is the part of this story that makes headlines, but the chat template is the part that should change how people work. Malspark's analysis makes a point that deserves emphasis: the attacks found in this study do not need to escape the template engine. Classic server-side template injection relies on breaking out of a restricted engine to run arbitrary code. These attacks do not bother. They use ordinary template logic to add text to the conversation — text that never appears in the chat window — and that text steers the model, or the agent, toward dangerous output.

The reason this works is that the template is trusted implicitly. When a user loads a GGUF model, the software they use — llama.cpp, Ollama, or any of the many tools built on them — reads the chat template from the file and applies it to every conversation. The template is, in effect, part of the model. But unlike the model's weights, which are the product of an expensive training process and are difficult to modify without detection, the template is a small text file that anyone can edit. A model card on Hugging Face can look legitimate, the weights can be a genuine copy of a well-known open model, and the template can still contain an instruction that no user ever sees.

That is also why the combination matters. Either half of the attack, on its own, would be less effective. A hidden executable without a template to unpack it is inert — it sits at the end of the file, doing nothing, until something runs it. A poisoned template without a payload is a nuisance — it can make the model print a suspicious line, but the line on its own does nothing. Together, they form a complete attack: the payload provides the capability, and the template provides the trigger. Malspark's summary puts it precisely: the new part is the combination seen in real attacks — an executable appended after the last tensor, a template that unlocks it, and a delay of days between upload and activation.

The scale of the exposure is worth stating plainly. The scan covered 3,273,389 public repositories, and found five malicious ones. That is a tiny fraction — roughly one in 650,000. But the five that were found had already been downloaded 2,428 times by 27 November, and the count was still rising: a re-check by one outlet on 28 November put the total at 2,807, with the largest repository, Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF, rising from 1,488 to 1,711 downloads in a single day. The absolute numbers are small by the standards of the Hub, but they are not trivial — and they were recorded before the repositories were disabled, which means the downloads continued after the findings were published.

What Hugging Face Did, and What Remains

Hugging Face acted quickly once the findings were public. By 28 November, all five repositories had been disabled, with the Hugging Face API marking them as disabled for breach of its content policy, and neither the Mir2k nor the timdedid account showed any public models. That is the right response, and it is fast by the standards of platform moderation. But it is not a complete response, for three reasons.

First, disabling a repository does not recall the files that have already been downloaded. The 2,428 downloads recorded by 27 November — and the 2,807 recorded by 28 November — represent files that are now sitting on users' machines, in some cases with their templates already rewritten to the armed version. Hugging Face cannot reach into those machines and delete them. Anyone who downloaded one of the five models needs to check whether they have it, and to remove it.

Second, the takedown does not cover mirrors. A follow-up check by one outlet on 28 November found that a copy of one timdedid model was still listed on Ollama's public library, with its trap intact. That finding comes from a single outlet's check, not from Ollama itself, and it should be read with that caveat — but if it is accurate, it means the timdedid campaign remains available to anyone who looks for it on Ollama, even after Hugging Face removed it. The Ollama mirror was published by the timdedid account itself, which means the campaign was never confined to a single platform.

Third, the scan found five repositories, but it found them by looking for specific indicators. The tooling and the indicators are now public, which helps defenders — but the attackers have also seen them, and the next campaign will use different indicators. The history of supply-chain attacks suggests that a disclosed technique is quickly replaced by a variant designed to evade the disclosure. The five repositories are gone. The technique is not.

What to Do If You Downloaded One of These Models

The practical advice that follows is the advice Malspark itself gives, and it is worth repeating in full because it is simple and it works. First, if you downloaded any of the five repositories, delete the files. Do not try to clean them by hand unless you know what you are doing; Malspark's gguf-radar tool can rebuild a clean GGUF file with the weights unchanged, but for most users deletion is the safer option. Second, check your endpoints against the indicators of compromise published in Malspark's report, and scan any local GGUF files with gguf-radar or an equivalent tool before loading them. The tool's basic commands are gguf-radar scan ./model.gguf to check a file and gguf-radar sanitize suspicious.gguf -o clean.gguf to rebuild it. Third, and most importantly, never run a command that a model prints. Never copy a PowerShell line from a model's reply into a terminal, and never let an agent with shell access follow instructions that appear in a model's output. The Mir2k attack depends entirely on a human running the printed line. The timdedid attack depends entirely on an agent obeying an injected directive. In both cases, the human — or the human who configured the agent — is the last line of defence, and the defence is simply to refuse.

More broadly, the incident is a reminder that the open-weight ecosystem's trust model has a gap. The community has spent years building tooling to verify that a model's weights are what they claim to be — checksums, model cards, reproducible training runs — and comparatively little on verifying the packaging around the weights. A chat template is code. A file tail is a hiding place. Both deserve the same scrutiny as the weights themselves. The gguf-radar tool is a step in that direction: it detects poisoned templates and hidden bytes without running anything, and it rebuilds clean files. But a tool only helps if people use it, and the habit of scanning a model before loading it is not yet widespread. The Malspark findings are an argument for making it standard practice — for treating every downloaded model file as untrusted until checked, in the same way that security-conscious users already treat every downloaded executable.

The incident also belongs in a wider pattern of supply-chain attacks on the AI ecosystem. Earlier this week, the 1Password GitHub breach raised similar questions about how much trust developers place in the infrastructure around their tools, a story we covered in our report on the 1Password GitHub breach. And the exposure of DeepSeek requests through Phala and OpenRouter, covered in our report on Phala and OpenRouter DeepSeek requests, showed how data can leak through the plumbing of the AI stack in ways that no single provider controls. The GGUF findings are the local-model counterpart to those cloud stories: the same supply-chain logic, applied to files that live on a user's own machine. In each case, the vulnerability is not in the AI itself, but in the infrastructure that delivers it — and in each case, the fix is boring, procedural, and effective: check what you download, before you run it.

There is a final, forward-looking point. The tools for running open-weight models locally are becoming more capable and more widely used, and the agents that wrap them are gaining shell access, file access and network access as a matter of routine. The timdedid campaign is an early example of an attack designed for that world — an attack that assumes its victim is not a person reading a chat window, but a program with tools. As agents become more common, that assumption will become more often correct. The defences will need to catch up: agents that treat model output as data, not as instructions; templates that are verified before use; model files that are scanned as a matter of course. None of that is exotic. All of it is, at present, optional. The Malspark findings are a reason to make it standard.

What We Could Not Verify

  • The number of people or computers actually infected: 2,428 is the count of download events recorded by Hugging Face as of 27 November, not a count of victims, and Malspark says so explicitly. No infection count has been reported.
  • The contents of the timdedid second-stage script: Malspark could not recover it, and public reputation services had no record of the URL it points to, so the impact of the timdedid campaign is unknown.
  • Whether a copy of a timdedid model remains on Ollama's public library: that finding comes from one outlet's check on 28 November and has not been confirmed by Ollama.
  • Whether the download counts continued to rise after the repositories were disabled, and what the final totals were; the 2,807 figure comes from one outlet's re-check on 28 November, not from Hugging Face.
  • The identity or location of the operators behind the Mir2k and timdedid accounts; the French traces in Mir2k's materials are noted by Malspark but do not establish who the operator is.
  • Whether other malicious GGUF repositories exist that this scan did not detect, whether on Hugging Face or on other platforms; the scan found five repositories matching its indicators, which is not proof that no others exist.
  • Whether any of the downloaded files were actually executed by a user or an agent; no confirmed infection has been reported at the time of writing.

Similar Posts