November 30, 2026

Poisoned AI Models on Hugging Face Hid Malware. Do Not Run That Command

Downloading an AI model used to feel safe. You pick a model on Hugging Face, download the file, run it on your own computer, and chat with it locally. Nobody else is involved, and nothing leaves your machine.

That feeling is now broken, at least for five models. A scan of every public model repository on Hugging Face found five AI models that hid malware inside their files. Together they were downloaded 2,428 times. The poison was in two places at once: in the model’s chat template, which quietly told the model to show you a PowerShell command to run, and in a Windows trojan hidden after the model data in the file itself, waiting for that command to unpack it.

If you downloaded one of these models, or if you run AI models locally at all, this post is for you. The fix is simple, and the rule it teaches is worth remembering: never run a command just because a model printed it.

Watch the Video

What happened

On 26 November 2026, a researcher scanned all 3,273,389 public model repositories on Hugging Face. The scan covered 226,310 GGUF repositories holding 2.56 petabytes of model weights, and it read 572,184 chat templates. It found five malicious GGUF models, from two separate actors. At the time of the scan on 27 November, all five were still online. Hugging Face has since disabled all five repositories for breaching its content policy. One copy is still live outside Hugging Face: the timdedid mirror on Ollama, timdedid/qwen3-1.7b-cyber, was still listed on 30 November, with 283 pulls and rising.

Here are the five, with their download counts on 27 November:

  • Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF, 1,488 downloads
  • Mir2k/Inkling-2-Mini-Uncensored-GGUF, 458 downloads
  • timdedid/qwen3.8-cyber-uncensored, 271 downloads
  • timdedid/qwen3-cyber-UNCENSORED-2, 136 downloads
  • timdedid/qwen3-cyber-UNCENSORED, 75 downloads

That is 2,428 downloads in total. Hugging Face counts downloads, not people, so the number of affected users is lower than that, or equal to it. The count had grown by more than half in a single day, almost entirely on the two Mir2k models, which had 1,502 downloads on 26 November and 2,428 on 27 November. People were still downloading them while the report was being written.

GGUF is the file format most local AI models use. If you run models with llama.cpp, LM Studio, or Ollama, you have almost certainly downloaded GGUF files. That is why this matters even if you never heard of these five models. The method used here can be used again, with different model names, and the next ones may not be found as fast.

How the poison works: two halves that meet in the middle

The attack is clever because neither half looks dangerous on its own. The malware and the trigger are separate, and they were even uploaded days apart.

Half one: the hidden program

A GGUF file has a simple layout. A header and a metadata table come first, then a tensor table, then the model weights themselves. Programs that load the model read exactly the byte ranges the header points to, and ignore everything else. Anything after the end of the model data is never read, so it does not change how the model loads or behaves, and no runtime warns about it.

An attacker can append a whole program there. That is what the Mir2k campaign did. Both of its models carry the same 11.47 megabyte Windows program, hidden after the last tensor. The first model carries it as a plain Windows program, followed by about half a megabyte of filler, so a scanner that reads only the last few kilobytes of the file sees nothing. The second model carries the same program compressed, which removes every recognisable file signature, while PowerShell can still decompress it in memory.

The program is a remote access trojan called ollie. Once it runs, it settles in properly. A scheduled task runs it every 10 minutes with the highest privileges, two watchdog processes keep it alive, and its process is marked as critical, so ending it crashes Windows. It writes a copy of Tor to disk, starts it, and reaches its operator over an onion service. Through that channel it sends saved passwords from Chrome, Edge, and Brave, read through Windows DPAPI, although Chrome’s newer v20 App-Bound encrypted entries are left undecrypted. It also targets the Phantom and MetaMask wallet extensions, and it supports keylogging, clipboard reading, screenshots, screen streaming, and webcam capture. When the machine is idle, it mines Monero cryptocurrency with RandomX over Tor. It names its folders ollie under AppData/Roaming, close enough to Ollama to look familiar.

Half two: the poisoned chat template

Every GGUF file carries a chat template, a small program stored in the file’s metadata that tells the runtime how to format each conversation before the model reads it. Before every reply, the runtime passes the conversation through that template. The template is invisible to you. You never see it in the chat window.

