Five Models, 2,428 Downloads, and Fewer Victims

On 27 November a security researcher published a write-up on Malspark under the title “GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims.” The work behind it is careful: the author scanned every public model repository on Hugging Face on 26 November, 3,273,389 of them, and read GGUF headers and file ends through HTTP Range requests without downloading any model in full. They parsed 572,184 chat templates without executing any of them. After manual review, five repositories were left, from two accounts, with 2,428 downloads between them as of 27 November.

I’d trust the five. I don’t trust “victims,” and neither does the write-up. Its own summary says: “Hugging Face counts downloads, not people, so the number of affected users is lower or equal.” The question I care about is how much lower, and what the scan does and doesn’t tell us about how common this is.

What the attack does

A GGUF file has a header, a metadata table, a tensor table, padding and then the weights. One metadata key, tokenizer.chat_template, holds a small Jinja2 program that the runtime runs on every conversation to build the text the model actually reads. The user never sees what it adds.

The larger campaign, from an account called Mir2k, used two hiding places. It appended a Windows executable after the last tensor, where loaders such as llama.cpp never read. Later it rewrote the chat template to add a hidden 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 the bytes at its end, writes them out as %TEMP%\d.exe and starts it. The model prints the command, and the user has to run it.

The write-up’s static analysis describes the implant as a remote access trojan with an embedded copy of Tor. It steals saved browser passwords, targets two crypto wallet extensions, logs keys and mines Monero when the machine is idle. The second account, timdedid, published three copies of a small Qwen3 model whose template inserts a fake “[SYSTEM DIRECTIVE]” when the user’s message contains “What is”. The directive tells an agent with a PowerShell tool to download and run a script. That second-stage script was never recovered.

Neither technique is new. Fogel and colleagues described chat-template backdoors in February 2026 and tested them on 18 models. In their experiments a triggered template cut factual accuracy from 90 percent to 15 percent on average, and the paper reports tool-use hijacking across 3,868 agent episodes. EvilModel showed in 2021 that malware could ride inside a network’s weights. What’s new here is seeing both ideas in live repositories, and seeing the payload planted days before the trigger.

The timeline shrinks the denominator

The repository history matters more than the download total, because the payload and the trigger arrived at different times.

Plant first, arm later: the two campaigns, 21 to 27 November 2026 Timeline from the Malspark write-up of 27 November 2026. On 21 and 22 November the timdedid account published three copies of a Qwen3 1.7B model with a tool-hijacking template. On 22 November Mir2k created 14 repositories, 12 of them empty placeholders, and uploaded the Huihui model with an executable appended after its last tensor and a clean template. On 24 November it uploaded the Inkling model with a compressed copy of the same executable, also with a clean template. On the morning of 26 November both templates were replaced so the model prints a command that unpacks the executable, and nine hours later both were replaced again to search the whole user profile. The scan on 26 November counted 1,502 downloads across the five repositories; by 27 November the count was 2,428. TWO CAMPAIGNS · 21–27 NOV 2026 · MALSPARK WRITE-UP, 27 NOV Mir2k window: payload in the file, template still clean, so these downloads are inert 21 Nov 22 23 24 25 26 27 21–22 Nov: timdedid publishes three Qwen3 1.7B copies with a tool-hijacking template — Malspark, 27 Nov 2026 22 Nov: Mir2k creates 14 repos and uploads Huihui with an appended executable, clean template — Malspark, 27 Nov 2026 24 Nov: Mir2k uploads Inkling with a compressed executable, clean template — Malspark, 27 Nov 2026 26 Nov morning: both Mir2k templates armed; re-armed about nine hours later — Malspark, 27 Nov 2026 27 Nov: 2,428 downloads across the five repositories — Malspark, 27 Nov 2026 timdedid: 3 copies, trigger "What is" Mir2k: 14 repos, Huihui upload (12 empty placeholders) Inkling upload, compressed payload Templates armed re-armed ~9 h later Scan, 26 Nov: 1,502 downloads 27 Nov: 2,428 downloads (+926 in about a day) Totals are across all five repositories. The 26 Nov count's exact hour is not given, so how many came before arming is unknown. Arming time placed at mid-morning for drawing; the write-up says "the morning of 26 November."
The executable sat in the Mir2k files for two to four days before anything could start it. Downloads in that window got the payload without the trigger.

