News3 min readVerified: November 28, 2026

Malware hidden in local AI models on Hugging Face: downloaded over 2,400 times

Security researcher Düzgün found five infected local AI models on Hugging Face, downloaded over 2,400 times combined. The files concealed Windows malware and tampered chat templates.

Malware hidden in local AI models on Hugging Face: downloaded over 2,400 times
Photo: Prompted News StudioAI policy

Explained in 30 seconds

  • Malspark researcher Düzgün (@Root0ne) scanned all 3,273,389 public Hugging Face repositories and uncovered five malicious GGUF models.
  • The infected files reached 2,428 downloads before Hugging Face disabled the accounts, though copies surfaced elsewhere.
  • Attackers appended the 11.47 MB Windows trojan ollie past the model data and poisoned chat templates to launch scripts via PowerShell.

On November 26, security researcher Düzgün – known online as @Root0ne – scanned all 3,273,389 public model repositories on Hugging Face. During the sweep, the founder of security firm Malspark uncovered five infected models in the GGUF format, a popular, compact file type used to run AI locally on home computers. Before Hugging Face disabled the offending accounts, those files had already been downloaded 2,428 times combined. For anyone running tools like Ollama or LM Studio on their own machine, it is a stark reminder that local AI isn't automatically safe.

In total, Düzgün inspected more than 226,000 repositories holding these local model files, totaling 2.56 PB of data – roughly 2.5 million GB. When you pull down an open-source AI model, you naturally assume the file holds nothing more than harmless numbers. "While scanning 3.27 million public model repositories, I found five GGUF models with hidden malware that were downloaded over 2,400 times," he writes in his Malspark research report.

How one ordinary-looking model file sneaks malware onto your PC

The attackers relied on two different tricks to infect machines. In the first method, tracked as the Mir2k campaign, they tacked a separate Windows remote access trojan onto the very end of the file, past the actual AI data. That hidden payload – an 11.47 MB trojan called ollie – packed a cryptominer to silently mint digital coins alongside a covert Tor connection to fetch fresh commands. Because local AI apps stop reading once the model data ends, the chatbot keeps running without a hitch. Oversized model files often sail right past standard antivirus scanners, too.

The second trick is just as sneaky and showed up in both the Mir2k and timdedid campaigns. Here, attackers tampered with the model's built-in chat template, which dictates how your prompts and the AI's replies are structured. The moment you load an altered language model, it slips in hidden instructions telling Windows PowerShell to run external scripts or launch that hidden trojan. Whenever a local AI agent runs autonomously with permission to execute commands on your system, a single poisoned file can cause real damage.

Attack methodHow the infection worksKey risksHow to protect yourself
Hidden payload at the endWindows trojan ollie (11.47 MB) glued past the AI weightsRemote intrusion, cryptomining, and Tor backdoorScan links beforehand with gguf-radar and strip trailing bytes
Poisoned chat templateMalicious command hidden inside the chat formatting rulesAI agent launches external scripts via PowerShellInspect templates and lock down agent permissions
Circulating copiesInfected files resurface outside Hugging FaceAntivirus tools often skip huge model filesDownload only from trusted publishers and scan first

Even seasoned developers were caught off guard: why local AI agents face extra risk

On November 28, the findings quickly drew heavy attention on ExplainX AI and tech forum Hacker News. Many developers running AI on their own hardware had assumed a model file only holds static math. "I had no idea this was even possible, I thought that model files were strictly containers for weights and tensors," one surprised Hacker News commenter wrote. Other participants stressed that the only real defense is locking an AI agent inside a strict sandbox on your computer, regardless of what text or commands a model outputs.

How to scan an AI model beforehand with gguf-radar

Although Hugging Face pulled all five malicious repositories offline, copies briefly resurfaced elsewhere, including in Ollama's public library. To help users stay ahead of the threat, Düzgün immediately released a free open-source tool called gguf-radar on GitHub. It lets you check a Hugging Face link before downloading massive files to your drive. Already have models saved locally? The same utility strips out suspicious trailing bytes or tampered chat templates without hurting the AI itself. If you run Ollama or LM Studio at home, stick to trusted publishers, scan unfamiliar files first, and never hand a local AI agent unrestricted access to your PC.

What does this mean for you?

Everyday users & hobbyists

Running AI at home with Ollama or LM Studio? Don't assume a model file is harmless—scan unfamiliar links first with gguf-radar and never give local AI agents unrestricted access to your PC.

Teams & business

Are developers or staff testing local AI models? Allow files only from verified publishers, scan downloads beforehand, and isolate local AI agents from company folders.

Frequently asked questions

How can a local AI model carry a virus?

Attackers glue standard malware onto the end of the model file or hide commands inside its chat template. Local AI software only reads the first section for the model itself, so the chatbot still appears to work normally.

Are all models on Hugging Face unsafe now?

No. Out of more than 226,000 local model repositories scanned on Hugging Face, only five were infected. Still, copies occasionally pop up on other sites, so checking files from unfamiliar creators remains smart.

How can I check a model file before opening it?

With Düzgün's free gguf-radar tool, you can inspect a Hugging Face link before downloading the full file. It can also strip suspicious trailing bytes or tampered chat templates out of models already on your drive.

Verified primary sources
Spot an error? Report correction
Deep dive from the AI Knowledge Base
All guides

Related reading

Get caught up on AI in 3 minutes every morning

Essential AI updates and one practical tip you can use right away—zero jargon. Free in your inbox.

We only use your email address for our newsletter. Unsubscribe anytime in 1 click. Read our privacy policy.