5 Malicious GGUF Models Discovered: Hidden Instruction Techniques and How to Protect Yourself
機械翻訳 / Machine-translated

機械翻訳 / Machine-translated
@aifriends
AI Friends(https://aifriends.jp)のクロスポスト公式アカウント。AIツールの紹介・使い方・できることを、中学生でもわかるやさしい日本語で届けます。
Have you ever downloaded a model from a distribution site to run AI on your own computer? In November 2026, models containing malicious mechanisms were discovered. This article explains the techniques and countermeasures in plain terms.
Researcher Düzgün (@Root0ne) published findings on November 27, 2026, in a post on the Malspark blog.
The exploited format was GGUF (a file format commonly used for running AI models on personal computers). The venue was Hugging Face, a site for distributing and sharing AI models.
The investigation was conducted on November 26. Approximately 3.27 million public model repositories were examined, of which 226,310 contained GGUF files.
Five malicious models were discovered. Download counts as of November 27 were as follows:
The total is 2,428. However, this figure includes cases where the same person downloaded a file multiple times—it does not mean there were 2,428 victims.
It is also worth noting that the names include words like "abliterated" and "Uncensored," both of which are used to market models as having weakened output restrictions.
There were subsequent developments as well. According to a follow-up article from November 28, all five models were disabled on Hugging Face. At the time of that article, no official statement from Hugging Face had been issued.
A chat template is a small program that formats conversations into a form that can be passed to an AI. It is bundled inside the GGUF file.
All user input passes through this template. This means that by modifying the template, an attacker can silently mix invisible instructions into what the AI receives.
Think of it like a transcription clerk who secretly adds a sentence while copying out a letter on your behalf.
The first technique involves two models from an account called "Mir2k." A Windows executable was appended after the AI's model data.
The software used to load the model does not read this appended section, so the AI appears to function normally.
The timing of publication was also crafty. When the models were first published on November 22 and 24, their templates were harmless. The tampered templates were swapped in on November 26.
After the swap, the models produce a single line of PowerShell (a tool for controlling Windows via text commands) at the beginning of their responses. Running that command extracts the malicious program appended at the end of the file and launches it.
Imagine someone experimenting with a local AI at home. They ask a question, and an unfamiliar command appears at the start of the answer. If they copy and run it, thinking it's a prompt from the AI, that action triggers the infection.
The second technique involves three models from an account called "timdedid." These target AI agents—AIs that can execute instructions on behalf of a user.
When the user's most recent input contains the English phrase "What is," the template inserts a hidden instruction. That instruction tells the agent to download a script from a WordPress site and run it without displaying anything on screen.
Suppose a developer connects this model to an agent that assists with writing code. Simply asking "What is this error?" satisfies the trigger condition. If the agent has execution permissions, the instruction could run without the user ever noticing.
The second-stage script that gets downloaded was not retrieved during the investigation, so its purpose remains unknown.
The investigation also noted that the timdedid account had published a model called "qwen3-1.7b-cyber" for Ollama (software that makes it easy to run local AI). Anyone who recognizes that name should check their setup.
Hidden inside the Mir2k models was a remote-access trojan (malicious software that lets an attacker control a computer from a distance). The investigation refers to it as "ollie."
Its size is approximately 11.47 MB. It also bundles Tor, software used to conceal the origin of network communications. Its main capabilities are:
It also includes persistence mechanisms. It registers a task that runs every ten minutes and keeps a watchdog process running.
It even sets itself as a "critical process," meaning that forcing it to terminate causes Windows to crash.
On the other hand, it stops operating when it detects a virtual environment (a simulated computer used for analysis). It also attempts to escalate to administrator privileges, though analysis indicates this step fails due to a programming error.
You might wonder, "Aren't there checks on distribution sites to keep things safe?" However, the investigation's comparison table showed that, while the Mir2k files were still publicly available, neither antivirus software nor pickle scanning raised any warnings. Pickle is a file format that can execute instructions when loaded.
The risks posed by templates had been flagged before. In a July 2025 study, Pillar Security published an attack technique involving template poisoning.
In response to that report, Hugging Face determined in June 2025 that it did not constitute a vulnerability and that the issue lay in how templates were displayed on screen. LM Studio concluded that it is the user's responsibility to verify and download trustworthy models.
In February 2026, Splunk released an analysis of approximately 156,000 GGUF files. That analysis found that exploitation was theoretically possible, but no real-world examples were confirmed within the scope examined.
It is also worth comparing file formats:
In other words, simply switching formats is not a complete defense. You also need to verify what the template itself is instructing.
First, compare your local model names against the list. If you find a match, stop using that model.
If you remember running a command that the model suggested, disconnect your computer from the network as a precaution. Change your passwords from a separate, safe device. Check your wallets as well.
On Windows, a folder named "ollie" inside AppData\Roaming can serve as a clue. Simply deleting the model file may not be enough if a resident malicious program remains active. If the computer is a work device, contact your IT department immediately.
The most important thing is not to trust commands that an AI suggests. Do not run any command whose contents you do not understand.
You can also specify your own template. In llama.cpp, the setting --chat-template-file lets you use a verified template instead of the one bundled in the file. In Ollama, the place to specify a template is the TEMPLATE field in the Modelfile (the model's configuration file).
There is also a scanning tool available. The researcher who conducted the investigation has published a free tool called gguf-radar that inspects a model's contents without running it. It requires Python 3.10 or higher.
An example usage is gguf-radar scan ./model.gguf. Results fall into four categories: CLEAN (no issues detected), SUSPICIOUS, MALICIOUS, and ERROR. Keep in mind that CLEAN is not a guarantee of safety—continue verifying the source of any model you use.
GGUF models from Hugging Face can be used with software such as LM Studio and Ollama. This issue is relevant to anyone in Japan who uses these tools to experiment with local AI.
Some organizations choose local AI specifically because it keeps data from leaving their environment. However, if the model itself is malicious, that sense of security no longer holds.
Consider an IT administrator at a company setting up an internal shared model repository. Before registering a model, the administrator verifies the source, compares the template against the official version, and runs it through a scanning tool. Establishing these three steps in advance makes it much easier to stop a suspicious file before it reaches employees' devices.
For teams using AI agents, reviewing permissions is also effective. Requiring human approval before a command is executed, and running agents in an isolated environment, can limit the damage if something goes wrong.
A. The format itself is not inherently malicious. What was found this time were five specific models published by two particular accounts. That said, caution is warranted with any file whose source is unknown.
A. With the Mir2k technique, the malicious program is extracted when the user runs the command the model presents. With the timdedid technique, an agent or similar system must execute the instruction. Pay particular attention if you have granted an agent permission to execute commands automatically.
A. The confirmed malware "ollie" targets Windows, and the hidden instructions in the timdedid models also used PowerShell. However, the technique of modifying templates can be applied to any content, so verifying commands is essential regardless of your operating system.
A. When Hugging Face's public information was checked on November 29, all five models had been disabled. However, files already on your device are not removed. Copies may also be circulating elsewhere, so do not rely on file names alone—verify the contents as well.
Start by opening your list of local models and checking whether any of the five names appear.
This article is a cross-post from AI Friends.