The write-up states the consequence directly: “Downloads made before 26 November therefore contain the payload but not the trigger.” The chat template lives inside the GGUF file, so a copy pulled on 23 November keeps its clean template unless the user downloads again.

At scan time the five repositories had 1,502 downloads. A day later they had 2,428, and the write-up says the growth was “almost entirely on the two Mir2k models.” The 926 added in that day are the only downloads in the count that certainly came after the scan, when the armed templates were live. Some share of the 1,502 may also postdate arming, since both happened on 26 November, but the post doesn’t say at what hour the counts were taken.

So for Mir2k, which holds 1,946 of the 2,428 downloads (about 80 percent), the population that could have been infected is people who downloaded on 26 or 27 November, on Windows, and then copied and ran a PowerShell line the model printed at the top of its answer. The first armed version also only looked in a fixed path in the Downloads folder. For timdedid it’s users who wired the model into an agent with a PowerShell tool and typed a message containing “What is”. I can’t put a number on either group. I’m fairly confident it is a small fraction of 2,428, and that some of those 926 came from people looking at a malicious model on purpose: researchers, scanners, curious readers.

What a Mir2k download needed to become an infection Four conditions in sequence, from the Malspark write-up of 27 November 2026. A download counted by Hugging Face, of which there were 1,946 on the two Mir2k models as of 27 November. The file had to be pulled after the templates were armed on 26 November, because earlier copies carry the payload but a clean template. The machine had to run Windows, because the payload is a Windows x64 program started from PowerShell. The user had to copy and run the command the model printed at the start of its reply. Only the first number is published; the others are unknown. FROM DOWNLOAD TO INFECTION · MIR2K MODELS · MALSPARK, 27 NOV 2026 Counted download Pulled after arming On Windows User runs the line Hugging Face counts fetches, not people Earlier copies hold payload, clean template Payload is a Windows x64 program Model prints a PowerShell line first in each reply 1,946 unknown unknown unknown Of the 1,946 Mir2k downloads, 1,488 are on Huihui and 458 on Inkling (as of 27 Nov). The first armed template read a fixed path in the Downloads folder; the second searched the whole profile. Each condition can only shrink the number. The write-up's own wording: affected users are "lower or equal." timdedid's 482 downloads face a different gate: an agent with a PowerShell tool and a message containing "What is".
Only the first box has a published number. Every box after it can only make the count smaller.

How big is 1,488?

Download counts are a weak measure of use in every package ecosystem I know of. Zerouali and colleagues computed nine popularity measures for 175,000 npm packages and concluded that “popularity can be measured with different unrelated metrics.” Among the six measures they compared in detail, the strongest rank correlation of any pair was 0.54, between downloads and a combined GitHub score. A download count says a file was fetched. It doesn’t say by whom, or how many of the fetches were mirrors, scanners or the same person twice.

Still, the comparison to other registries is useful, because malicious packages there are measured the same crude way. Guo and colleagues pulled Google Cloud download records for 861 malicious PyPI package files and found that “6% of the malicious packages were downloaded more than 1,000 times.” In a separate study, Vu, Newman and Meyers cite a sample of 29 PyPI malware packages that averaged under 200 downloads over 20 days. PyPI’s administrators told them that removing every piece of malware is a low priority, because many malicious packages are downloaded very rarely.

