A scan of all 3273389 public Hugging Face model repositories found five malicious models downloaded 2428 times. The main campaign, Mir2k, hides a Windows remote access trojan at the end of GGUF files and later arms the chat template to make the model print the command that unpacks it.
wait, so they went from pickletensor to safetensor because of the risk of arbitrary code execution, then they introduced gguf and now ace is back?
This doesn’t read like arbitrary code execution when loading the model to me. You actually have to run the model in an environment where it can execute a powershell script.
I figure an attack like this is possible with safetensor as well. Just need to train the model with the powershell instruction.
Yep this is it.
The model has been trained to produce malicious text output.
That text output by itself is harmless to your system, but if you are running the model in a context where you gave it access to tools (like you would if you were using it for local coding etc) then that malicious output may be able to execute via that tools hook.
If you are only using a model for text generation with no tools, then there is no execution vector and you would be safe because the malicious output is just text that (by itself) does nothing.
“Trained” is the wrong technical term; they just modified the chat template I think. But yeah.
Worst part: you can actually train the model this way. Their scan worked because it was plaintext instruction, if this would be baked into the weights you can’t find out without running, which threat analyzers won’t do.
With LORAs it isn’t even that hard.
Sorry, yes. It was the template that produced the bad output not the model. Aside from that, everything I said about attack vector is still true. Thanks for the correction :)
oh that’s a lot harder to guard against. not in this particular case obv, who even uses power shell, but in general.
they really need to design a model format that supports out-of-band signalling, or separation of code and data.
I mean, any kind of model execution just needs to be strictly sandboxed going forward.
Everything does.
The days of programs having access to the whole drive are over. They have to be sandboxed to certain directories, or an info stealer will inevitably get something.
we’ve had the tech since the mid-90’s. people just have to use it.