The attackers poisoned that template. In the Mir2k models, the template adds a hidden instruction telling the model to begin every answer with one specific PowerShell line, copied character by character, and then answer normally. That line reads the hidden bytes back out of the model file on disk and starts them. In the first model it reads about 11.47 megabytes from 12 megabytes before the end of the file. In the second model it reads the last 4.2 megabytes and decompresses them first. Either way, the printed line is what connects the two halves: the model prints the command, and you, the user, are expected to copy it into PowerShell and run it.

The timing shows this was planned. On 22 November, Mir2k uploaded the first model with the program already appended, but with its original, clean template. On 24 November, the second model followed the same way. For those days the payload sat in the files with nothing to start it. On the morning of 26 November, both templates were replaced within about an hour, and the new version read a fixed path in the Downloads folder. Nine hours later both were replaced again, this time searching the whole user profile for the model file. Downloads made before 26 November therefore contain the payload but not the trigger. The victim never downloads anything except the model itself.

The timdedid campaign works differently, but the idea is the same. Its three models are byte-identical copies of a Qwen3 1.7B model aimed at security users. The template is the official Qwen3 template with one addition near the end. When your latest message contains the words “What is”, it inserts a fake system directive telling an agent with shell access to call its PowerShell tool, download a script called value.ps1 from a WordPress site into C:\Windows\Temp\payload.ps1, and run it in a hidden window. The second stage script was not recovered, so what it would have installed is unknown. The README of these models even advises against replacing the embedded template, which keeps the trigger in place.

Why normal scanners missed it

This is the part that should worry anyone who runs local models. The live Mir2k files were tested against common antivirus and scanner tools, and none of them raised an alert. GGUF parsers loaded the files normally. The model weights are untouched, so the model works exactly as expected. Nothing looks wrong until the template prints its command and someone runs it.

That is why the researcher behind the report built an open source tool called gguf-radar. Instead of scanning for known signatures, it checks the structure of the file, then rebuilds it in a clean form. It reads the chat template without running it and flags file reads and writes, decompression, process starts, download commands, and hidden directives. It then works out where the model data must end and reports any bytes after that point, along with non-zero padding and hidden data in the weights. Finally it writes a new file with the padding zeroed, everything after the last tensor dropped, and the weights unchanged. The tool also checks Hugging Face model links directly, reading only the header and the end of each file instead of downloading the weights.

The report also shows three other places data can hide in a GGUF file that the scanned malware did not use: the alignment padding between the tensor table and the first tensor, a ZIP archive appended to a model so the file loads as a model and also imports as Python code, and data hidden inside the weights themselves using zero-scale blocks. Each was reproduced with test files, and none of them changes a single weight or triggers a warning in llama.cpp. The lesson is not that GGUF is broken. It is that a model file is a file like any other, and it should be checked before you trust it.

What to do now: 5 steps

1. If you downloaded one of the five models, stop and clean up

Check your Downloads folder and your model folders for the five names listed above. If you find one, delete it, and do not run any command the model printed. Then check your computer for signs of the ollie program: a scheduled task that runs every 10 minutes, folders named ollie under AppData/Roaming, and unexpected Tor traffic. If you ran the PowerShell command the model printed, assume the machine is compromised. Change your passwords from a different, clean device, starting with your email and your browser saved passwords, and check your crypto wallets. A full clean reinstall is the safest option for a machine that ran this trojan, because it protects itself with watchdog processes and critical process marking.

2. Never run a command just because a model printed it

This is the single most important rule in this post, and it applies to every model, not just these five. A model is not a trusted source of instructions. Its output can be shaped by its template, by its training data, or by a prompt injection in the page you pasted in. If a model tells you to run a PowerShell command, a shell script, or a download command, stop. Read the command yourself. Work out what each part does. If you cannot explain it, do not run it. If the command reads a file, writes an executable, or downloads something, that is a reason to be more careful, not less.

The same rule applies to AI agents with tool access, which is the subject of post #19. An agent that can run shell commands will run the ones its template tells it to. The defence is the same: the human stays in charge of what gets executed.

3. Check models before you run them, and prefer known sources