Downloads of the five malicious models against PyPI malware baselines Horizontal bars of downloads as of 27 November 2026, from the Malspark write-up. Mir2k Huihui-Qwen3.5-9B: 1,488. Mir2k Inkling-2-Mini: 458. timdedid qwen3.8-cyber-uncensored: 271. timdedid qwen3-cyber-UNCENSORED-2: 136. timdedid qwen3-cyber-UNCENSORED: 75. Two reference lines: 200 downloads, the average for a sample of 29 PyPI malware packages over 20 days cited by Vu, Newman and Meyers (ICSE 2023), and 1,000 downloads, a level reached by 6 percent of 861 malicious PyPI package files in Guo and colleagues (ASE 2023). Only the Huihui model passes 1,000, within about five days of upload. DOWNLOADS PER REPOSITORY · AS OF 27 NOV 2026 · MALSPARK Mir2k · Huihui-Qwen3.5-9B Mir2k · Inkling-2-Mini timdedid · qwen3.8-cyber timdedid · cyber-UNCENSORED-2 timdedid · cyber-UNCENSORED 1,488 downloads, Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF — Malspark, 27 Nov 2026 458 downloads, Mir2k/Inkling-2-Mini-Uncensored-GGUF — Malspark, 27 Nov 2026 271 downloads, timdedid/qwen3.8-cyber-uncensored — Malspark, 27 Nov 2026 136 downloads, timdedid/qwen3-cyber-UNCENSORED-2 — Malspark, 27 Nov 2026 75 downloads, timdedid/qwen3-cyber-UNCENSORED — Malspark, 27 Nov 2026 1,488 458 271 136 75 200 PyPI sample avg, 20 days 1,000 passed by 6% of PyPI malware Reference lines: Vu, Newman and Meyers (ICSE 2023); Guo et al. (ASE 2023). PyPI counts cover whole lifetimes; these cover days.
Against PyPI malware, the Huihui model's 1,488 downloads in about five days is unusually high. The other four sit where most registry malware sits.

By that yardstick the Huihui model did well for an attacker. It’s in the top tier of what PyPI malware reaches, and it got there in about five days, not over a lifetime that for 28 percent of Guo’s packages ran past two months before anyone flagged them. The other four look like ordinary registry malware. My guess is that the names did the work. “Abliterated” and “uncensored” are the labels people look for when they want an unrestricted local model, and Mir2k’s twelve empty placeholders, named after releases such as Qwen4-27B and DeepSeek-V4, show an attacker betting on people grabbing the first quantized upload of a new model. That’s typosquatting adapted to model hubs, where the bait is being first instead of a misspelled name.

The comparison only goes so far. A PyPI download installs code that runs at install time, and Guo found that 580 of the 846 malicious packages they classified, 68.6 percent, attacked during installation. A GGUF download runs nothing. For Mir2k a person still has to paste the command. That makes a model download much less likely to become an infection than a package download, which is one more reason to read 2,428 as an upper bound on an upper bound.

Five in 3.27 million is a floor

The other tempting reading is the rate. Five malicious repositories out of 3,273,389 is about 1.5 per million. Among the 226,310 GGUF repositories, it’s about 22 per million. One PyPI administrator said publicly that over 12,000 unique projects were removed from PyPI in 2022 for spam, typosquatting and similar abuse, as Vu, Newman and Meyers report, and Zhou and colleagues assembled 24,356 malicious packages from public sources. Next to that, Hugging Face looks almost clean.

I wouldn’t conclude that from this scan, for three reasons the write-up mostly gives itself.

First, it counts only what was still online on 26 November and only what matched two patterns: suspicious template logic and bytes after the last tensor. Anything already taken down, or hidden somewhere else, isn’t in the five. The write-up demonstrates three other hiding places in lab files, including alignment padding and zero-scale weight blocks. None triggers a warning in llama.cpp or gguf-py, and the scan doesn’t claim to have searched for them in the wild.

Second, a single scanner sees a slice. Zhou and colleagues found that “it is essential to collect malicious packages from various online sources because their data overlapping degrees are small.” Different vendors catch different malware. One researcher’s count from one method is a lower bound for the ecosystem.

Third, and to me the most interesting, is the step between the scanner and the five. The write-up says manual review “removed security test repositories, harmless persona prompts and published research samples.” It doesn’t say how many templates the static rules flagged before that review. That number decides whether this kind of scan can run continuously on a model hub.

