GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims
88 points by homarp 4 hours ago | 28 comments
stephantul 3 hours ago
Good reminder to all that a download on hf means a model invocation/load, not a literal download. So this might very well have been 24 users calling Automodel 100 times or a single user calling it 2400 times.
replythatsabadlook 3 hours ago
Of course it's 5 random abliterated models. Glad people are paying attention to this, and I hope people start paying more attention to attack vectors like this. But it seems nearly insignificant at the scale reported. I would t be surprised if there were more sophisticated exploits sitting on hf today.
replyyborg 3 hours ago
I had no idea this was even possible, I thought that the model files were strictly containers for weights and tensors. Now I understand why 'safetensor' format is called that. It feels like ancient history from when people used self-unpacking compression formats to deliver malware payloads...
replykccqzy 2 hours ago
I really appreciate the effort behind safetensors, but I think in this case it wouldn’t help.
reply> models in the Safetensors and PyTorch formats carry the same kind of template in a separate file, usually tokenizer_config.json or chat_template.jinja, so this half of the method applies to them too
wronglebowski 3 hours ago
This is a fine article, but if there’s truly only 5 out of 3273389 that are malicious that’s an incredibly low number. I’d bet there’s more malicious google ads people click on every day than use these models.
replyfuussssip 37 minutes ago
It's useful for people to know the models can do this. Most people think the models are just collections of weights. That said, understanding the attack vector here, it makes a lot of sense why detecting these things is hard.
replyheresie-dabord 2 hours ago
> only 5 out of 3273389 that are malicious
replyI feel that this is comparable to the naïve (apocryphal) "640k RAM" anecdote.
iugtmkbdfil834 3 hours ago
It is interesting. I am glad they are doing it, but it is interesting that after Dario officially declares war on open models, we immediately get a dose of news of why open models are bad and main heretic dev quits. I half expect this administration to claim they are a national security issue.
reply
That said, barring the rare exploits in the gguf parsers, etc, running inference on a random LLM model is actually not dangerous at all. It only becomes dangerous when you run it in a harness agentically with ability to interpret the models' text output as system commands.
No amount of system/user/role jinja template stuff can cause a model to be dangerous if you just run it in, say, llama-server and talk to it via the chat interface.
If you're just talking about blobs, I don't know anyone who's paranoid about downloading a movie...
This isn't those "kids these days" scenarios. It's just some new attack vector (chat templates) that people haven't been trained to be wary of.
But you don’t execute a movie on some “runtime”, you just read data from it using a well-defined spec + tested parser. The scope of what can happen is much more narrow.
In the end I agree with you, it’s an attack vector and people need to be aware of it.
there's some new RCE on crafted video files (or even poor old jpeg) every other month. Also you don't know how many seemingly basic file format end up having some accidentally (or mor often, voluntarily) turing complete language coming along. .mkv can embed custom fonts for subtitles, and TTF can execute arbitrary programs in its interpreter language for font hinting. So anyone sending you video files can technically execute arbitrary computations [1] in your media player, by design.
[1]: https://fuglede.github.io/llama.ttf/
I have a piece of software on my computer that with one click downloads and executes multi gigabyte files called Steam.
The idea that it's unthinkable is frankly wild to read.