Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-admin endpoints allow un-authenticated access #10

Open
akochnev opened this issue Aug 18, 2020 · 0 comments
Open

Non-admin endpoints allow un-authenticated access #10

akochnev opened this issue Aug 18, 2020 · 0 comments
Assignees

Comments

@akochnev
Copy link
Collaborator

akochnev commented Aug 18, 2020

This is a security issue in that it allows anyone to hit that API endpoint and retrieve the emails/names of the registered users. Repro steps:

  1. From a command line (guaranteed not to send any additional information like a cookie or a header), call the endpoint

curl -X GET "http://localhost:8000/api/user/1/" -H "accept: application/json"

It responds with :
{"id":1,"email":"kalin.kochnev@gmail.com","first_name":"Kalin","last_name":"Kochnev","is_anon":false}

I can do this for all IDs in the system and pull out the registered emails and names

I do see a reason to provide some of this information to authenticated users (e.g. as a user browsing the site, I might want to be able to see the names or registered contact info for a specific user), but this seems like it shouldn't be available to unauthenticated users.

I observed this on a few different endpoints:

  • /api/user/{userId}
  • /api/district/

There are probably others as well.

@akochnev akochnev changed the title User (/api/user/{userId}) endpoint allows un-authenticated access Non-admin endpoints allow un-authenticated access Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants