Poisoned Pipeline / Incidents / AS534
Five GGUF models across 3.27 million scanned Hugging Face repositories carried their payloads in the model file and the chat template — one account appended an 11.47 MB Windows RAT past the last tensor days before arming the template that extracts it, and another turned a trigger phrase into a PowerShell command for a coding agent
AI platform / inference providerWindows softwareDeveloper workstationAI coding agents
Malspark published this on 27 November 2026. On 26 November the author
scanned every public model repository on Hugging Face — 3,273,389 of them,
including 226,310 GGUF repositories holding 2.56 PB of weights — and parsed
572,184 chat templates statically, without executing any. GGUF headers and
file ends were read through HTTP Range requests, so no model was
downloaded in full. Manual review removed security test repositories,
harmless persona prompts and published research samples. Five
repositories remained, from two accounts, with 2,428 downloads on
27 November; at the 26 November scan the same five had 1,502. All five
were still online when the report was published.
The GGUF layout makes the first half possible. A header and metadata table
come first, then the tensor table, padding to an alignment boundary, then
the weights. Runtimes such as llama.cpp and LM Studio read the byte ranges
the header names and ignore everything else, so bytes appended after the
farthest tensor change nothing about how the model loads and trigger no
warning. Safetensors refuses a file whose declared tensors do not fill it
exactly; GGUF does not.
Mir2k is a new account with French traces in the model cards, the system
prompt inside the template, the commit messages and the strings in the
malware. On 22 November it created fourteen repositories. Twelve are empty
placeholders named after expected releases — Qwen4-27B, DeepSeek-V4,
Llama-4-Scout, gemma-4-27b and similar — created in two automated bursts.
Huihui-Qwen3.5-9B-abliterated-GGUF went up that day with an 11.47 MB
Windows x64 program appended after its last tensor and its original, clean
template. Inkling-2-Mini-Uncensored-GGUF followed on 24 November with the
same program compressed. For those days the files carried the payload and
nothing to start it.
On the morning of 26 November both templates were replaced within about an
hour, and nine hours later replaced again. The armed template adds a
French system message telling the model to begin every reply with one
PowerShell line, copied character by character, then answer normally. The
line finds the largest .gguf file in the user profile, reads its last
bytes and writes them to %TEMP%\d.exe, then starts the process. In the
Huihui model it reads 11,474,944 bytes from 12,000,000 before the end of
the file; in Inkling it reads the last 4,200,000 and decompresses them with
DeflateStream first. The first armed version used a fixed path in the
Downloads folder; the second searched the whole profile. Downloads made
before 26 November therefore carry the payload without the trigger, and the
count grew from 1,502 at the 26 November scan to 2,428 a day later.
Both models unpack to the same 11.47 MB program, named ollie in its own
strings, most of which is a complete copy of Tor 0.4.9.16 at 10.25 MB. It
looks for VirtualBox, VMware and Sandboxie drivers and for usernames such
as sandbox, malware and test, and exits when it finds them. On a real
machine it registers a scheduled task that runs it every ten minutes at
highest privileges, keeps two watchdog processes, re-enables itself
through StartupApproved keys and marks its process critical so ending it
crashes Windows. It attempts the fodhelper UAC bypass and fails: both
registry paths were compiled without their backslashes. It writes Tor to
disk, starts it with SocksPort 9050 and reaches an onion service over a
ChaCha20 channel with a built-in pre-shared key. Through that channel it
sends Chrome, Edge and Brave passwords read through DPAPI, leaving Chrome's
newer v20 App-Bound entries encrypted, targets the Phantom and MetaMask
wallet extensions, supports keylogging, clipboard reading, screenshots,
screen streaming and webcam capture, and mines Monero with RandomX when the
machine is idle. Its folders are named ollie under AppData\Roaming, close
enough to Ollama to read as familiar, and it still contains a path from the
author's own machine, C:/Users/MoH/socks.txt.
A day earlier, on 21 and 22 November, the account timdedid published three
byte-identical copies of a Qwen3 1.7B model aimed at security users, with
an Ollama mirror named timdedid/qwen3-1.7b-cyber. The template is Qwen3's
official one plus a block that runs when the user's latest message
contains "What is": it inserts a [SYSTEM DIRECTIVE] telling the model to
call its powershell tool, download value.ps1 from technoarteng.com into
C:\Windows\Temp\payload.ps1 and run it in a hidden window. The README
tells users not to replace the embedded template, which keeps the trigger
in place. All three parts are visible in Hugging Face's metadata viewer
without running the model. The three repositories had 271, 136 and 75
downloads on 27 November; the second-stage script was not recovered and
the URL had no reputation record.
The report also reproduces three hiding places the live samples did not
use: alignment padding raised from the usual 32 bytes to several
megabytes; a ZIP archive starting immediately after the weights, so the
same file loads as a model and imports as Python through zipimport; and
text stored in Q8_0 blocks whose scale is +0.0 or -0.0, where any 32 bytes
decode to zero weights and the negative-zero scale defeats a check for
0x0000. None changes a dequantized weight, and none made llama.cpp or
gguf-py warn.
Detection in the report is structural rather than signature-based.
gguf-radar parses tokenizer.chat_template into a syntax tree without
running it and flags file reads and writes, decompression, process starts,
download commands, conditional hidden directives, code-poisoning
instructions and Python escape gadgets. It computes where the model data
must end and reports bytes after that point, non-zero padding, data in
zero-scale blocks and negative-zero scales, then writes a canonical file
with 32-byte alignment and the trailing bytes removed. In its table,
antivirus and pickle scanners raised no alert on either live Mir2k file
and both GGUF parsers loaded them normally; after the rebuild the weights
were unchanged. Four YARA rules cover the ollie binary, self-extracting
end-of-file templates, the timdedid directive and template code poisoning.
The report credits Pillar Security's July 2025 hidden-instruction work,
Fogel et al.'s 2026 measurement across 18 models and four engines, and
EvilModel's 2021 weights steganography, and claims the first public record
of the combination in live repositories.
Mapped techniques
- T0109 Publish malicious artifact
- T0277 Reserve repositories named after models that have not been released
- T0272 Append the payload after the last tensor where the loader stops reading
- T0275 Compress the appended payload and leave filler behind it so signature scanners see nothing
- T0274 Arm the template days after the payload was published
- T0273 Hide an instruction in the chat template that the model repeats but the chat window never shows
- T0276 Trigger the template on a phrase in the user's message and aim it at the agent's shell tool
- T0184 Harvesting sensitive information from files
- T0139 Resource hijacking
supply-chain A model file that carries a program the loader never reads
Mir2k created fourteen repositories on 22 November 2026 and
uploaded Huihui-Qwen3.5-9B-abliterated-GGUF the same day and
Inkling-2-Mini-Uncensored-GGUF on 24 November; timdedid published
three copies of a Qwen3 1.7B model on 21 and 22 November plus an
Ollama mirror. The five Hugging Face repositories had 2,428
downloads on 27 November, against 1,502 at the scan a day earlier.
Twelve of Mir2k's fourteen repositories are empty placeholders
named Qwen4-27B, DeepSeek-V4, Llama-4-Scout, gemma-4-27b and
similar, created in two automated bursts on 22 November. They name
models the upstream projects had not released, ready to be filled
when the real weights appear.
Huihui carries a plain Windows x64 program after the farthest
tensor followed by about half a megabyte of filler; Inkling carries
the same 11.47 MB program with raw Deflate. The GGUF header fixes
where the model data ends, and llama.cpp, LM Studio and the other
runtimes read only the ranges it names, so neither file loads
differently and neither parser warns. Safetensors rejects bytes
past the declared tensors; GGUF does not.
The first file's tail is 0.5 MB of filler after the executable, so
a scanner reading the last few kilobytes sees nothing. The second
uses raw Deflate, which removes the MZ header, the PE structure and
every signature string; the template decompresses it in memory
with DeflateStream. Antivirus and pickle scanners raised no alert
on either live file, and both parsers loaded them normally.
Both models were uploaded with clean templates on 22 and 24
November. On the morning of 26 November both templates were
replaced within about an hour, and nine hours later replaced again
to search the whole profile instead of a fixed Downloads path.
Downloads before 26 November carry the payload without the
instruction that extracts it; the file is edited in place, and the
repository keeps both revisions.
The armed template adds a French system message telling the model
to begin every reply with one PowerShell line, copied character by
character. The line finds the largest .gguf in the user profile,
reads its last bytes, writes %TEMP%\d.exe and starts it. The model
answers normally, and the command arrives as the first line of
every reply rather than as a message from the file.
post-supply-chain The reply the model produces is the execution path
timdedid's template waits for "What is" in the user's latest
message, then inserts a [SYSTEM DIRECTIVE] telling the model to
call its powershell tool, download value.ps1 from technoarteng.com
to C:\Windows\Temp\payload.ps1 and run it hidden. The three
repositories had 482 downloads on 27 November; the README advises
against replacing the embedded template, and the second stage was
never recovered.
The ollie implant reads saved passwords from Chrome, Edge and Brave
through DPAPI — leaving Chrome's newer v20 App-Bound entries
encrypted — and targets the Phantom and MetaMask wallet extensions,
alongside keylogging, clipboard reading, screenshots, screen
streaming and webcam capture. The credentials leave over the
bundled Tor client's onion service.
When the machine is idle, ollie mines Monero with RandomX over the
same Tor channel, adding the victim's CPU to the operator's pool
alongside the credential theft.
Framework gaps noted
- No victim is identified. Hugging Face counts downloads, not people or machines, and neither campaign reports endpoint telemetry; 2,428 downloads is an upper bound on affected users, not a count of them.
- The arming date splits the downloads but not cleanly. The 1,502 figure was taken at the 26 November scan, after the morning rewrite, so part of it may already be armed downloads; the report does not separate the pre-arm and post-arm totals, and no run of the printed PowerShell command is recorded.
- The timdedid second stage is missing. value.ps1 was hosted on technoarteng.com, the URL had no reputation record, and what the script would have installed is unknown; the Ollama mirror's downloads are not reported separately.
- Both extraction paths assume a layout. The first armed Mir2k template read a fixed path in the Downloads folder and the second searched the profile for the largest .gguf; how many local installations match either shape — models stored on another drive, renamed, or converted to another format — is not measured.
- The implant is less capable than its feature list. The fodhelper UAC bypass was compiled without the backslashes its registry paths need and fails, Chrome v20 App-Bound entries are left encrypted, and the scheduled task runs at whatever privileges the user already has.
- The three further hiding places were built in the lab. Alignment padding, the GGUF-plus-ZIP polyglot and zero-scale Q8_0 blocks were synthetic test files; no live sample used them, and whether Hugging Face or a runtime would reject them is untested beyond llama.cpp and gguf-py loading them without a warning.
- Attribution rests on language traces, naming and shared tooling, not infrastructure. The French strings, the ollie/Ollama naming and the author's leftover path support one operator for the two Mir2k models; the report treats Mir2k and timdedid as separate actors and does not link them.