GGUF

by ggml · Technique · Text & code

A single-file format for packaging quantized language model weights so they load and run on a laptop or desktop with local inference apps.

mixed

The standard local model file, but chat templates can hide malicious instructions; vet uploaders

Latest · Nov 29Five uncensored/abliterated GGUF models from two accounts on Hugging Face were confirmed to contain malware, with 2,428 downloads combined at report time.

Who says what

Early days

Malspark, which scanned 3.27 million Hugging Face repos, モリンガ (Moringa), who checked their own files, and Hacker News

Malspark found five malicious uncensored uploads with 2,428 downloads. They hid instructions in the embedded chat template, one with a Windows trojan appended after the weights, and one template was swapped in only after downloads grew. All agree that loading a file runs nothing: the harm comes when an agent or user runs the command the model prints, so sandboxing agents and pinning a verified template are the defense.

What would settle it. A wider scan showing whether poisoned templates spread beyond no-name uncensored uploads to imitations of known models.

Evidence

  1. Nov 29
    Five malicious GGUF models found on Hugging Face, with 2,428 downloads by 27 Nov
  2. Nov 29
    Merely loading a malicious GGUF runs nothing; danger comes after the model replies, and the payload is not in the weights.
  3. Nov 29
    Data appended after the tensor list at the file's end is never read by runtimes, so users are unlikely to notice; chat templates are small programs that can add hidden instructions.
  4. Nov 29
    Attack 1 (account Mia2K): ~11 MB Windows executable appended to the weights; template makes the model print a PowerShell command that extracts and runs it.
  5. Nov 29
    The template was swapped from a normal one to the malicious one on Nov 26 after downloads grew, so early checks saw a normal model.
Show all 13
  1. Nov 29
    Author's own script checks weight end versus file size and scans templates for suspicious commands/URLs. All 32 GGUFs on their NAS matched, scanned in 19 seconds; Inkling templates matched official ones exactly.
  2. Nov 29
    Advice: avoid unproven uploaders, pin a verified chat template (llama.cpp template file, Ollama Modelfile), block unattended shell use by agents, never paste unknown commands, scan files. One account made 14 repos on Nov 22, 12 empty.
  3. Nov 28
    Attackers poisoned the chat template embedded in GGUF files to add hidden instructions the user never sees
    Hands-on testMalsparkviaHacker News
  4. Nov 28
    Mir2k models hid a Windows remote access trojan after the last tensor; template made model open replies with a PowerShell line that extracts and runs it
    Hands-on testMalsparkviaHacker News
  5. Nov 28
    timdedid 'cyber uncensored' Qwen models inserted a fake system directive on trigger phrases, telling shell-enabled agents to download and run a script
    Hands-on testMalsparkviaHacker News
  6. Nov 28
    All five malicious models were no-name abliterated/uncensored uploads; commenters say this is tiny against millions of repos but expect name-brand imitations later
    Community reportHacker News
  7. Nov 28
    Commenters argue the exploit abuses the chat template, not an inference-engine bug; the real defense is sandboxing agents so no generated tokens can do harm
    Community reportHacker News
  8. Nov 24
    GGUF is the file format used by Ollama and LM Studio on Windows; Macs often use MLX instead.

Everything said about GGUF, on the wire

Cost to run

Alternatives