Unofficial Hacker News client - receive Push Notifications on replies.

GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400 Victims (opens external site)

323 points by homarp 3 days ago | malspark.com | 99 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (41)

  1. 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.
    Replies (8)
    1. Arent linux drivers often small or medium sized blobs?
      Replies (5)
      1. 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.
      2. Why would you use Linux if that's for loading proprietary drivers ? That's loosing the plot IMO.
      3. 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.
        Replies (1)
        1. You get them from your distribution. Nobody is getting Linux drivers from manufacturers, they wouldn't even compile on your kernel.
          Replies (2)
          1. 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.
            Replies (1)
            1. Same. I've had hardware that was new enough when I bought it that building the drivers from the chipset manufacturer was the only way to get it working (at least on my preferred distro). I think the last time I had to do this, it was a Realtek NIC for a desktop I built around 2020.
          2. I _have_ had to pull in a Linux driver from the manufacturer's repo (Intel in this case) and squint my eyes hard figuring out how to make it compatible with my kernel. Hooray, robotics. I don't recommend it.
      4. I guess that’s why many prefer open source drivers
      5. The drivers aren't, the firmware blobs they load are
    2. I guess you only play opensource games or you dont game at all.
      Replies (3)
      1. 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?
        Replies (1)
        1. People dont really trust the publisher, they prob dont even know it. They trust Steam and HF to keep the bad stuff out imo.
      2. Not the author of previous post but my gaming machine is treated as an untrusted machine. I run it as a game console on a separate network NATed behind its own router on which I only opened port forwarding in order to connect to it via moonlight and to llama.cpp because yed, it is also the machine I use to run models, on a different linux install/hard drive.

        There is no way I would type any password other than my steam and gog passwords on it and I definitely do not save any payment details on these accounts. I actually purchase the games from a browser on another machine and only do the download on the gaming one.

      3. This is why I always run larger applications/games in their own isolated container or separate user account that doesn't have access to the network or the rest of my $HOME.

        I think this will become especially more important as people are now running a lot more lower-quality/AI-derived code, including games, like with the recent boom in static recomps.

        Replies (1)
        1. Tbf I do the sames with flatpak + bottles
    3. 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.

      Replies (1)
      1. > 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.

        Replies (3)
        1. > 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/

          Replies (2)
          1. 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.
            Replies (2)
            1. We found real RCEs in Obsidian plugins that could be triggered by opening a malicious .md file. https://zeroquarry.com/research/obsidian-tasks-rce/ is just one example

              Some of the ebook jailbreaks use local script interpretation as a vulnerability path triggered by malicious epubs

              The problem is very real and very much in the wild and the size of the file has little to do with how serious the vulnerability can hide in an otherwise innocuous file type

              Continue this thread (1 replies) →

            2. actually this happens a lot more thank you might think
          2. just run a VM that plays the video/displays the image and screencap it, simple /s
        2. "Just".

          At one point, Pegasus was able to be installed on your phone if someone simply sent you a text with a PDF disguised a GIF. Zero-click exploit, nothing you could do about it. We try to design systems with security-in-depth for a reason. You should never treat data as inert.

          https://citizenlab.ca/research/forcedentry-nso-group-imessag...

          Replies (1)
          1. Hm. Obviously I get the point you’re making, but something like Pegasus doesn’t really feel comparable. After all, I don’t think compromised/evil GGUFs on Hugging Face also require the attacker to spend one or several zero-days on an otherwise sandboxed system… you just willingly execute something you’ve downloaded yourself, on a regular ungated machine.
        3. > 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.

          That's generally what happens if you play a movie in a modern environment. Back then, apparently, DVDs involved some executable code shenanigans: eg. https://en.wikibooks.org/wiki/Inside_DVD-Video/Interaction_M...

    4. After the xz fiasco there was a blob witch-hunt in open source projects. Now people are giving blobs access to their bank accounts.
    5. 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.

      Replies (1)
      1. 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.
        Replies (2)
        1. 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.

        2. Yes, people pirating games have for long time installed NoCD cracks and stuff from dubious sources. It seems these days "repacks" are a popular thing now ie. the whole game wrapped in a custom compressed installer (instead of ye olden way of downloading an bit-exact .iso of a retail disc).
    6. 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.

    7. What a red herring. This has nothing to do with the size of what's being executed and everything to do with discretion.

      Maybe this is the time for me to get into the "LLM-virus scanner" industry.

    8. hey we did it back in ActiveX days! And JavaFX!

      ... apparently lessons from that age didn't got trained into LLMs and AI developers are too young to remember