FYI!!! In case you start getting re-directed to porn sites.

Maybe the admin got hacked?


edit: lemmy.blahaj.zone has also been hacked. beehaw.org is also down, possibly intentionally by their admins until the issue is fixed.

Post discussing the point of vulnerability: https://lemmy.ml/post/1896249

Github Issue created here: https://github.com/LemmyNet/lemmy-ui/issues/1895

96 points

Yea, I switched to this alt. It appears to be one of the assistant admins accts. Seems like an old fashioned anon prank, to me, they’re mainly just trying to make stuff offensive and redirect people to lemonparty.

So, y’know, old school.

I don’t know if any data is actually in danger, but I doubt it. I don’t see why assistant admins would need access to it.

permalink
report
reply
50 points

All the bean memes are in danger! On a serious note, old-skool or not, it’s a huge loss of trust in something the community-at-large is excited to see replace reddit.

permalink
report
parent
reply
70 points

Par for the course. This system will never be immune to things like that. That’s part of what happens when you decentralize your power. Instead of a single target that can be made highly secure, you have a distributed array of targets.

People should certainly be engaging on here with full awareness of the reality of the Fediverse, not expecting reddit 2.0. We never will be able to offer exactly what they did. We’ll be naturally worse in some areas and naturally better in others.

permalink
report
parent
reply
22 points

This is why I’m glad I made redundant accounts on multiple instances. When there are problems on lemmy.world, I can just hop on over to another. That’s never been an option with Reddit.

Now if there was only a way to export or sync user settings like subscriptions, it would be perfect.

permalink
report
parent
reply
18 points

That’s fair. I shouldn’t have said “replace reddit.”

permalink
report
parent
reply
27 points

idk, im surprised it took this long. there’s a huge variety of admin teams with varying degrees of security awareness and it’s been over a month since the first big influx of users started. it’ll happen again too and probably not before too long

permalink
report
parent
reply
9 points

