Need help?
<- Back

Comments (78)

  • drillsteps5
    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.
  • kodoman
    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.
  • msdz
    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.
  • mrob
    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.
  • skwon816
    nowadays we tend to think files created by LLMs are safe - we still need to be cautious
  • catlifeonmars
    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?
  • rlt
    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.
  • nezhar
    I was always wondering if malware can be hidden in the weights, so this answers my question.
  • 1broseidon
    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.
  • stephantul
    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.
  • rhdunn
    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.
  • googaar
    I try to use vetted uploaders like unsloth. I should start compiling the GGUFs myself.
  • linuxhansl
    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).
  • nmbr5
    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.
  • wronglebowski
    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.
  • anon
    undefined
  • hrncn
    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.
  • thatsabadlook
    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.
  • SamInTheShell
    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.
  • dools
    If these files can be scanned, wtf is hugging face not the one scanning them?! Otherwise they’re just blindly hosting malware
  • cwyn
    [dead]
  • t9tokenbudget
    [dead]
  • Beyen
    [dead]
  • musclehed03
    [dead]
  • insurancepanda
    [dead]
  • me2too
    [dead]
  • Nearsalt41
    [dead]
  • jmspamerton
    [dead]
  • iugtmkbdfil834
    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.