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

Insufficient Authentication in PIWIK‏ #8908

Closed
tusharparab opened this issue Oct 4, 2015 · 3 comments
Closed

Insufficient Authentication in PIWIK‏ #8908

tusharparab opened this issue Oct 4, 2015 · 3 comments
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@tusharparab
Copy link

Hi Team,

I have locally hosted PIWIK (2.14.3) on my machine and tested few modules of it. While going through an account I have observed that when user gets created, he/she gets on "token_auth" which is static for Life Time. (It doesn't expire after logout).

If in any way I get this token of account owner, I will have life time access of his/her account. I can fire any any request on owner's account whether its of creating user, deleting user, creating Email report or delete Email reports etc.

Note that, this vulnerability is present/tested on latest version of PIWIK and also on your "Cloud-hosted Piwik".

POC:

  1. Login to account.
  2. Create a user or create Email report and Capture that POST request.
  3. Logout from account.
  4. Modify and Replay request captured in step 2 and see success response.
  5. Login into account and verify changes.

In fact, in step 4, you don't need a cookie to get success response. :D :D . You can fire that request without any valid/invalid cookie.

You only need user's "token_auth" and account name of account owner. And all you can own his account.

Recommendation:
Instead of using t

oken_auth, you should use Anti-CSRF token to verify each and every incoming request from users.
If you implement Anti-CSRF token in proper way, all such malicious requests will fail.

I have uploaded video POC and Sample requests on dropbox. In this Video-POC, I have created and deleted "Email Reports" after logout. In such a way, you can create users or delete user or can do any operations.

Download Link:
https://www.dropbox.com/s/f3jbb6k3z2ku374/Create%20and%20Delete%20Email%20Report%20-%20PIWIK.zip?dl=1

Request you to please check the same and let me know if anything is needed.

Thanks,
Tushar

@mattab
Copy link
Member

mattab commented Nov 26, 2015

Thank you for the report. This is how Piwik works by default. token_auth is basically like the username+password and should never be shared.

@mattab mattab closed this as completed Nov 26, 2015
@mattab mattab added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Nov 26, 2015
@tusharparab
Copy link
Author

Hi Mattab,

If password gets compromised, a user can change the password.
But once 'token_auth' gets compromised, a user won't be able to change it. Its a static token which will remain same for entire life of a user account.

If anyhow attacker gets this token of a any user then that user will remain vulnerable forever.

And here, attacker only need 'token_auth' for performing all operations on user's behalf. Attacker doesn't require username or password of a user.

@mattab
Copy link
Member

mattab commented Nov 27, 2015

But once 'token_auth' gets compromised, a user won't be able to change it. Its a static token which will remain same for entire life of a user account.

No the token_auth changes with the password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants