Glad I have a stupidly paranoid setup for llama-cpp where I run it in a vm only able to be connected to. not that this is the only possible issues and stuff like malicious models quantized models (IE models that are secretly trained to do something malicious but posed as a simple quantization) is another issue people sleep on. I think securing agents is a nightmare, but those who think about them will be ahead.
msdzyesterday at 12:35 PM
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.
mrobyesterday at 3:45 PM
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.
catlifeonmarsyesterday at 5:23 PM
Is my understanding correct that the malware was entirely in a metadata file that injected hidden prompts rather than the model weights being poisoned in some way? I assume this is way cheaper to execute. On the surface it also seems way cheaper to catch. Is it less detectable than e.g. poisoning a models weights or am I missing something here?
drillsteps5yesterday at 11:19 PM
If I read this correctly the attack is executed by adding certain text (which is a command to execute some PowerShell (?)) to the output/response. So nothing will happen if you use the GGUF in chat mode.
Even if you execute the agent, I'm not sure the attack will work in all the cases. Is the syntax used will work in 100% cases when receiving LLM will read this instruction?
Also, it means that you need to isolate the agent, not the inference engine which in and of itself doesn't execute any instructions.
If I'm wrong please correct me.
rltyesterday at 9:17 PM
I'm more concerned about very subtle backdoors hidden deep in the model weights. How hard would it be for a model to recognize when it's being used by an agent on a sensitive system and run commands install malware, exfiltrate data, insert a backdoor in code, etc?
Not hard, I suspect.
1broseidonyesterday at 4:19 PM
Is it surprising that a large unchecked distribution network is used to distribute malware? No.
Is it surprising that it’s such a small scale? Yes. Which means we are early on and haven’t seen history repeat itself yet. These were no-name models but soon it will be name-brand models and it will start tricking more and more people.
HF should get ahead of this now and implement stronger scanning and protections while it’s still not a large scale problem.
linuxhanslyesterday at 8:37 PM
llama.cpp (and other tools) should perform a basic metadata sanity check.
(It took me two minuted to create a python script for doing this. So it's not hard to do.)
Also, only ever use trusted sources (like unsloth, etc).
stephantulyesterday at 1:02 PM
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.
nezharyesterday at 10:38 PM
I was always wondering if malware can be hidden in the weights, so this answers my question.
googaaryesterday at 5:33 PM
I try to use vetted uploaders like unsloth. I should start compiling the GGUFs myself.
rhdunnyesterday at 6:22 PM
I personally prefer to create the GGUF files locally after downloading official safetensor weights. One advantage to this is that it makes it easier to experiment with different quantizations.
skwon816yesterday at 11:21 PM
nowadays we tend to think files created by LLMs are safe - we still need to be cautious
nmbr5yesterday at 6:21 PM
what I want to know is why isn't HF and anyplace else that hosts model files using gguf-radar on all uploads? this appears to be a simple thing to automate. and if it says something is wrong quarantine the upload until a human looks over the report, since it does have a chance of false positives.
wronglebowskiyesterday at 1:31 PM
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.
deletedyesterday at 5:26 PM
hrncnyesterday at 4:32 PM
This is basically why I am not a fan of infernix or ninfer(-all) or all the other less mature projects that offer lots of performance tied to bespoke model files. The executable GH releases and builds are (at least in the case of actual GH builds) likely fine, and can be built manaually just to be sure, but a massive mystery blob on HF can contain anything, and inspecting something more arcane than plain old gguf is a challenge.
thatsabadlookyesterday at 1:09 PM
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.
SamInTheShellyesterday at 7:07 PM
Lots of words to just explain this simple thing here.
The GUFF's jinja template can be used to suppress your system prompt conditionally or append or modify it. Binary blobs or malicious code can be packed with the model to be written and executed.
Shenanigans can occur through just markdown output if it can render anything remote. Data exfiltration through uri://domain.tld/collector.ext?query=<all-your-data-in-context-belongs-to-hacker>
Having your inference isolated is great and all, but it's not going to protect you from your model having some side channel to Internet access in this scenario.
doolsyesterday at 9:08 PM
If these files can be scanned, wtf is hugging face not the one scanning them?! Otherwise they’re just blindly hosting malware
apishare_apitoday at 12:03 AM
[dead]
cwynyesterday at 10:01 PM
[dead]
t9tokenbudgetyesterday at 3:17 PM
[dead]
Beyenyesterday at 5:04 PM
[dead]
insurancepandayesterday at 4:08 PM
[dead]
musclehed03yesterday at 5:28 PM
[dead]
me2tooyesterday at 2:27 PM
[dead]
Nearsalt41yesterday at 12:46 PM
[dead]
jmspamertonyesterday at 5:26 PM
[dead]
iugtmkbdfil834yesterday at 12:53 PM
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.