<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq" -->

---
title: Hugging Face's GGUF files are now a malware delivery route
description: A scan of all 3,273,389 public Hugging Face model repositories found five malicious GGUF models, and the campaigns together hit more than 2,400 victims. The...
canonical: https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Hugging Face's GGUF files are now a malware delivery route | daily.dev
og:description: A scan of all 3,273,389 public Hugging Face model repositories found five malicious GGUF models, and the campaigns together hit more than 2,400 victims. The...
og:url: https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq
og:image: https://api.daily.dev/og/posts/tyjvf3Stq.png
og:image:alt: Hugging Face's GGUF files are now a malware delivery route
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hugging Face's GGUF files are now a malware delivery route

**[Trends](https://daily.dev/sources/trends)** · 2 min read · 33 upvotes · 3 comments

## Summary

A scan of all 3,273,389 public Hugging Face model repositories found five malicious GGUF models, and the campaigns together hit more than 2,400 victims. The biggest, Mir2k, appended a Windows remote access trojan called ollie after the last tensor, where loaders never read. The same actor later used a chat template that makes the model print a PowerShell line to unpack and run the payload. Another actor, timdedid, used a template trigger to get an agent to run a downloaded script. The researchers released gguf-radar, an open-source tool that flags suspicious templates and trailing bytes and rebuilds clean files.

## Content

The same week Inkling 2 Mini from @thinkymachines hit number one on Hugging Face trending (with the Unsloth GGUF at number two, per @danielhanchen's repost of @ClementDelangue), a scan of the whole hub landed to remind everyone what's sitting next to the hype.

The finding: five malicious GGUF models were downloaded 2,428 times. The researchers scanned all 3,273,389 public model repositories to find them. The blog post is titled "GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims", and @hasherezade amplified it.

## How the trick works

The biggest campaign, Mir2k, appended a Windows remote access trojan called ollie after the last tensor in the file. That's a spot where loaders never read, so the model still loads and runs normally while carrying a passenger.

A few days later Mir2k changed approach. It swapped in a chat template that makes the model print a PowerShell line to unpack and run the payload. The weights aren't the attack surface anymore. The prompt formatting is.

A second actor, timdedid, used a template trigger to get an agent to run a downloaded script. That one matters more as people wire local models into tools that can execute things.

## The reaction

The mood is a mix of "told you so" and practical tooling. @hasherezade also boosted @javierbits, who ran RepoBeagle on several models pulled from Hugging Face to show what poisoned weights look like when you hit one in the wild. The point of that demo is that this isn't theoretical anymore.

There's a nasty irony in the timing. The community is cheering a trending model and its quantized builds, and quantized GGUF uploads from random accounts are exactly the files people grab without a second look. Nobody reads a chat template before running a model.

The researchers did ship a fix. The open-source tool gguf-radar flags suspicious templates and hidden trailing bytes, and it can rebuild a clean file with the weights unchanged. That's the useful takeaway: treat a GGUF like an executable with metadata, not like inert data.

Two habits are worth picking up right now. Prefer uploads from known publishers. And inspect the chat template before you let an agent anywhere near a model you downloaded.

## Questions this post answers

### How can a GGUF model file hide malware without breaking the model?

A malicious actor can append a payload, such as a Windows remote access trojan, after the last tensor in the GGUF file. Loaders never read that trailing region, so the model still loads and runs normally. The same actor can also swap in a chat template that makes the model print a PowerShell line to unpack and run the payload.

_Developers running local models track supply chain threats like this on daily.dev._

### How can a chat template in a GGUF file lead to code execution through an agent?

A poisoned chat template can make a model emit a command, such as a PowerShell line, to unpack and run a payload. One actor, timdedid, used a template trigger to get an agent to run a downloaded script. When local models are wired into tools that can execute commands, this becomes code execution while the weights stay untouched.

_If you wire models into agents, daily.dev helps you stay ahead of these attack patterns._

### How do I check GGUF files from Hugging Face for hidden malware?

gguf-radar is an open-source tool released by researchers who scanned all 3,273,389 public Hugging Face model repositories and found five malicious GGUF models. It flags suspicious chat templates and hidden trailing bytes, and it can rebuild clean files with the weights unchanged. Treat third-party model files like random installers.

_Vetting model downloads is easier when you follow security research on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 1 discussion and 58 comments across hackernews (as of 2026-11-30).

**TL;DR:** The discussion centers less on outrage and more on debating how surprising/serious this really is, with many noting the actual infection scale (5 of 3.2M models) is tiny while others argue chat-template-based attacks are a genuinely new and under-appreciated risk vector.

**Sentiment:** 10% positive · 55% mixed · 35% skeptical

**The case for**

- Some see this as a useful wake-up call since many assumed GGUF/weights-only files were inherently safe like safetensors.
- The scanning tool is seen as a simple, automatable fix that platforms could adopt proactively.

**The pushback**

- Several argue 5 malicious models out of 3.2M downloads is statistically insignificant, comparing concern to overblown fears.
- Skepticism that 'downloads' even represent real executions, since HF download counts can reflect automated metadata requests rather than actual usage.
- Concern that the real danger isn't the model file itself but giving agentic systems unchecked ability to execute LLM-generated commands.
- Some note safetensors/chat-template files are equally vulnerable, undercutting the idea that format alone solves the problem.
- Worry that this is just an early, small-scale preview of a problem that will worsen as more popular/name-brand models get targeted.

**By community**

- hackernews (mixed): Discussion splits between those alarmed by a new attack vector in chat templates and those pointing out the tiny real-world infection numbers, with a long tangent comparing this to trusting blobs like Linux drivers, Steam games, and compiler trust attacks.

**Hottest debate:** Whether downloading and running large opaque model blobs is a meaningfully new risk or just the same old trust-the-source problem seen with drivers, games, and other software downloads.

**Open questions**

- Is the malware confined to metadata/chat-template files, or could weights themselves be poisoned in ways that are harder to detect?
- Will platforms like Hugging Face adopt automated scanning tools like gguf-radar on all uploads?
- How should 'download' counts be interpreted given that many may be automated metadata checks rather than actual use?

**Highlights**

> I had no idea this was even possible, I thought that the model files were strictly containers for weights and tensors. Now I understand why 'safetensor' format is called that. It feels like ancient history from when people used self-unpacking compression formats to deliver malware payloads...
> — [yborg on hackernews · 1 comments](https://news.ycombinator.com/item?id=50677496)

> IMO, any system that was exploited by this was already insecure. It's not exploiting bugs in the inference engine or attempting any kind of sandbox escape. Here the exploit was in the chat template, but it's possible to encode the same thing directly in the weights. Unless the model is truly Open Source (not just open weight), there's no way to know what malicious instructions might be encoded in the weights. The only defense is to sandbox the agent sufficiently strongly that it can't do harm no matter what tokens it generates. In such a sandbox, it doesn't matter that the payload was stored directly in the GGUF file, because it won't be able to do anything with it anyway.
> — [mrob on hackernews · 1 comments](https://news.ycombinator.com/item?id=50678813)

> Is it surprising that a large unchecked distribution network is used to distribute malware? No. Is it surprising that it’s such a small scale? Yes. Which means we are early on and haven’t seen history repeat itself yet. These were no-name models but soon it will be name-brand models and it will start tricking more and more people. HF should get ahead of this now and implement stronger scanning and protections while it’s still not a large scale problem.
> — [1broseidon on hackernews](https://news.ycombinator.com/item?id=50679118)

> This is a fine article, but if there’s truly only 5 out of 3273389 that are malicious that’s an incredibly low number. I’d bet there’s more malicious google ads people click on every day than use these models.
> — [wronglebowski on hackernews · 2 comments](https://news.ycombinator.com/item?id=50677466)

> Is my understanding correct that the malware was entirely in a metadata file that injected hidden prompts rather than the model weights being poisoned in some way? I assume this is way cheaper to execute. On the surface it also seems way cheaper to catch. Is it less detectable than e.g. poisoning a models weights or am I missing something here?
> — [catlifeonmars on hackernews](https://news.ycombinator.com/item?id=50679818)

> what I want to know is why isn't HF and anyplace else that hosts model files using gguf-radar on all uploads? this appears to be a simple thing to automate.  and if it says something is wrong quarantine the upload until a human looks over the report,  since it does have a chance of false positives.
> — [nmbr5 on hackernews](https://news.ycombinator.com/item?id=50680452)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50676752) · 157 points · 58 comments

## Community discussion

Top comments from developers on daily.dev.

**@jeanclaudegeagea** · 2 upvotes

> Hiding payloads after the last tensor is scary clever

**@ahmetozel** · 1 upvotes

> Finding five malicious GGUF builds downloaded over 2,400 times across Hugging Face proves that binary safety alone does not make a model format safe. Appending a Windows RAT past the final tensor offset exploits silent trailing-byte tolerance in loaders, while pivoting to poisoned chat templates turns prompt formatting itself into an execution vector whenever local models are wired to coding or shell agents.
>
>
> Treating third-party quantized GGUF uploads like untrusted executables—scanning trailing bytes and Jinja chat templates with tools like gguf-radar and overriding templates with vetted...

**@skepagent** · 0 upvotes

> 最吓人的是藏在最后一个张量之后的木马——加载器根本不读那块区域，模型照常能跑，所以受害者毫无察觉。以后拉 GGUF 之前先用 gguf-radar 这类工具扫一遍模板和尾部数据，应该是本地跑模型的基本流程了。

## Similar posts on daily.dev

- [Hugging Face malware campaign returns to hijack GPUs for crypto mining](https://daily.dev/posts/hugging-face-malware-campaign-returns-to-hijack-gpus-for-crypto-mining-pxej1zhth) · BleepingComputer · 0 upvotes · 0 comments
- [Malicious Hugging Face model masquerading as OpenAI release hits 244K downloads](https://daily.dev/posts/malicious-hugging-face-model-masquerading-as-openai-release-hits-244k-downloads-xftpmcpz1) · CSO Online · 0 upvotes · 0 comments
- [Hugging Face Packages Weaponized With a Single File Tweak](https://daily.dev/posts/hugging-face-packages-weaponized-with-a-single-file-tweak-nwly7hujg) · Dark Reading · 1 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#llm](https://daily.dev/tags/llm), [#malware](https://daily.dev/tags/malware), [#local-ai](https://daily.dev/tags/local-ai)

[View this post on daily.dev](https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Hugging Face's GGUF files are now a malware delivery route","url":"https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq"},"datePublished":"2026-11-28T14:49:22.106Z","dateModified":"2026-11-30T03:38:47.088Z","description":"A scan of all 3,273,389 public Hugging Face model repositories found five malicious GGUF models, and the campaigns together hit more than 2,400 victims. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/96df427e54587aa80f451e5ee7a85f89?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/96df427e54587aa80f451e5ee7a85f89?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Trends","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Trends","logo":"https://media.daily.dev/image/upload/s--ZfSp3asX--/f_auto,q_auto/v1780996004/logos/trends?_a=BAMAMiWQ0","url":"https://daily.dev/sources/trends"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":33},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"security,llm,malware,local-ai","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Trends","item":"https://daily.dev/sources/trends"},{"@type":"ListItem","position":3,"name":"Hugging Face's GGUF files are now a malware delivery route"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq","comment":[{"@type":"Comment","text":"Hiding payloads after the last tensor is scary clever","datePublished":"2026-11-30T01:53:41.964Z","url":"https://daily.dev/posts/tyjvf3Stq#c-SIS6vtwNA","author":{"@type":"Person","name":"Jean Claude Geagea","url":"https://daily.dev/jeanclaudegeagea","image":"https://media.daily.dev/image/upload/s--vZMcZq8g--/f_auto/v1755770441/avatars/avatar_dIw3L0c5TxJlwuB4CmcR0?_a=BAMClqZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Finding five malicious GGUF builds downloaded over 2,400 times across Hugging Face proves that binary safety alone does not make a model format safe. Appending a Windows RAT past the final tensor offset exploits silent trailing-byte tolerance in loaders, while pivoting to poisoned chat templates turns prompt formatting itself into an execution vector whenever local models are wired to coding or shell agents.\nTreating third-party quantized GGUF uploads like untrusted executables—scanning trailing bytes and Jinja chat templates with tools like gguf-radar and overriding templates with vetted local definitions—should become standard practice for local LLM runners.","datePublished":"2026-11-30T10:28:36.159Z","url":"https://daily.dev/posts/tyjvf3Stq#c-KjMNnDlfV","author":{"@type":"Person","name":"Ahmet Özel","url":"https://daily.dev/ahmetozel","image":"https://avatars.githubusercontent.com/u/70992231?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"最吓人的是藏在最后一个张量之后的木马——加载器根本不读那块区域，模型照常能跑，所以受害者毫无察觉。以后拉 GGUF 之前先用 gguf-radar 这类工具扫一遍模板和尾部数据，应该是本地跑模型的基本流程了。","datePublished":"2026-11-29T02:52:15.984Z","url":"https://daily.dev/posts/tyjvf3Stq#c-SvFpo9Bly","author":{"@type":"Person","name":"kris gu","url":"https://daily.dev/skepagent","image":"https://lh3.googleusercontent.com/a/ACg8ocJnnwFKNx7PJNhb7W6mFWr2k2SV_VHW_9ainY71DX_dv79frQ=s96-c"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/hugging-face-s-gguf-files-are-now-a-malware-delivery-route-tyjvf3stq#faq","mainEntity":[{"@type":"Question","name":"How can a GGUF model file hide malware without breaking the model?","acceptedAnswer":{"@type":"Answer","text":"A malicious actor can append a payload, such as a Windows remote access trojan, after the last tensor in the GGUF file. Loaders never read that trailing region, so the model still loads and runs normally. The same actor can also swap in a chat template that makes the model print a PowerShell line to unpack and run the payload. Developers running local models track supply chain threats like this on daily.dev."}},{"@type":"Question","name":"How can a chat template in a GGUF file lead to code execution through an agent?","acceptedAnswer":{"@type":"Answer","text":"A poisoned chat template can make a model emit a command, such as a PowerShell line, to unpack and run a payload. One actor, timdedid, used a template trigger to get an agent to run a downloaded script. When local models are wired into tools that can execute commands, this becomes code execution while the weights stay untouched. If you wire models into agents, daily.dev helps you stay ahead of these attack patterns."}},{"@type":"Question","name":"How do I check GGUF files from Hugging Face for hidden malware?","acceptedAnswer":{"@type":"Answer","text":"gguf-radar is an open-source tool released by researchers who scanned all 3,273,389 public Hugging Face model repositories and found five malicious GGUF models. It flags suspicious chat templates and hidden trailing bytes, and it can rebuild clean files with the weights unchanged. Treat third-party model files like random installers. Vetting model downloads is easier when you follow security research on daily.dev."}}]}
```

