this post was submitted on 10 Jul 2023
883 points (99.3% liked)

Lemmy.World Announcements

30437 readers
5 users here now

This Community is intended for posts about the Lemmy.world server by the admins.

Follow us for server news 🐘

Outages πŸ”₯

https://status.lemmy.world/

For support with issues at Lemmy.world, go to the Lemmy.world Support community.

Support e-mail

Any support requests are best sent to info@lemmy.world e-mail.

Report contact

Donations πŸ’—

If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.

If you can, please use / switch to Ko-Fi, it has the lowest fees for us

Ko-Fi (Donate)

Bunq (Donate)

Open Collective backers and sponsors

Patreon

Join the team

founded 2 years ago
MODERATORS
 

While I was asleep, apparently the site was hacked. Luckily, (big) part of the lemmy.world team is in US, and some early birds in EU also helped mitigate this.

As I am told, this was the issue:

  • There is an vulnerability which was exploited
  • Several people had their JWT cookies leaked, including at least one admin
  • Attackers started changing site settings and posting fake announcements etc

Our mitigations:

  • We removed the vulnerability
  • Deleted all comments and private messages that contained the exploit
  • Rotated JWT secret which invalidated all existing cookies

The vulnerability will be fixed by the Lemmy devs.

Details of the vulnerability are here

Many thanks for all that helped, and sorry for any inconvenience caused!

Update While we believe the admins accounts were what they were after, it could be that other users accounts were compromised. Your cookie could have been 'stolen' and the hacker could have had access to your account, creating posts and comments under your name, and accessing/changing your settings (which shows your e-mail).

For this, you would have had to be using lemmy.world at that time, and load a page that had the vulnerability in it.

(page 2) 50 comments
sorted by: hot top controversial new old
[–] Macaroni_ninja@lemmy.world 7 points 2 years ago

As someone in EU I didn't even realized there was an issue. Well done and great reaction time! Also thank you for the transparency πŸ‘‘

[–] godless@lemmy.world 6 points 2 years ago (2 children)

With the JWT secret rotation, shouldn't everyone be forced to re-login? I'm posting with my existing session without any changes.

load more comments (2 replies)
[–] JohnSaveourSocks@lemmy.world 6 points 2 years ago

Rock on, Rudd.

[–] fikran@thebag.social 5 points 2 years ago (1 children)

Ugh, people should not go after systems trying to give a free service to the internet. It just ruins everything.

[–] Drewfro66@lemmygrad.ml 3 points 2 years ago (1 children)

On the other hand, the "attack" seemed to just be mostly harmless griefing and it's good for these sorts of vulnerabilities to be found early.

[–] Plagiatus@lemmy.world 3 points 2 years ago

Yes, but responsible disclosure would've been even better.

[–] Reliant1087@lemmy.world 5 points 2 years ago

Thank you for taking the time to update this :) Hope everything will be sorted out without people being scared. As a layman, was any user data compromised?

[–] TheFonz@lemmy.world 4 points 2 years ago (1 children)

Seem to have a hard time loging in

load more comments (1 replies)
[–] Magiwarriorx@lemmy.world 4 points 2 years ago (1 children)

Is it possible cookies for other websites were scraped? I was logged in to .world at the time; I have logged out of all accounts, and reset passwords as a precaution, but want to know if I should be on the lookout from this.

[–] sudneo@lemmy.world 5 points 2 years ago

No, in general it's not possible because the code in a page cannot access cookies that are bound to other domains. It is only possible if the "other" site misconfigured its own cookies (which is really not likely for stuff you would care about).

[–] ludw@lemmy.world 4 points 2 years ago (1 children)

A lot of images seems to be gone from posts in /c/pics is this related to the hack or the cleanup after?

[–] Desistance@lemmy.world 3 points 2 years ago

I heard there was some sort of database rollback to an uncompromised snapshot.

[–] alaxitoo@lemmy.world 4 points 2 years ago (2 children)

I found this in my private messages, when an attack was happening I messaged the guy β€œare you ok” and he replied back to me with an image of my own message… I wonder if this was similar to what was done here? Was 8 days ago