Scan sizes and what a false positive rate would mean at that scale Horizontal bars on a logarithmic scale. 3,273,389 public model repositories scanned and 572,184 chat templates parsed, from the Malspark write-up of 27 November 2026. If a template scanner had a 14.9 percent false positive rate, the lowest measured for PyPI malware checks by Vu, Newman and Meyers (ICSE 2023), it would flag about 85,255 benign templates. At a 0.1 percent rate, which PyPI administrators called unacceptably high in the same study, it would flag about 572. Five malicious models survived manual review. LOG SCALE · SCAN COUNTS (MALSPARK, 27 NOV 2026) · FALSE-ALARM ARITHMETIC (VU ET AL., ICSE 2023) 1 100 10,000 1,000,000 Repositories scanned Chat templates parsed Flags at 14.9% false alarms Flags at 0.1% false alarms Malicious after review 3,273,389 public model repositories scanned — Malspark, 27 Nov 2026 572,184 chat templates parsed — Malspark, 27 Nov 2026 About 85,255: 14.9% of 572,184, lowest PyPI-check false positive rate in Vu et al., ICSE 2023 About 572: 0.1% of 572,184, the rate PyPI admins called unacceptably high, Vu et al., ICSE 2023 5 malicious models — Malspark, 27 Nov 2026 3.27 M 572,184 ≈85,255 ≈572 5 The two flag counts are hypothetical: the write-up does not report how many templates its rules flagged before manual review.
Five real findings in 572,184 templates means even a scanner that is wrong one time in a thousand would bury them under about 572 false alarms.

PyPI has already run into this. Vu, Newman and Meyers interviewed PyPI’s administrators and benchmarked three malware scanners. The administrators “consider a false positive rate of even 0.1% to be unacceptably high, given the large number of package releases that might trigger false alerts.” The measured tools had false positive rates between 15 and 97 percent. The arithmetic is the same here. With five real cases in 572,184 templates, a template scanner that is wrong one time in a thousand produces about 572 false alarms, more than a hundred for each real one. One that performs like the best PyPI check in that benchmark produces about 85,000.

The write-up’s own list of what review removed (security test repos, persona prompts, research samples) suggests the static rules fired on more than five things. I’d like to know how many. If the answer is in the dozens, the template check is precise enough for a hub to run on every upload. If it’s in the thousands, it works as a research sweep and not as a gate.

What’s cheap to fix

The appended-bytes half of this attack has a structural fix. The write-up points out that the safetensors loader already “refuses a file whose declared tensors do not fill it exactly.” A GGUF file declares where its data ends, and anything past that point does nothing for the model. Rejecting those bytes at upload costs nothing in false alarms, because a valid file has none. That check doesn’t have the base-rate problem above, because it tests the file’s structure and never has to judge content.

The template half is harder, because templates are code that legitimately varies. For anyone running local models, the write-up’s advice is the one I’d follow: pass a reviewed template with --chat-template-file in llama.cpp, or TEMPLATE in an Ollama Modelfile, whenever the model has tool access. And treat a command the model prints as untrusted, because the template sits between you and the model and you never see what it adds.

As for the 2,428, the honest version of the headline is “five malicious models, downloaded 2,428 times, with an unknown and probably much smaller number of infections.” That’s less dramatic, and it’s also the version the write-up itself supports.

References

  1. Düzgün. “GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims.” Malspark blog, 27 November 2026. Sections 1–6. malspark.com/blog/malicious-gguf-models-hugging-face
  2. Fogel A, Hofman O, Cohen E, Vainshtein R. “Inference-Time Backdoors via Chat Templates: From LLM Supply Chains to Agentic System Compromise.” arXiv:2602.04653, posted 4 February 2026. arxiv.org/abs/2602.04653
  3. Wang Z, Liu C, Cui X. “EvilModel: Hiding Malware Inside of Neural Network Models.” arXiv:2107.08590, posted 19 July 2021. arxiv.org/abs/2107.08590
  4. Zerouali A, Mens T, Robles G, Gonzalez-Barahona JM. “On the Diversity of Software Package Popularity Metrics: An Empirical Study of npm.” 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER), February 2019. doi:10.1109/SANER.2019.8667997
  5. Guo W, Xu Z, Liu C, Huang C, Fang Y, Liu Y. “An Empirical Study of Malicious Code In PyPI Ecosystem.” 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE), September 2023. doi:10.1109/ASE56229.2023.00135
  6. Vu DL, Newman Z, Meyers JS. “Bad Snakes: Understanding and Improving Python Package Index Malware Scanning.” 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), May 2023. doi:10.1109/ICSE48619.2023.00052
  7. Zhou X, Zhang Y, Niu W, Liu J, Wang H, Li Q. “An Analysis of Malicious Packages in Open-Source Software in the Wild.” 2025 55th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), June 2025. doi:10.1109/DSN64029.2025.00045