Hi all,

If you’re just now signing in for the first time in 12+ hours, you may just now be finding out that Lemmy World and other instances where hijacked. The hijackers had the full abilities of hijacked user, mod, and admin accounts. At this time, I am only aware of instance defacing and URL redirections to have been done by the hijackers.

If you were not forced to sign back in this morning, contact your instance admin to verify mitigations were completed on your instance.

How?

This occurred due to an XSS attack in the recently added custom emojis. Instance admins should follow the issue tracker on the LemmyNet GitHub, as well as the Matrix Chat. Post-Incident Activity is still on-going.

Currently, it is likely that just your session cookie was stolen, with instance admins being targeted specifically by checking for navAdmin, an HTML element only instance admins had. I do not believe this to affect users across instances, but I have yet to confirm this.

What happens next?

As I am not the developers or affected instance admins, I cannot make any guarantees. However, here is what you’ll likely see:

  1. Post Incident investigation continues. This will include inspecting code, posts, websites, and more used by the hijackers. An official incident writeup may occur. You should expect the following from that report:
  • Exactly what happened, when.
  • The incident response that occurred from instance admins
  • Information that might have helped resolve the issue sooner
  • Any issues that prevented successful resolution
  • What should have been done differently by admins
  • What should be improved by developers
  • What can be used to identify the next attack
  • What tools are needed to identify that information
  1. A CVE is created. This is an official alert of the issue, and notifies security experts (and enthusiasts), even those not using lemmy, about the issue.

  2. A code security audit is done. This will likely just be casual reviews by technical lemmy users. However, I will be reaching out to the Mozilla Foundation and Cure53 as they recently did an audit of Mastodon. If there is interest in an external audit of lemmy and the costs are affordable, I’ll look into crowdfunding this cost.

  • Samæ@lemmy.menf.in
    link
    fedilink
    English
    arrow-up
    24
    arrow-down
    1
    ·
    1 year ago

    Good reminder that: small instances = small impact. Both true for the positive and the negative.

    • Notorious@lemm.ee
      link
      fedilink
      English
      arrow-up
      10
      ·
      1 year ago

      Not sure that’s entirely true. Thankfully this attack vector required custom emojis, so it was limited to those specific Lemmy instances. Other attack vectors we may not be so lucky and it could spread through federation.

  • monerobull@monero.town
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    1
    ·
    1 year ago

    Good thing we don’t have custom emojis on monero.town and the admin account isn’t used for things outside of the local community :D

  • 0x4E4F@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    74
    arrow-down
    2
    ·
    1 year ago

    If there is interest in an external audit of lemmy and the costs are affordable, I’ll look into crowdfunding this cost.

    It could get VERY, VERY expensive… depends on code complexity.

  • redcalcium@c.calciumlabs.com
    link
    fedilink
    English
    arrow-up
    200
    ·
    edit-2
    1 year ago

    This incident made me realize not to use an admin account for my primary lemmy account in my personal instance. I setup another account for instance admin purpose (with 2FA enabled) and keep it logged out, then remove my primary account from the instance admin list.

    • BarterClub@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Yup. Basics of running a server for anything. Never use your admin account and make a default backup with 2 factor.

    • Crackhappy@lemmy.world
      link
      fedilink
      English
      arrow-up
      17
      ·
      1 year ago

      I work with 2 factor, Oath, SAML, etc. all the time for work, and for the life of me I can’t get it working properly with Lemmy.

      • Notorious@lemm.ee
        link
        fedilink
        English
        arrow-up
        21
        ·
        1 year ago

        Lemmy decided to go with SHA256 for TOTP seed. This is a very odd move since many 2FA apps don’t support SHA256. I actually had to write a quick python script to spit out my 2FA code since Bitwarden doesn’t support it. Hopefully either Lemmy will change to SHA-1 or Bitwarden will start to support SHA256 seeds.

          • subtext@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            Doesn’t matter too too much for a TOTP though. It just needs to be pseudorandom enough for a relatively difficult to guess 6 digit (or longer) code that changes every 30 seconds. Much more likely for someone to get phished for their TOTP than for someone to reverse engineer someone’s TOTP seed. Plus how would that even happen? The attacker would need to have the device and / or track the user’s 6 digit codes for quite a while at which point the game’s already up.

          • Trapping5341@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            wait wait wait. how did you get lemmy 2FA into bitwarden. I can only get it to set up in authy or google auth

            • redcalcium@c.calciumlabs.com
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 year ago

              You’ll need to either subscribe to bitwarden premium ($10 / year), or deploy vaultwarden in your own server and have your bitwarden extension/app use that vaultwarden server instead of the official server.

              • Trapping5341@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                Yeah I have premium and every account I have that offers 2fa is set up but Lemmy will only let me set it up in authy or Google auth. It won’t give bitwarden as an option or give me the code to manually add it to bitwarden.

                • redcalcium@c.calciumlabs.com
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  1 year ago

                  Just right click at the 2fa button and select “copy link”, then paste the link into bitwarden TOTP field. The link you copied should already be in the format otpauth://totp/xxxx which will be recognized by bitwarden.

          • subtext@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 year ago

            Bitwarden definitely works with SHA256 and even SHA512, I believe. And with codes longer than 6 digits also. Oh and even Steam codes if you really want.

      • redcalcium@c.calciumlabs.com
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 year ago

        I use bitwarden, so it’s pretty simple: just copy the link from the 2fa button in Lemmy into the TOTP field in your account editor in bitwarden, and it’ll automatically recognize the format.

    • Renacles@lemmy.world
      link
      fedilink
      English
      arrow-up
      76
      ·
      1 year ago

      This is a good mindset in general, when working in AWS you are not supposed to use your root account unless it’s absolutely necessary even if you are the only user. Hosting a Lemmy instance should be no different.

      • kakes@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        11
        ·
        1 year ago

        Yeah, even in Windows or what-have-you, you should always keep your admin account separate from your daily driver account for exactly this reason.

      • Trainguyrom@reddthat.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        I just setup a VPS for a Minecraft server for some friends and did exactly that. I was under a bit of a time crunch, but still took the time to think through those challenges in access for everything. Created an unprivileged user to run the server as, created a seperate unprivileged user for another service. Disabled password-based SSH login, etc.

        I should probably setup a dedicated non-root admin account for administrative functions but that’s a problem for after work

      • Mantiz_Shrimp@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 year ago

        Timception you should contact the admin for your lemmy server. If you didn’t need to log back in, your server likely was not fixed. This means someone could hack it and steal the session cookies to impersonate server members.

        • Timception@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          I was able to scroll through content, but had to relogin to upvote. However, today I was forced to re-login since I entered the Memmy app. So I guess, all good? Thx for the tips.

        • TheSaneWriter@lemm.ee
          link
          fedilink
          English
          arrow-up
          5
          ·
          1 year ago

          It could also be that they never implemented custom emoticons, which are what caused the security issue. Even still, I would recommend confirming with your server admin.

  • ZuckerbergIsCancer@lemmy.ml
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    95
    ·
    1 year ago

    Friendly remind that Lemmy.world is considering federating with Meta while Lemmy.ml will not.

    I would strongly suggesting ditching Lemmy.world for Lemmy.ml before they can even get started with that stupidity.

    • simple@lemmy.world
      link
      fedilink
      English
      arrow-up
      59
      arrow-down
      3
      ·
      1 year ago

      Dumb take. Lemmy.world devs simply said it’s not likely Threads will federate with Lemmy anytime soon anyways, and they’ll make a decision when there is actually a decision to be made.

        • simple@lemmy.world
          link
          fedilink
          English
          arrow-up
          41
          arrow-down
          3
          ·
          1 year ago

          I’ve made many comments saying why we should defederate with Threads but I still agree with the admins that there’s no point in doing a knee-jerk reaction on a threat that

          A) won’t happen until at least a few months later

          B) likely won’t federate with Lemmy anyways

          C) isn’t actually a threat to Lemmy, but could pose a threat to microblogging websites like Mastodon

          So yeah, waiting and seeing isn’t stupid.

          • ZuckerbergIsCancer@lemmy.ml
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            44
            ·
            1 year ago

            “Wait and see” is fine.

            Federating in the meantime is not.

            Stop trying to dance around the heart of the issue.

            • simple@lemmy.world
              link
              fedilink
              English
              arrow-up
              36
              arrow-down
              1
              ·
              1 year ago

              Federating in the meantime is not.

              Dude, Threads isn’t federating with anything right now. That’s the point, we’re not federated so there’s no reason to make a decision on something that won’t happen yet.

                • TheInsane42@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  7
                  ·
                  1 year ago

                  They haven’t made a decision, as it’s no issue as there is no federation to threads and won’t be for the forseeable future.

                  Making a fuss about it now is as usefull as making a fuss over the sun dying in several million years.

                • ElectroNeutrino@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  17
                  ·
                  1 year ago

                  https://lemmy.world/post/1274909

                  Conclusion:

                  From the points discussed above, the possible lack of moderation alone justifies considering defederation from Threads. However, it remains to be seen how Meta will handle moderation on such a large scale. Additionally, the inability of individuals to block an instance means we have to do what is best for the community.

                  Where does it say in the admin post that they are default federating with Threads?

    • RCMaehl [Any]@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      1
      ·
      1 year ago

      While this is definitely a discussion to be had (I’ve created a few accounts on different instances). Posting that here is just adding onto the drama.

      • ZuckerbergIsCancer@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        27
        ·
        1 year ago

        Not sure how you view it that way.

        It’s just good advice for people who want to stay the hell away from a company like Meta that was willing to hand over private data to assist authorities in arresting a woman for exercising her reproductive rights.

        Really not thrilled with the Lemmy.world users trying to downplay just how ridiculous the idea of federating with Meta is.

        Is it possible to block .world entirely yet?

        • Mereo@lemmy.ca
          link
          fedilink
          English
          arrow-up
          13
          ·
          1 year ago

          Look, Lemmy.world takes the rational way where it says there is no use to panic. Let’s be rational and analyze the situation rationally and go from there.

          I support Lemmy.world. Let’s see how the situation develops and let’s make a rational decision with cool heads.

    • CodeMonkeyDance@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      3
      ·
      1 year ago

      I ran screaming from FB. Like, hair on fire running. That place is a roiling pot of piss. I would 100% not interact with ANY instance that has federated with them. They are a cancer that will infect this next big thing

    • mrmanager@lemmy.today
      link
      fedilink
      English
      arrow-up
      24
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Maybe ditching Lemmy.world makes sense but signing up on Lemmy.ml doesn’t. Pick smaller instances and spread out guys. That’s the entire point. :)

      It’s a bit funny that 100k users signed up on the same instance… :)

    • notreally@lemm.ee
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      10
      ·
      1 year ago

      yeah, Lemmy is instilling a ton of confidence when instances disappear overnight (vlemmy) and others get all their data hacked and close off all communication with the largest user base that will exist in the fediverse. Y’all really about to make people go back to Reddit

    • RxBrad@lemmy.world
      link
      fedilink
      English
      arrow-up
      19
      arrow-down
      2
      ·
      1 year ago

      “Ma’am… this is an Arby’s.”

      Threads is not a Lemmy issue. Mastodon is where the concern lies.

  • kep@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    2
    ·
    1 year ago

    This post is weird. You’re typing like you’re in charge of things, but you’re apparently not.

    It’s one thing to show some initiative, but you’re literally demanding a full report like the Lemmy devs work for you. You sound like someone who does this kind of thing for a living and felt the need to flex. Because otherwise, what the hell are you even doing?

    Setting neurotically-specific demands for the developers makes sense if you represent a big instance or something, but you’re literally just a dude. You could have framed this entire post in a different way and gotten away with it. Right now, it’s creepy to anybody who actually reads the entire thing.

    • RCMaehl [Any]@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      1 year ago

      These aren’t demands, but I can definitely see how they can come off that way. These are industry standard post cybersecurity incident review questions by defined by NIST (NIST SP 800-61 Rev 2 Section 3.4.1) slightly rephrased.

  • theangryseal@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    I haven’t been able to change my password on Lemmy.world. When I click save, nothing happens and the password doesn’t update.

    That’s probably something someone wants to look into.

  • CifrareVerba@lemmy.world
    link
    fedilink
    English
    arrow-up
    46
    ·
    edit-2
    1 year ago

    The way the hack was utilized is honest very creative and interesting; either way, if all big communities could crowdsource money for security audits, I believe that it could help prevent something like this in the future.

    Edit for clarification: I am NOT talking about how the exploit itself was created or achieved, I am talking about the act of having the power they did and just doing shock crap.

    • graphite@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      The way the hack was utilized is honest very creative and interesting;

      That’s often the case with exploits.

      • CifrareVerba@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        1 year ago

        Your not wrong, however, most of the time when these events happen it’s meant for something more insidious than lemon party.

        • graphite@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          edit-2
          1 year ago

          Sure. Not sure how that’s relevant though?

          In general, finding an exploit requires looking for little tiny details that could exist in, really, any area of a given system; looking for a bug, and then exploiting that bug by understanding how input data can be used to create a deterministic chain of events.

          This almost always requires thinking outside of the box.

          There are people who are also paid to find these before malicious actors do.

          It’s always going to be creative in some way, at least in the beginning.

          It’s like when people first discover Quake’s fast inverse square root. Sure, the first time around it seems genius. In reality, code like that is actually everywhere, and there is a somewhat trivial aspect to optimizing those kinds of problems.

    • nikt@lemmy.ca
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      3
      ·
      1 year ago

      HTML injection / XSS vulnerabilities tend to be a sign of amateur hour to be honest. Made me a bit worried that I’m hitching my reddit escape wagon to the wrong technology. But sounds like this was due to instance-specific customizations rather than the core Lemmy tech, so hopefully we’re still on solid ground.

  • m3t00🌎@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    had a login/not logged in loop for a while yesterday. reset lemmy.world site data seems to have fixed

  • VeganPizza69 Ⓥ@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Currently, it is likely that just your session cookie was stolen, with instance admins being targeted specifically by checking for navAdmin, an HTML element only instance admins had. I do not believe this to affect users across instances, but I have yet to confirm this.

    Probably because the hackers used some http request to get the data and didn’t want to wade through thousands of rows of JWT strings.

    • RCMaehl [Any]@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      1 year ago

      To add context to this. What I’ve been told is that a community running on a lemmy fork with 5 digit users had used this code for a while and backported(?) the code upstream when they federated back. I guessing there was an assumption of safety as they had been using the custom emojis code for quite a while without it being exploited.

    • FightMilk@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      11
      ·
      1 year ago

      Yeah it’ll be hard to regain my trust after this one. I mean I’ll still use Lemmy but for now I’ll assume mine or any other account could be hacked at any time and act accordingly. This is a really amateur mistake even by FOSS standards.

  • P03 Locke@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    28
    ·
    1 year ago

    A code security audit is done. This will likely just be casual reviews by technical lemmy users. However, I will be reaching out to the Mozilla Foundation and Cure53 as they recently did an audit of Mastodon. If there is interest in an external audit of lemmy and the costs are affordable, I’ll look into crowdfunding this cost.

    You don’t need to pay money. You just need to listen to the recommendations already made by free tools.

    Here, fix this shit first and then worry about a professional audit later.

  • Uriel-238@lemmy.fmhy.ml
    link
    fedilink
    English
    arrow-up
    101
    arrow-down
    2
    ·
    1 year ago

    Having recently migrated from Reddit (and kept up with commercial social media hacks) I’m used to Nothing To See Here! We totally didn’t store your personal information in plaintext for hackers to snatch. Oh and maybe please change your passwords. All Part Of The Show!

    So, by comparison, the response here is downright heartwarming.

    • Alkider@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      1 year ago

      Whoops! Reddit spazzed out and couldn’t send your post because it hurts spez’s feelings!