Collection of potential security issues in Jellyfin This is a non exhaustive list of potential security issues found in Jellyfin. Some of these might cause controversy. Some of these are design fla…

  • GiuseppeAndTheYeti@midwest.social
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 day ago

    Can someone ELI5 this for me? I have a jellyfin docker stack set up through dockstarter and managed through portainer. I also own a domain that uses cloudflare to access my Jellyfin server. Since everything is set up through docker, the containers volumes are globally set to only have access to my media storage. Assuming that my setup is insecure, wouldn’t that just mean that “hackers” would only be able to stream free media from my server?

    • Saik0@lemmy.saik0.com
      link
      fedilink
      English
      arrow-up
      20
      ·
      edit-2
      1 day ago

      If you use normalized paths/file names (through *Arr stacks or docker mounts or otherwise common tools), then the hash that jellyfin sets up when it imports that media can be guessable. If someone was to go and precompile a list of hashes for content that they’re looking for at common paths that people store their files at, they can ask your server for those hashes, and if their list is sufficiently large enough to include the path that you used, your jellyfin instance WILL RESPOND WITHOUT AUTHENTICATION.

      I’ve been using this example because it shows how silly this is.

      In the context of Sony’s top 1000 movies, they can pre-compile the top 100 likely paths for the file (/movies, /mnt/movies, etc) then run the 100000 hash check through scripts against your instance. How long does it take to let a crawler collect http statuses on 100000 page loads? Now put that to a bot that gets jellyfin instances from a tool like shodan and add more hashes. If you flag, now onus is on you to prove you have license for content and they would have a case that you distributing (albeit weak) since your server was open to the public. This is child’s play level abuse-able. Risking that something easy like this isn’t being abused by Sony and others (you know… willing to install a rootkit on your computer types…) is a very silly stance to take.

      The answer to some of this is that you can just hide the content on a more complicated and less likely to guess path. That will sufficiently change the MD5 hashes enough that you should be more or less unguessable… Instead of using /mnt/media/movies (or /media/movies, or /movies/, etc…) make the path /mnt/k9RKiQvUwLVCjSqhb2gWTwstgKuDJx59S3J35eFzW2dgSSp84EG7PPAhf2MwCySt/media/movies. (obviously don’t use this one… use a random generator. Make your own.)

      The real answer should be that Jellyfin requires that all those endpoint need authorization/login. But their answer is “We don’t want to break backwards compatibility. So we won’t.” Which is a bit silly of an answer. Those who use the default installation and organize their content with *arr suites (or with default docker settings/guide settings), are most likely to have guessable MD5 hashes and are most at risk.

      Edit: Oh and the other point… if the “response” against this is “well that would take too long, or be too hard. You’d need a lot of money to find all these instances and test them…”. We’re talking about the likes of Sony… The ones that installed rootkits on peoples computers for daring to put a CD into a CD-ROM drive. They’re litigious folk, and will bury you in paper and sue you to oblivion. It’s not a lot of machine time to test a single server. Setting up a couple dozen scanners and just letting it go to find content on it’s own isn’t that bad from a computational standpoint.

      And another argument I’ve seen here… “Well if they hack your server then that’s illegal too, can’t make a lawsuit out of that”… Except this is normal web operations. Bots and site scanners aren’t illegal. Nor do they break any authentication mechanism (which is illegal) to do this. Specifically putting this behind authentication would make you correct. But Jellyfin didn’t do that (yet). So guess what. It’s perfectly possible for them to setup a few scanners across a few servers and do this 100% legally.

      Security through obscurity isn’t security.

      Edit2: Clarification on not using the path I just gave… make up your own random gibberish.

      • GiuseppeAndTheYeti@midwest.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        I think I understand now. Thank you! I will be changing my paths then. It’s kind of a moot point since I’ll change my paths anyway, but for the sake of my own curiosity, i have a follow up question. Feel free to disregard it if you don’t feel like taking the time to answer.

        Hypothetically, my docker setup only allows jellyfin to see /mnt/user as /storage. So jellyfin would report the path to Morbius as being:

        /storage/hdd1/media/movies/Morbius_all_morbed_up.mkv

        when in all actuality it would be:

        /mnt/user/hdd1/media/movies/Morbius_all_morbed_up.mkv

        My intuition tells me that the file path that jellyfin “sees” would be the security risk. So “/storage/hdd1/…” Is that correct?

        • Saik0@lemmy.saik0.com
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 day ago

          My intuition tells me that the file path that jellyfin “sees” would be the security risk.

          Your intuition is correct. JF will generate the MD5 hash based on the path that it’s accessing with. So if it’s normally a unique path then you mount it into the docker container as /movies/ or /mnt/movies or what have you… Then you lost the uniqueness, all that’s seen is the internal docker path. This is why I also lumped “using docker” into the party side by side with “using *arr stack”. Most people will find a compose file and just modify the left side of the volume declaration to point at their media. And most dockers are going to have simple internal mounts in their example compose files.

          Both Arr and Docker will end up pushing people to standardize the path, then the filename. Using both together compounds the issue and they tend to standardize different parts of the path.

    • jagged_circle@feddit.nl
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      1 day ago

      Or you become part of a bonnet and attack your own government’s military. Then you get some very angry knocks on your door and a black back over your face.

      And, if you’re brown, probably some electrodes on your genitals until you sign a written confession.

      • KairuByte@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        5
        ·
        22 hours ago

        This isn’t happening. The government understand what a botnet is, and if tens or hundreds of thousands of compromised machines are involved, they aren’t coming after you for being part of the attack.

        They might send you mail telling you to take care of your shit though.

        • jagged_circle@feddit.nl
          link
          fedilink
          English
          arrow-up
          3
          ·
          21 hours ago

          Some countries have recently been snatching brown people off the streets for any reason. And firing all the smart folks who might know what a bonnet is

          Be reasonable, we’re talking about States here.