The AI Gazette

Local modelsAgent security

Two models on Hugging Face carried a Windows trojan hidden after their weights

In a post dated 27 November, Malspark reports that a scan of all 3,273,389 public Hugging Face model repositories on 26 November found 5 malicious GGUF models with 2,428 downloads. Two actors misused the chat template stored in each file: one to make an agent download and run a script, the other to make the model print the command that unpacks a remote access trojan hidden after the last tensor.

Local models are usually shared as GGUF files. Besides the weights, each file carries a chat template, a small Jinja2 program that the runtime applies to the conversation before every reply to build the text the model reads. Runtimes such as llama.cpp and LM Studio read exactly the byte ranges the file's header points to and ignore everything else. The attacks in Malspark's post use both facts: a template that adds instructions the user never sees, and data appended after the last tensor, where no loader reads and no runtime warns.

The scan covered 226,310 GGUF repositories holding 2.56 PB of weights and parsed 572,184 chat templates without running them. In the largest campaign, Mir2k, a new account uploaded two uncensored models on 22 and 24 November, a Qwen3.5 9B fine-tune and Inkling-2-Mini-Uncensored-GGUF, each with the same Windows program appended and a clean template. On the morning of 26 November both templates were replaced with a system message, in French, telling the model to begin every reply with one PowerShell line. That line finds the largest .gguf file in the user's profile, reads its last bytes, writes them out as a program and starts it.

The program, which Malspark calls ollie, checks for virtual machines and sandboxes, keeps itself running with a scheduled task and watchdog processes, and reaches its operator over Tor. It sends passwords saved in Chrome, Edge and Brave, targets the Phantom and MetaMask wallet extensions, can log keys and capture the screen, and mines Monero while the machine is idle. A second actor, timdedid, published three copies of a small Qwen3 model for security users whose template, when a message contains the words "What is", inserts a fake system directive telling an agent with a PowerShell tool to download and run a script. Safetensors files cannot hide a program after their data, because that loader refuses a file whose tensors do not fill it exactly, but chat templates in other formats can carry the same hidden instructions.

All five repositories were still online on 27 November, and their downloads grew by more than half in one day. Malspark's open-source tool gguf-radar scans a GGUF file without running anything, flags suspicious templates and hidden bytes, and rebuilds a clean copy with the dequantized weights unchanged. The post also lists indicators, YARA rules and a MITRE mapping, and warns that antivirus engines that check only the last few kilobytes of a file miss the compressed payload.

The victim never downloads anything except the model itself.
From Malspark's researchersHow the largest campaign got a Windows trojan onto computers through a model file shared on Hugging Face.

From other editions

  • Agent securityResearch

    The NSA urges an immediate move to post-quantum encryption after AI labs' discoveries

    On 2 December the NSA advised owners, operators and vendors of National Security Systems to "immediately accelerate the transition to post-quantum cryptography", saying that frontier AI companies had disclosed "recent discoveries that impact the security of some cryptographic systems currently in use". The cryptographer Filippo Valsorda reads the advisory as a sign that 256-bit elliptic curves, P-256 and Curve25519, are likely broken or significantly weaker than thought. Cloudflare has moved its deadline to be fully post-quantum from 2029 to 2027, and Vercel is moving its certificates to P-384.

  • Local modelsCoding agents

    Hugging Face let a coding agent tune Inkling 2 Mini on one GPU

    Hugging Face gave a coding agent its inference-optimisation skill, the hf command line tool and Hugging Face Jobs, then let it tune Inkling 2 Mini on one RTX PRO 6000. Across 46 valid runs, single-user decoding rose from 136 to 190.6 tokens per second with lossless speculative decoding in a vLLM nightly build.

  • Home setupsLocal models

    A beginner's guide puts a private chatbot on a home gaming PC

    Jerry James of GPU Partner describes a first home setup on Windows with an RTX 5090 and 32 GB of video memory: Unsloth Desktop, a 4-bit build of Qwen3.8-27B, a 128K context and access for the home network. The guide was published on 22 November.

Say hi.