Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 4 min read

Five Poisoned GGUF Models on Hugging Face. The Model File Is Now Part of Your Supply Chain

Short answer A GGUF file is not just weights. It also carries a chat template, a small program that rewrites every prompt before the model sees it. Malspark reported on November 27, 2026 that five public GGUF models on

Five Poisoned GGUF Models on Hugging Face. The Model File Is Now Part of Your Supply Chain

The model file is now part of your supply chain

Short answer

A GGUF file is not just weights. It also carries a chat template, a small program that rewrites every prompt before the model sees it. Malspark reported on November 27, 2026 that five public GGUF models on Hugging Face used that template to give hidden orders, and that some hid a Windows program after the last tensor. The defense is to treat the model file as software in your supply chain: run models you can trace, and judge every action an agent takes before it runs.

What happened?

  • Malspark scanned 3,273,389 public Hugging Face model repositories on November 26, 2026, including 226,310 GGUF repositories.
  • It found five malicious GGUF models with 2,428 downloads as of November 27. Downloads are not people, so the number of affected users is at most that.
  • Two accounts were behind them. One made the model open each reply with a one-line PowerShell command that extracts a hidden program from the end of the model file. The other told coding agents with a PowerShell tool to download and run a remote script whenever a question started with "What is".
  • According to the report, the recovered program stole saved browser passwords and crypto wallet data, logged keys, captured the screen and webcam, and mined cryptocurrency over Tor.
  • No CVE is involved. llama.cpp, Ollama and LM Studio work as designed. The attack relies on users trusting the file.

Sources: Malspark report Β· gguf-radar scanner (MIT) Β· Pillar Security on poisoned templates

Why is this hard to see?

The template sits in the file metadata, and the chat window never shows it. Bytes after the last tensor are never read by the loader, so no runtime warns about them. The model still answers well, so a quality test passes. One of the accounts also created empty repositories named after models that had not been released yet, waiting for people who download by guessing a name.

The same template field exists in safetensors models, in tokenizer_config.json or chat_template.jinja. GGUF is where it was found first, not the only place it can live.

Defense 1: run a model you can trace

NaVi 180: judgment, growth, memory, execution and security in one system

NaVi 180 is VIDRAFT's AI Native system on one NVIDIA RTX SPARK laptop with 128GB of unified memory. It runs Darwin-180B, built by VIDRAFT, #2 in the world and #1 among open models in SuperCLUE's November 2026 math and science reasoning evaluation (73.7). The model, its template and its tools come from one known source and run on one device. External connections: 0.

Watch the 1-minute film (Korean narration): vidraft.net/p/navi180-en.html

Defense 2: judge every action

ViKernel: 991 risky tool calls, 0 after the Firewall

Both campaigns end the same way: something on your machine runs a command it should not. ViKernel Firewall judges each tool call an agent proposes, with its arguments, right before it runs. A poisoned template can change what the model says. It cannot change what the Firewall allows.

On the public ViKernel Scanner board, 21 open models made 991 risky tool calls. After ViKernel Firewall, 0 went through. Try it in ViKernel Desktop.

Checklist for teams that run open models

Check Why
Download from the publisher's own organization, found by listing, not by guessing a repo name Empty look-alike repos wait for guessed names
Load a reviewed template (--chat-template-file in llama.cpp, TEMPLATE in an Ollama Modelfile) The template inside the file is code you did not review
Reject GGUF files with bytes after the last tensor Loaders never read them, so a legitimate file has no need for them
Pin the file hash you tested A template can change after you approve the model
Never run a command a model suggests without review The reply itself can be the attack
Put a gate in front of agent tools The last step is always a tool call

FAQ

Is llama.cpp or Ollama vulnerable?

The report names no CVE. The runtimes read only the bytes the header points to and render templates in a restricted engine. The risk comes from trusting the template and following the commands it makes the model produce.

How many people were affected?

Malspark counted 2,428 downloads of the five models as of November 27, 2026. Downloads are not unique users, so the number of people is at most that.

Does this affect safetensors models?

The appended-payload trick does not, because the safetensors loader rejects extra bytes. The template trick can, because those models carry the same kind of chat template.

How does NaVi 180 avoid this?

NaVi 180 runs Darwin-180B, built by VIDRAFT, on one laptop with no outside connection, and ViKernel Firewall judges each tool call before it runs.

Links

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.