[–] ruud@lemmy.world 5 points 2 years ago (1 children)

No that was something else

[–] alaxitoo@lemmy.world 3 points 2 years ago

Thanks for clarifying πŸ™

load more comments (1 replies)
[–] dorumon@lemmy.world 4 points 2 years ago (1 children)

Well that's just great it really is a shame though how some people would actively want to ruin something free like this just because they can.

load more comments (1 replies)
[–] Sam1232188@lemmy.world 3 points 2 years ago

Thank the heavens the meme community stayed safe through this without my daily dose of cybersecurity memes idk how I would function ;)

[–] CaptainProton@lemmy.world 3 points 2 years ago

Occasional cookie deletions I understand, but will sign-ins persist in the future?

[–] Ahmed@lemmy.world 3 points 2 years ago (1 children)

Thanks Ruud for fixing it! Just a reminder guys that If you are using a third party app you need to login again.

load more comments (1 replies)
[–] adamlc@lemmy.world 3 points 2 years ago (1 children)

Thanks all working again. Had to clear my browser cache in order to login again and had to resign in to memmy too.

I guess its early days for lemmy for incidents like this, fingers crossed something like this doesn't happen again :)

[–] sab@kbin.social 3 points 2 years ago

It's a nice reminder that those with the skills but not the bad intentions would be welcome to look through the source code for vulnerabilities and report/patch anything they might find. :)

[–] TheVampireSaga@lemmy.world 3 points 2 years ago* (last edited 2 years ago)

Here's a relevant post that talked about this with @AlmightySnoo@lemmy.world I think is worth looking into for anyone curious what exactly happened.

https://sh.itjust.works/post/923025

please don't visit the legal section of the website or anything confirmed compromised if anything.

[–] Pillarist@lemmy.world 3 points 2 years ago (1 children)

I had an issue of being logged out of my account and could not log back in, after closing and reopening the site, closing browser, etc until I cleared my cookies, then it let me back in. If that helps anyone.

load more comments (1 replies)
[–] MarekKnapek@lemmy.world 3 points 2 years ago (1 children)

So what happened:

  • Someone posted a post.
  • The post contained some instruction to display custom emoji.
  • So far so good.
  • There is a bug in JavaScript (TypeScript) that runs on client's machine (arbitrary code execution?).
  • The attacker leveraged the bug to grab victim's JWT (cookie) when the victim visited the page with that post.
  • The attacker used the grabbed JWTs to log-in as victim (some of them were admins) and do bad stuff on the server.

Am I right?

I'm old-school developer/programmer and it seems that web is peace of sheet. Basic security stuff violated:

  • User provided content (post using custom emojis) caused havoc when processing (doesn't matter if on server or on client). This is lack of sanitization of user-provided-data.
  • JavaScript (TypeScript) has access to cookies (and thus JWT). This should be handled by web browser, not JS. In case of log-in, in HTTPS POST request and in case of response of successful log-in, in HTTPS POST response. Then, in case of requesting web page, again, it should be handled in HTTPS GET request. This is lack of using least permissions as possible, JS should not have access to cookies.
  • How the attacker got those JWTs? JavaScript sent them to him? Web browser sent them to him when requesting resources form his server? This is lack of site isolation, one web page should not have access to other domains, requesting data form them or sending data to them.
  • The attacker logged-in as admin and caused havoc. Again, this should not be possible, admins should have normal level of access to the site, exactly the same as normal users do. Then, if they want to administer something, they should log-in using separate username + password into separate log-in form and display completely different web page, not allowing them to do the actions normal users can do. You know, separate UI/applications for users and for admins.

Am I right? Correct me if I'm wrong.

Again, web is peace of sheet. This would never happen in desktop/server application. Any of the bullet points above would prevent this from happening. Even if the previous bullet point failed to do its job. Am I too naΓ―ve? Maybe.

Marek.

load more comments (1 replies)
[–] padjakkels@lemmy.world 2 points 2 years ago

Thanks for the quick reaction and TRANSPARENCY!!

load more comments
view more: β€Ή prev next β€Ί