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

Horizontal Privilege scalation - Download certificates without privs #35

Closed
xkill opened this issue Nov 23, 2017 · 1 comment
Closed

Comments

@xkill
Copy link

xkill commented Nov 23, 2017

Hi,
If you create staff users on Django. Even if they don't have enough privileges to access to the CAs, it's possible to download the CA Certs in PEM format, for example through this URL:

  • /admin/django_ca/certificateauthority/1/download/?format=PEM

Steps to replicate

  1. Create a django project and add django-ca.
  2. Add django.admin and synchronize the database.
  3. Create the initial CA and superuser
  4. Login onto the admin portal as admin
  5. Create a user and set as "staff"
  6. Login with this user. It won't have enough privs to access to anything by default. But...
  7. Open the following URL:
  • /admin/django_ca/certificateauthority/1/download/?format=PEM
    The Certificate of the CA will be downloaded.
@mathiasertl
Copy link
Owner

Thanks for the report, I will look into this!

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