Before you run a model from a new or unknown publisher, check it. The gguf-radar tool is free and open source, and it can check a Hugging Face link without downloading the full model. It also rebuilds a clean file with the weights unchanged. For companies, the report suggests passing every incoming model through gguf-radar before it reaches an internal model registry or a developer machine, so a poisoned template or an appended payload is caught at the gate rather than on a laptop.

Prefer models from publishers you know, with a history of releases and a real community around them. The Mir2k account was new, with French traces throughout its model cards, system prompts, commit messages, and malware strings. On 22 November it created 14 repositories, 12 of them empty placeholders named after expected releases such as Qwen4-27B, DeepSeek-V4, Llama-4-Scout, and gemma-4-27b, ready to be filled when those models appear. A brand new account, uploading uncensored models, with empty placeholder repositories for models that do not exist yet, is a warning sign. It is not proof of anything on its own, but it is a reason to check before you download.

4. Use a reviewed template when you can

When the model has access to tools, a reviewed template passed through –chat-template-file in llama.cpp, or TEMPLATE in an Ollama Modelfile, takes the embedded one out of the loop. That removes the poisoned template entirely, even if the model file itself is suspect. It does not remove a hidden program appended after the model data, so use it together with a file check, not instead of one. For Safetensors and PyTorch models, the same kind of template lives in a separate file, usually tokenizer_config.json or chat_template.jinja, so this half of the method applies to them too. Check those files as well.

5. Keep your own machine in a state where one mistake does not end it

Run local models on a machine where a compromise would hurt least, if you have the choice. Keep your operating system and browser updated, use a password manager instead of letting the browser save passwords, and keep backups you have actually tested. The ollie trojan steals saved browser passwords, so a password manager with its own master password is worth more here than convenience. If you use crypto wallets, keep the bulk of your funds in a wallet that is not on the machine you experiment with. None of this stops a poisoned model, but it limits what one mistake can cost you.

Frequently asked questions

I use ChatGPT or Claude in the browser. Does this affect me?

No. This attack only affects models you download and run locally, in the GGUF format, from Hugging Face or a similar source. Hosted chatbots do not run files on your computer, and you never download their model weights. The rule in step 2 still applies to them, though. Never run a command just because a chatbot printed it.

I downloaded one of these models but never ran the command. Am I safe?

Almost certainly, yes, but delete the file anyway. Downloads made before 26 November contain the payload but not the trigger, and downloads after that contain both. Without the trigger, the model cannot make you run the command, and the hidden program never starts on its own. Delete the model, and do not run any command it printed while you were chatting with it.

How can I tell if a model file is poisoned?

Check it with gguf-radar before you run it. It reads the chat template without running it, checks for hidden directives and download commands, and reports any bytes after the end of the model data. It can check a Hugging Face link directly, without downloading the full model. Antivirus tools alone missed these files, so a structural check is the right tool for this job.

Are all uncensored models dangerous?

No. Uncensored is a description of how the model answers, not of whether it is poisoned. Many legitimate models are uncensored. The warning sign here was a new account, uploading uncensored models, with empty placeholder repositories for models that do not exist yet. Judge the publisher, not the label.

What is the single most important thing to do today?

If you run local models, check the ones you downloaded recently against the five names above, and delete any match. Then adopt the rule: never run a command a model prints without reading it first and understanding what it does. That one habit stops this whole class of attack, whatever the next poisoned model is called.

Does this affect WordPress sites?

Only indirectly. The timdedid second stage downloads its script from a WordPress site, which is likely a compromised site being used to host malware, not a WordPress flaw. The lesson for site owners is the same as in our other security posts: keep your site updated and checked, because compromised sites get used to host exactly this kind of payload. Read our guide WordPress 7.1.5 Is Out: A Security Update You Should Not Skip. For another recent security alert, see our post on the WP Rocket critical flaw.

A note on who we are

Intellectual Era Solutions builds WordPress websites, online shops, and custom software for startups and small businesses, and we write about AI as well as WordPress because our readers use both. We wrote this alert because poisoned AI models are a new kind of supply chain attack, and the people most at risk are the curious ones: the developers and small business owners who download a new model to try it out. If you need help checking your site, or setting up AI tools safely, contact us through the contact page.

Leave a Reply

Your email address will not be published. Required fields are marked *