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
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.
- Nov 28, 2026Five GGUF Models on Hugging Face Hid a Trojan, About 2,400 Downloads
- Nov 28, 2026Sber Releases FRIDA V2: A 2B-Parameter Model That Searches at the Level of 8B Rivals
- Nov 27, 2026Slonik-27B Learns to Write PostgreSQL Kernel Code: Solves 55.6% of Tasks, Up from 31.2%
- Nov 27, 2026Seven Open-Source Frameworks for Building a Team of AI Agents, from Langflow to Google ADK
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.
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.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
