Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Avatar endpoint accessible without authentication

Open scruplelesswizard opened this issue 10 years ago • 16 comments

Your Rocket.Chat version: 0.33.0

The /avatar endpoint is accessible without being authentication.

This creates two security related issues:

  1. As user avatars are stored by using the username as the file name, this provides an attacker with an easily exploitable method of getting valid user names.
  2. Private information (the avatar photos) is accessible to unauthenticated parties.

Two proposed mitigations:

  1. Store user avatars using a hash of the username as the filename.
  2. Require an authenticated user before allowing access to the /avatars endpoint or return an HTTP 401

scruplelesswizard avatar Jun 07 '16 15:06 scruplelesswizard

This issue was not fixed on #6788 and was closed by mistake

MartinSchoeler avatar Jun 02 '17 15:06 MartinSchoeler

Can we increase the priority on this issue? It can be a pretty abusable security issue.

Lemmmy avatar Aug 08 '17 14:08 Lemmmy

@Lemmmy not sure about that, but you can always put a bounty on it. https://www.bountysource.com/issues/34942815-avatar-endpoint-accessible-without-authentication

jgtoriginal avatar Aug 08 '17 14:08 jgtoriginal

Good call, thank you.

Lemmmy avatar Aug 08 '17 14:08 Lemmmy

Anything new on this?

localguru avatar Aug 19 '17 00:08 localguru

+1 !

amaranto avatar Sep 06 '17 16:09 amaranto

+1 !

cjpabloL avatar Sep 07 '17 00:09 cjpabloL

privacy nightmare...

bbrauns avatar Oct 19 '17 11:10 bbrauns

Still in 0.58.4 and 0.59.0

localguru avatar Oct 19 '17 11:10 localguru

+1!

jthomae1 avatar Oct 19 '17 13:10 jthomae1

+1!

javiergoni avatar Jul 17 '18 17:07 javiergoni

Just wanted to note that we dropped Rocket Chat about a month after I posted this due to all the security issues. We even posted a patch for this issue which wasn't accepted as it might break integrations. Two years later, this still is an issue... Rocket Chat showed a lot of promise, but being insecure by default and refusing to correct the errors means that Rocket Chat isn't a real option, especially not for any European entity since GDPR has come in to effect.

scruplelesswizard avatar Jul 18 '18 08:07 scruplelesswizard

Just wanted to note that we dropped Rocket Chat about a month after I posted this...

what are you using instead?

ashishbhate avatar Jul 18 '18 08:07 ashishbhate

@chaosaffe we're sorry to hear that you dropped Rocket.Chat. I don't see how this affects GDPR, can you please explain? We've done other important improvements to be GDPR compliant (which you can see here https://github.com/RocketChat/Rocket.Chat/issues/9769), but we might have missed this one.

Also as you may noticed there is a opened PR https://github.com/RocketChat/Rocket.Chat/pull/9749 waiting for changes to be able to be merged. It's now prioritized to be merged next month, so I'll make sure the changes are made until there.

sampaiodiego avatar Jul 18 '18 11:07 sampaiodiego

@sampaiodiego please reopen as this is still an issue in 0.69.2 and we don't want to forget it ;)

localguru avatar Sep 24 '18 12:09 localguru

@localguru there is now an option under Accounts > Avatar that you can block unauthenticated access to avatars:

image

sampaiodiego avatar Sep 24 '18 12:09 sampaiodiego