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

Insecure permission: A normal user can escalate his/her role to admin #190

Open
HeddaZhu opened this issue Oct 18, 2024 · 0 comments
Open

Comments

@HeddaZhu
Copy link

Overview

There exists an insecure permission in BRCC from version 1.0.1 to latest. A normal user can escalate his/her role to admin via a POST request.

The affected interface is /console/admin/updateAdmin/{userId}.
This interface allows normal users to arbitrarily modify their own roles.

Details

Affected Function: com.baidu.brcc.controller.AdminController#updateAdmin
1

The validation logic in the interface implementation:

  1. Whether the user is in an available state.
  2. Whether the user is an administrator; if not, it only needs to be verified whether they are modifying their own data.

The interface implementation did not validate whether non-administrator users could modify their own roles, thus allowing normal users to change their roles to administrator without any restrictions.

Exploit

2
test001 is a normal user, the code of role is 0.
rcc-token in the header of request is the token of test001.
Pasted image 20241016171146

It's successful. test001 has become an administrator.

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

1 participant