GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims(malspark.com)
319 points by homarp 1 day ago | 98 comments
tl;dr: A scan of Hugging Face found five malicious GGUF models (2,428 downloads) using "chat template poisoning," where the Jinja2 chat template silently injects instructions telling the model to prefix replies with PowerShell commands or hijack agent tool calls. The Mir2k campaign appended a Windows RAT ("ollie," bundled with Tor for C2) as overlay bytes after the last tensor—invisible to loaders—then days later swapped in a template that tricks users into extracting and running it. The open-source tool gguf-radar statically detects poisoned templates and hidden payloads, and rebuilds clean GGUF files without altering weights.
HN Discussion:
  • ↑Sandboxing and isolation are necessary defenses against malicious models, validating the article's concerns
  • ~The template-based exploit is relatively shallow; deeper weight-encoded backdoors are the real threat
  • ↑Centralized unchecked model distribution platforms like Hugging Face inevitably invite such exploits and need stronger scanning
  • ~Basic metadata checks and sticking to trusted sources easily mitigates this specific attack
  • ↓Download counts and attack scope may be overstated or misunderstood in the reporting