Downloading and executing gigabyte-sized blobs would’ve been unthinkable in the past. Combine that with the size/popularity of a centralized, “trusted” (even thought it’s really not, it’s just user uploads after all) platform for distribution and it was only a matter of time until this would be exploited.
> If you're just talking about blobs, I don't know anyone who's paranoid about downloading a movie...
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.
> you just read data from it using a well-defined spec + tested parser.
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.
I agree it was unthinkable. We spent a lot of effort teaching a couple generations not to execute arbitrary programs from random sources. But that changed in the 2010s and onward. Now you're considered very weird and wrong if you don't automatically execute all random programs from unknown third party sources. People will even say it's your own faul and you deserve it if things don't work.
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.
Gigabyte sized blobs get downloaded all the time. Movie and software piracy have been a thing forever. Torrenting them is not uncommon. As are linux ISOs.
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.
Good point, unthinkable was definitely too strong of a word choice. But, staying in the analogy, you’re not launching forks of popular games by unknown randoms on Steam, rather the “known good” original games, I guess? And even then, from what I’ve read in recent years about mandatory kernel-level anticheats, one might argue it’s not so dissimilar after all.
General, if you have to, you download those drivers from the manufacturers. Not saying those never get compromised, but it's different from getting a blob from some random author.
Depends on what you do. Have definetly needed to get a userspace part of a driver, with a kernel patch to give the interface from a manufacturer before.
What does this have to do with Linux drivers? Most of them are open source, so no blobs at all. Some require firmware blobs, but those are also not from unknown sources.
Good point, the latter, which is why I failed to consider it. I guess most (?) games people install and run are from a reputable publisher or at least source where there’s been sufficiently many downloads to assume it’s safe?
IMO, any system that was exploited by this was already insecure. It's not exploiting bugs in the inference engine or attempting any kind of sandbox escape. Here the exploit was in the chat template, but it's possible to encode the same thing directly in the weights. Unless the model is truly Open Source (not just open weight), there's no way to know what malicious instructions might be encoded in the weights. The only defense is to sandbox the agent sufficiently strongly that it can't do harm no matter what tokens it generates. In such a sandbox, it doesn't matter that the payload was stored directly in the GGUF file, because it won't be able to do anything with it anyway.
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.
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.
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...
I really appreciate the effort behind safetensors, but I think in this case it wouldn’t help.
> 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
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.
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.
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.
Downloading and executing gigabyte-sized blobs would’ve been unthinkable in the past. Combine that with the size/popularity of a centralized, “trusted” (even thought it’s really not, it’s just user uploads after all) platform for distribution and it was only a matter of time until this would be exploited.
30 years ago, we already downloading ISOs (Linux, or whatever) that were 0.6+ GBs. And they weren't just blobs, they were executable code.
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.
> If you're just talking about blobs, I don't know anyone who's paranoid about downloading a movie...
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.
> you just read data from it using a well-defined spec + tested parser.
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 don’t believe this would lead to other than a buffer overflow. I would be surprised if such an exploit was actually chained in the wild.
I agree it was unthinkable. We spent a lot of effort teaching a couple generations not to execute arbitrary programs from random sources. But that changed in the 2010s and onward. Now you're considered very weird and wrong if you don't automatically execute all random programs from unknown third party sources. People will even say it's your own faul and you deserve it if things don't work.
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.
Gigabyte sized blobs get downloaded all the time. Movie and software piracy have been a thing forever. Torrenting them is not uncommon. As are linux ISOs.
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.
Good point, unthinkable was definitely too strong of a word choice. But, staying in the analogy, you’re not launching forks of popular games by unknown randoms on Steam, rather the “known good” original games, I guess? And even then, from what I’ve read in recent years about mandatory kernel-level anticheats, one might argue it’s not so dissimilar after all.
Who curates Steam games? Certainly not Valve. I'm sure there's malware there -- especially if you run items from the Steam workshop.
And yeah, plenty of games are wedging themselves directly into your kernel. Wasn't too long ago Sony was caught snooping with a game install.
Arent linux drivers often small or medium sized blobs?
General, if you have to, you download those drivers from the manufacturers. Not saying those never get compromised, but it's different from getting a blob from some random author.
You get them from your distribution. Nobody is getting Linux drivers from manufacturers, they wouldn't even compile on your kernel.
Depends on what you do. Have definetly needed to get a userspace part of a driver, with a kernel patch to give the interface from a manufacturer before.
What does this have to do with Linux drivers? Most of them are open source, so no blobs at all. Some require firmware blobs, but those are also not from unknown sources.
I guess that’s why many prefer open source drivers
Why would you use Linux if that's for loading proprietary drivers ? That's loosing the plot IMO.
After the xz fiasco there was a blob witch-hunt in open source projects. Now people are giving blobs access to their bank accounts.
I guess you only play opensource games or you dont game at all.
Good point, the latter, which is why I failed to consider it. I guess most (?) games people install and run are from a reputable publisher or at least source where there’s been sufficiently many downloads to assume it’s safe?
IMO, any system that was exploited by this was already insecure. It's not exploiting bugs in the inference engine or attempting any kind of sandbox escape. Here the exploit was in the chat template, but it's possible to encode the same thing directly in the weights. Unless the model is truly Open Source (not just open weight), there's no way to know what malicious instructions might be encoded in the weights. The only defense is to sandbox the agent sufficiently strongly that it can't do harm no matter what tokens it generates. In such a sandbox, it doesn't matter that the payload was stored directly in the GGUF file, because it won't be able to do anything with it anyway.
> it can't do harm no matter what tokens it generates
https://people.cs.umass.edu/~emery/classes/cmpsci691st/readi...
That's not specific to LLM agents. The trusting-trust attack applies to all computer security, and there are countermeasures:
https://dwheeler.com/trusting-trust/
Nice try. The "countermeasures" are just about compilers: https://dwheeler.com/trusting-trust/dissertation/html/wheele...
There is no general purpose solution. Using multiple LLMs does not work since their outputs are not deterministic so you can't use the same trick.
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.
What do they call literal downloads? Because you can also literally download models from hugging face.
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.
Think it's a wakeup call because not sure how many people realised GGUF isn't safe when it became popular after safetensors
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...
I really appreciate the effort behind safetensors, but I think in this case it wouldn’t help.
> 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
A small attack vector compared to all those AI vibe coded program clones or ports.
How many have checked the ArtCraft clones for malware before installation?
How many fell for fake GTA 6 PC ports?
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.
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.
> only 5 out of 3273389 that are malicious
I feel that this is comparable to the naïve (apocryphal) "640k RAM" anecdote.
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.
It's actually not interesting.
What you're identifying is: news item 1 makes news item 2 more viral.
So, not interesting.