Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseCode / SDK · ActionableX: @Root0ne→ original

Five GGUF Models on Hugging Face Found Hiding Malware: 2,400+ Downloads

Researcher Root0ne scanned 3.27 million repositories on Hugging Face and found five GGUF models with hidden malicious code. They were downloaded more than 2,400 times. An executable can be appended to the file after the weights, and the model still runs normally because loaders never read past that point. The chat template also tells the model to output a command that extracts and runs those bytes. That is why GGUF files from others should be checked before they are run.

AI-processed from X: @Root0ne; edited by Hamidun News
Five GGUF Models on Hugging Face Found Hiding Malware: 2,400+ Downloads
Source: X: @Root0ne. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceX: @Root0ne ↗
Editor-in-Chief
Key metric #1Five malicious models found among 3.27 million repositories
Key metric #2The author released GGUF Radar, an open-source scanner that finds and strips the payload
Key metric #3The chat template in the metadata is a small program, not just text

Downloading a quantized model in GGUF format from Hugging Face and running it locally has long been routine. Few people consider that something else may come along with the weights. A researcher posting under the handle Root0ne showed that this is not a theoretical risk: he found five models with a malicious payload, and together they were downloaded more than 2,400 times.

How the malware hides inside the model

The researcher scanned 3.27 million public model repositories. Five GGUF files turned up with executable code hidden inside them.

The trick is simple. The GGUF file header specifies where the model weights end. Loaders read the file only up to that point and never look further. An attacker can therefore append an executable to the end of the file, and the model keeps working perfectly. The file gets bigger, but the check "does the model answer sensibly" is unaffected.

It is like a PDF document with an archive glued to its end: the reader opens the document and doesn't notice the extra data, while the archive is still there.

The role of the chat template

The appended tail does not run anything by itself. This is where the chat template comes in: a small program stored in the GGUF metadata that determines how a dialogue is turned into a prompt for the model. It is usually treated as harmless message formatting.

According to the author's description, the template can be used to inject hidden instructions into the prompt. For example, instructions that make the model output a command that pulls the hidden bytes out of the file and runs them. The user sees a normal model response, but the command is in it. From there, everything depends on the environment: if a person or an agent with terminal access executes that command, the malware activates. This is our own inference from the description of the mechanism, but it is exactly why the scheme is dangerous for agentic setups, where model output is executed automatically.

What developers should do

The author released an open-source tool, GGUF Radar. It finds such payloads in GGUF files and removes them. For teams that pull models from public repositories, it is a ready entry point for verification.

The practical takeaways:

  • Treat a GGUF file as an executable artifact, not as harmless data. The source and the reputation of the repository's author matter more than an appealing name or a download count: 2,400 downloads show precisely that popularity does not guarantee safety.
  • Scan files with a scanner before the first run, especially if the model was not downloaded from the developer's official repository.
  • Do not let a model execute terminal commands automatically, particularly if the chat template came from someone else's file. Read the template in the metadata as carefully as you would read a stranger's install script.
  • Compare the file size with what is expected for that model and quantization: unexpected extra bulk at the end should raise suspicion.

Limitations

Little is known. The case involves five models out of 3.27 million, so the scale of infection in relative terms is small. The figure of 2,400 downloads is a count of downloads, not a confirmed number of runs of the malicious command: the article does not establish how many users were actually affected. A detailed analysis has been published on the Malspark blog, and that is where to look for the technical details and the list of affected repositories.

Still, the story points to a systemic problem. The open model ecosystem has grown quickly, but security habits have lagged behind, dating from a time when a "model" meant little more than a table of numbers. A format where data and program code live in the same file calls for the same hygiene as downloading software from the internet: verify the source, scan, and run in an isolated environment.

Story

Key Questions Answered

How the malware hides inside the model?

The researcher scanned 3.27 million public model repositories. Five GGUF files turned up with executable code hidden inside them. The trick is simple. The GGUF file header specifies where the model weights end. Loaders read the file only up to that point and never look further. An attacker can therefore append an executable to the end of the file, and the model keeps working perfectly. The file gets bigger, but the check "does the model answer sensibly" is unaffected.

What are the key details on The role of the chat template?

The appended tail does not run anything by itself. This is where the chat template comes in: a small program stored in the GGUF metadata that determines how a dialogue is turned into a prompt for the model. It is usually treated as harmless message formatting. According to the author's description, the template can be used to inject hidden instructions into the prompt. For example, instructions that make the model output a command that pulls the hidden bytes out of the file and runs them.

What developers should do?

The author released an open-source tool, GGUF Radar. It finds such payloads in GGUF files and removes them. For teams that pull models from public repositories, it is a ready entry point for verification. The practical takeaways: Treat a GGUF file as an executable artifact, not as harmless data. The source and the reputation of the repository's author matter more than an appealing name or a download count: 2,400 downloads show precisely that popularity does not guarantee safety.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Five GGUF Models on Hugging Face Found Hiding Malware: 2,400+ Downloads https://news.hamidun.com/en/news/18590/five-gguf-models-on-hugging-face-found-hiding-malware-2-400

What do you think?
Loading comments…