Introduction
Local language models are often distributed as GGUF files, but a model file can contain more than weights. A report on a scan of public Hugging Face repositories says researchers found five GGUF repositories with malicious behavior and a combined 2,428 downloads. That is a platform download count, not a count of distinct affected people; the number of users can be no greater than the number of downloads.
How the techniques work together
One technique targets the chat template. GGUF metadata can store a template program that the runtime uses to format conversation input. A malicious template can add instructions out of sight: one campaign attempted to steer agents with command-line access into running a script, while another prompted the model to place a PowerShell command at the start of replies, hoping a user would copy and run it. The report says these attacks do not need to break out of the template engine; ordinary template logic can add text that is not visible in the chat window.
The second technique exploits GGUF file layout. A runtime reads model data using offsets in the file header and tensor table, and may ignore bytes beyond the final tensor. An attacker can append a program there without preventing the model from loading. In the Mir2k samples examined, one file contained a plain executable followed by filler data; another stored the same program in raw Deflate form, making familiar file signatures harder to detect. The template-generated command was intended to extract and launch the hidden content from the model file.
Findings and limits
The researchers say they scanned about 3.27 million public repositories, including roughly 226,000 GGUF repositories, and statically parsed more than 572,000 chat templates. They used HTTP Range requests to inspect file data without downloading every model in full. After manual review, five malicious repositories remained online: two associated with Mir2k, with 1,946 downloads combined, and three associated with timdedid, with 482. The second-stage payloads in the timdedid cases were not recovered, so those findings are not a complete reconstruction. The report also describes a delay in the Mir2k campaign: files were uploaded with hidden programs while their templates were still clean, then the templates were changed later to activate the attack.
Why it matters
The case shows why model security checks should cover more than weights, repository descriptions, or a small region at the end of a file. Templates can also act as a prompt-injection channel. The report presents the open-source tool gguf-radar as a way to inspect templates and data beyond the tensors, then rebuild a clean GGUF while retaining the weights. Users and deployment teams should verify model sources, review templates and file structure, and scan models before running them. Anyone who already downloaded a listed model can check the report’s indicators and inspect local files. Downloads do not establish how many people were compromised, but they do signal a need for stronger model-supply-chain checks.
Source: Hacker News
Comments
Checking sign-in status...
Loading comments...