cross-posted from: https://sh.itjust.works/post/923025

lemmy.world is a victim of an XSS attack right now and the hacker simply injected a JavaScript redirection into the sidebar.

It appears the Lemmy backend does not escape HTML in the main sidebar. Not sure if this is also true for community sidebars.

32 points
*

This has nothing to do with XSS, it is a simple HTML injection vulnerability, and it can only be exploited by instance admins.

Also Lemmy.world appears to have been running a custom frontend so it’s hard to say how widespread the affects of this are.

permalink
report
reply
9 points

You seem to be following the situation closely. Could you please DM me on Matrix?

permalink
report
parent
reply
1 point
*

Worst case scenario, they can steal your Lemmy session, right?

Which isn’t super bad for a service like Lemmy. This isn’t a social network, so most contact list scams would be useless.

Edit: just read the targets were admins. That IS bad.

permalink
report
parent
reply
3 points

Lemmy isn’t a social network? Seems to be one to me.

permalink
report
parent
reply
3 points

I mean, not in the traditional sense. You don’t have your family and friends as Lemmy contacts and share posts with them. It’s more anonymous.

permalink
report
parent
reply
15 points

It seems to have just gotten to Lemmy.blahaj.zone

permalink
report
reply
12 points

I wonder if there is something the Lemmy.ca admins can do to disable the sidebar or put a workaround in to prevent this.

permalink
report
reply
37 points

At this point I’m monitoring inter-instance communications channels non stop even though I should be in bed. I will be temporarily removing admins that have not responded to my inquiry to confirm if they have 2FA authentication turned on as initial access appears to have been gained due to lack of 2FA.

If there’s anything additinal we can do, we will.

permalink
report
parent
reply
6 points

Good luck, and thanks for all your hard work. I don’t know if you already saw this, but it looks like this might be the vector for the account compromise. If that’s the case, I don’t think 2FA is enough to protect, because it’s exfiltrating the session cookies of someone already logged in. Seems like the precaution is for admins to avoid clicking any suspicious links. I realize the irony of sharing a link about this, but at least it’s to a thread on this instance.

https://lemmy.ca/post/1311411

permalink
report
parent
reply
8 points

I’m copying all links into a brand new incognito mode window for now.

permalink
report
parent
reply
2 points

Introduce minimum password complexity if there’s a config option for it and force admins to reset passwords.

permalink
report
parent
reply
4 points

There’s no minimum complexity but I’ve enforced 2FA for all admins. One admin that did not respond has been temporarily removed precautionarily.

permalink
report
parent
reply
7 points

I mean, if it’s something that’s editable only by admins of the instance, I’m not sure it constitutes a vulnerability, since admins can change the content to whatever they desire by definition.

permalink
report
reply
5 points

Wasn’t clear till further people commented that it was something only and admin could do. So I agree.

permalink
report
parent
reply
6 points

We have yet to confirm if a vulnerability exists in the sidebars that can be set by community mods.

permalink
report
parent
reply
2 points

can you temporally take away the ability for mods to put html or any kinda script into the sidebar, at least for now?

permalink
report
parent
reply
5 points

So, as an average, less-technical, Lemmy user (this is my backup for now).
What can or should I do to stay safe?

permalink
report
reply
5 points

https://lemmy.world/post/1290412?scrollToComments=true

The affected instances are coming back and the vulnerability being mitigated. Apparently no personal data was compromised. So you should be fine.

permalink
report
parent
reply
4 points

Id use an app you trust for now

On a site you have to sanitize your data, on a native app you’d have to go out of your way to render this kind of thing…wefwef/voyager is actually a web page (and they might or might not be sanitizing their inputs), the other top options are probably using libraries to do it, and data sanitation is pretty basic. Literally web dev 101. They’d have to choose a very full-featured rendering library that also entirely ignores security, or they’d have to have rolled their own

At least now I know why my renderer has been so annoying about the warnings the last couple days…

For any devs that read this - this is a great example of why you can’t trust anything coming off a federated network. Type check and sanitize all your inputs, always. We need to get away from trust - this isn’t a trustful situation

Luckily, this was more of a warning than an actual attack - and there will be actual attacks. We have to be defensive - always - every time at every level.

And Flemmy will be that, once I feel good releasing it (2 features left before I’m out of reasons to procrastinate). It’ll be just me, always

permalink
report
parent
reply

Lemmy.ca's Main Community

!main@lemmy.ca

Create post

Welcome to lemmy.ca’s c/main!

Since everyone on lemmy.ca gets subscribed here, this is the place to chat about the goings on at lemmy.ca, support-type items, suggestions, etc.

Announcements can be found at https://lemmy.ca/c/meta

For support related to this instance, use https://lemmy.ca/c/lemmy_ca_support

Community stats

  • 136

    Monthly active users

  • 187

    Posts

  • 2.2K

    Comments