I didn’t want to say it, because I wanted to believe :(

permalink
report
parent
reply
8 points

In the 3 years Hexbear has been around it has been attacked A LOT because obviously far right chuds have an interest in messing with leftists but has not to my knowledge had an admin breach. At one point image embeds were completely disabled because they were handing over data they shouldn’t though and risked exposing people to doxxing.

permalink
report
parent
reply
18 points

On the other hand, look at where we are. This is proof that one hack can’t take down Lemmy.

permalink
report
parent
reply
11 points

True that. If you look at posts on lemmy.world though, it’s clear their users (which is like 50% of Lemmy) have zero clue they’re defederated ATM, and probably many that don’t know it’s compromised.

permalink
report
parent
reply
5 points

If there is a vulnerability in the software, it’s entirely possible for a single attack to take everyone down. All the instances are known and easily discovered.

permalink
report
parent
reply
9 points

i did switch from reddit to lemmy.world because i expected it to be a safe alternative that would atleast pay a lot of attention to security. so yes, the trust in security is broken a lot with this. especially since it happend so soon after so many people joined. i already think about maybe making my own instance to keep my account safe in the future.

permalink
report
parent
reply
32 points
*

My concern is that configuring the site to automatically redirect users sounds like they have pretty large control over the site - the kind of control that I would assume is usually limited to users with root access on the server.

Obviously hope nothing of value is lost and that there is a proper off-site backup of the content.

Edit: See Max-P’s comment, it looks like the site redirection was accomplished in a way that IMO suggests they do NOT have full control over the site. We’ll obviously have to wait for the full debrief from the admins.

permalink
report
parent
reply
5 points

If it was just DNS that doesn’t mean too much. If it was just DNS it seems to be back up. It’s like changing the number in a phone book.

permalink
report
parent
reply
7 points

It was a JavaScript injection to the site’s sidebar and top announcement section

permalink
report
parent
reply
4 points

Yeah the “redirect somewhere else” attack definitely doesn’t necessarily require any particular control of the site. Usually it’s noticing that you can trick some text into being run as Javascript, instead of interpreted as text… And then you just stick in a cheeky little <notarealscript>window.location = "https://www.badsite.horse"</notarealscript> into that spot.

Then every time that comment, username, (in this case apparently) custom emoji, etc. gets loaded, whoops, the code runs and off you go!

So no control of the site is required at all.

permalink
report
parent
reply
9 points

I don’t see why assistant admins would need access to it.

because it’s easier than figuring out what permissions they actually need

permalink
report
parent
reply
9 points

Lemmy permission system is very limited, it’s a boolean for admin

permalink
report
parent
reply
7 points

this is what happens when socialists design hierarchies

permalink
report
parent
reply
6 points

probably even the top admin don’t, it’s gonna be encrypted, so even they don’t know your password(except if they changed the code to store it in .txt) but always use differnt password in the internet

permalink
report
parent
reply
3 points

Nothing is encrypted except a user’s password. If you have access to the database you can replace that with a known password hash.

permalink
report
parent
reply
82 points

Main instance hacked? Time to use an alt!

The first hack is a rite of passage for every site that gets big. It means we’ve been recognized!

Luckily, this seems to be a standard troll (with some tech knowledge) - they’ve defaced the site and put redirects to shock sites, rather than injecting actual malware or quietly collecting everyone’s passwords. This could be much worse.

permalink
report
reply
80 points

I tried to reproduce the exploit on my own instance and it appears that the official Docker for 0.18.1 is not vulnerable to it.

It appears that the malicious code was injected as an onload property in the markdown for taglines. I tried to reproduce in taglines, instance info, in a post with no luck: it always gets escaped properly in the <img alt="exploit here"> property as HTML entity.

lemmy.world appears to be running a git commit that is not public.

permalink
report
reply
41 points

I actually consider it good news that the redirection is happening this way (something that can be done just by having the lemmy credentials of an admin) vs something indicating they have access to the server itself.

permalink
report
parent
reply
31 points

Yep, same. It was also the most likely scenario.

It looks like it was an individual admin getting hacked. Not good but not the worst. Most fallout will probably be whether their security practices were sufficient for an admin and whether lemmy has good enough contingencies for this sort of thing. Lemmy’s 2FA is probably a hot issue now though.

permalink
report
parent
reply
18 points

The JWT are likely a hot issue, already some Issues on GitHub about them not being revoked properly.

permalink
report
parent
reply
10 points

The hacked MichelleG account actually commented that it did not have MFA enabled lol. This was on the lemmy.world shitpost community, on one of the posts making memes about the situation. Hilarious that the hacker decided to share that.

permalink
report
parent
reply
3 points

OK good to know that the server itself is unlikely to be compromised. I’ll be changing passwords to all my accounts once this blows over.

permalink
report
parent
reply
16 points

It does look like most instances will be vulnerable judging by the fix. It’s not custom code; it’s in lemmy-ui proper.

https://github.com/LemmyNet/lemmy-ui/pull/1897/files

permalink
report
parent
reply
11 points

It seems the database and the server itself is not compromised? Just an admin account that used to post a markdown XSS exploit?

permalink
report
parent
reply
19 points

Pretty much, and it’s not even XSS (it’s not cross-site), it’s just plain basic HTML injection breaking out of Markdown. At least as far as I was able to find.

permalink
report
parent
reply
4 points

XSS is a blanket term for vulnerabilities that allows attackers to inject client-side scripts. Looks like someone is already identified and submitted a pull request that contain a fix: https://github.com/LemmyNet/lemmy-ui/pull/1897/files

permalink
report
parent
reply
8 points

Last I saw, they were on 0.18.1, unless a very recent update was installed. Do you happen to have a full list of domains they were redirecting to? Just want to be sure they were only going to “harmless” offensive sites, and not something worse.

permalink
report
parent
reply
14 points

Only lemonparty (which then redirects to chaturbate) and the pedo image hosted in the pictrs of lemmy.world itself. I saw no evidence of anything else, as people said, it’s a pretty oldschool type of hack to disturb not spread malware.

But I didn’t dig that much further than that, and it’s only a snapshot of what I gathered before it got fixed. I Ctrl+F “lemonparty” in view source and pasted the JSON in VScode and that’s about it. Didn’t dig much deeper if that was just a red herring.

permalink
report
parent
reply
11 points

Thanks for digging in and sharing your findings!

permalink
report
parent
reply
14 points

As for the version, my instance reports it as

0.18.1-2-ga6cc12afe

So it seems to be using some extra patches, but I can’t find that commit on GitHub which indicates it might not be public, or cherry-picked locally.

So with this in mind, either it’s just innocent performance patches, or someone potentially also introduced the markdown vulnerability.

Although it’s also entirely possible I suck and wasn’t able to reproduce it correctly/had wrong quoting or something. Hopefully the devs can shine some light in the details.

permalink
report
parent
reply
7 points

Max-P doing the Lord’s work

permalink
report
parent
reply
64 points

How did it happen and what does this mean for me as a user of lemmy.ml who also follows people on lemmy.world?

permalink
report
reply
78 points

One of the admin accounts appears to have been compromised. The owner/other admins appear to be aware now because that account had its admin access revoked and offending posts are being removed.

Definitely opens up a big question about the security of Lemmy instances that I am sure will be discussed over the next few days.

permalink
report
parent
reply
33 points

I wouldn’t assume reasons why or that it’s fixed until that consensus has been more widely reached.

permalink
report
parent
reply
7 points
*

More time will definitely be needed. I’m glad they caught it and acted quickly enough to prevent more vandalism from occurring, but until we know how the account was compromised and what else they may have gotten in the process, it’s still a situation to keep an eye on.

permalink
report
parent
reply
18 points

Definitely opens up a big question about the security of Lemmy instances that I am sure will be discussed over the next few days.

They added 2FA login to lemmy in one of the newer updates. Probably pretty pertinent for any admins to use it…

permalink
report
parent
reply
13 points
*

It’s buggy and missing some key checks to make sure it’s working when you set it up.

Real risk of locking yourself out of your account.

permalink
report
parent
reply
3 points

Also I believe this was achieved through cookie stealing, which 2FA would not have helped

permalink
report
parent
reply
1 point

Too bad it doesn’t work with several 2FA apps and right now…

permalink
report
parent
reply
8 points

Thanks for the context

permalink
report
parent
reply
6 points

They really need to improve their 2fa implementation

permalink
report
parent
reply
25 points

Not a whole lot - you might see some spam being federated from lemmy.world but I’d expect the lemmy.ml and lemmy.world admins will fix it, and them clean it up.

That’s probably good stress test to figure out how to handle that.

permalink
report
parent
reply
7 points

Thanks for the response very helpful.

permalink
report
parent
reply
56 points

God damn, spez-funded hacker groups already is trying to disrupt the resistance.

permalink
report
reply
18 points

Fuck spez

permalink
report
parent
reply
8 points

This is going to turn into some obligatory response.

“Thank you everyone for coming together to discuss the planned future for the news community.” Everyone: “Fuck spez.”

permalink
report
parent
reply

Fediverse

!fediverse@lemmy.ml

Create post

A community dedicated to fediverse news and discussion.

Fediverse is a portmanteau of “federation” and “universe”.

Getting started on Fediverse;

Community stats

  • 359

    Monthly active users

  • 806

    Posts

  • 12K

    Comments