Back to Newsroom

Threat intel4 min read

Poisoned AI models on Hugging Face told users to run a trojan

Five GGUF models from two accounts used their chat templates to push a hidden Windows trojan or a hidden agent instruction. They had 2,428 downloads by 27 November and are now disabled.

4Tify Team

Poisoned AI models on Hugging Face told users to run a trojan

Five AI models on Hugging Face were rigged to get Windows users and AI coding agents to run malware. They came from two accounts, Mir2k and timdedid, and had been downloaded 2,428 times by 27 November 2026. A scan of all 3,273,389 public model repositories on Hugging Face found them on 26 November. By 28 November, Hugging Face listed all five as disabled.

None of the models infected anyone simply by being downloaded or loaded. The trap was in the chat template, the small set of instructions packed inside a GGUF file that formats each conversation before the model sees it. A poisoned template can make an otherwise normal model start its answer with a command, and people tend to trust what their own local assistant prints.

What happened

The Mir2k account uploaded a modified Huihui Qwen3.5 9B model on 22 November and an Inkling model on 24 November. Both files carried a Windows program called ollie, appended after the last tensor of the model weights. GGUF loaders don't read that part of the file, so the models ran and answered normally. At first, both uploads also kept their original, clean templates.

On 26 November, Mir2k replaced both templates. From then on, every reply opened with a PowerShell command and then went on to answer the question as usual. Running the command pulled the hidden bytes out of the model file, wrote them to %TEMP%\d.exe and started the program. About nine hours later the templates were edited again, this time to search the whole user profile for the model file instead of a fixed folder in Downloads. Copies downloaded before 26 November contain the payload but not the command that unpacks it.

ollie is a remote access trojan with a strong interest in passwords. It goes after passwords saved in Chrome, Edge and Brave and after the Phantom and MetaMask wallet extensions. It can also log keystrokes, read the clipboard and take screenshots. It talks to its operator through a bundled copy of Tor, mines Monero when the computer is idle and stays running through a scheduled task that fires every ten minutes. The sample did not decrypt Chrome's newer v20 App-Bound entries.

The timdedid account took a different route. Its three models, uploaded on 21 and 22 November, target AI agents rather than people. When a message contains the phrase "What is", the template slips in a fake system instruction telling an agent with shell access to download a PowerShell script and run it in a hidden window. The script itself was never recovered, so what it does is still unknown. A copy of one timdedid model on Ollama's library, timdedid/qwen3-1.7b-cyber, was still available to download after Hugging Face had pulled the originals.

Who is affected

  • Anyone who downloaded Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF (1,488 downloads) or Mir2k/Inkling-2-Mini-Uncensored-GGUF (458) and ran a command the model suggested on Windows.
  • Anyone who gave an agent with shell access one of timdedid/qwen3.8-cyber-uncensored (271), timdedid/qwen3-cyber-UNCENSORED-2 (136), timdedid/qwen3-cyber-UNCENSORED (75) or the Ollama copy.

Download counts are not people, and a download is not an infection. The real number of victims is at most the download total and probably much lower. All five models were sold as "abliterated", "uncensored" or "cyber" variants, the kind of model hobbyists and security tinkerers go looking for.

Why it worked

Model hubs mostly look for two things: known malware signatures and unsafe file formats such as Python pickle. Earlier malicious models on Hugging Face relied on pickle. GGUF is the format behind most local AI tools (llama.cpp, LM Studio, Ollama) and it doesn't run code when it loads. Here that didn't matter: the template is plain text, the trojan sat where the loader never looks, and the last step was left to a human or an agent that trusts the model.

What to do now

  1. Search your machines for the five model names above and the Ollama tag. Delete any copy, including old ones in model caches.
  2. If anyone ran a PowerShell command a model printed, treat that Windows machine as compromised. Look for %TEMP%\d.exe, unknown scheduled tasks and a Tor process, then rebuild it rather than clean it.
  3. From a clean device, change every password saved in Chrome, Edge or Brave on that machine, revoke active sessions and move any funds in Phantom or MetaMask to a new wallet.
  4. Pin your own reviewed chat template instead of trusting the one in the file: --chat-template-file in llama.cpp, TEMPLATE in an Ollama Modelfile.
  5. Check new GGUF files before anyone uses them. Open-source scanners can read the template and flag data after the last tensor without running the model.
  6. Treat model output as untrusted input. Agents should not run shell commands that came from a model without a human approving them.

Saved browser passwords stolen this way tend to end up in stealer logs that are traded and sold. Our Deep/Dark Web monitoring watches those markets and tells you when logins tied to your company's domain show up, often before anyone tries to use them.

NEWSLETTER

The week’s news,
every Friday.

A short email with what we published that week. You can unsubscribe from any of them.

FRIDAY DIGEST · SAMPLE4TIFY NEWSROOM

This week in security

  • 01Public exploit out for vBulletin flaw that needs no login
  • 02EAGERBEE, ShadowRelay and PhantomNet backdoors hit Russia and Belarus
  • 03European Commission IT outage leaves staff without VPN and email

+ 6 MORE IN THIS ISSUE · UNSUBSCRIBE IN ONE CLICK

ONE OFFER

More than one product?
Get one offer.

Tell us what you need to protect and your budget, monthly or yearly. We combine the products into one offer and one contract, sized to that budget, and we stay with you after it is signed.

Ask for an offer Just tell us how many assets you have and what you want to spend.