It is possible to elevate privileges for any authenticated user to view permissions matrix and view Direct messages without appropriate permissions.
A user holding only the 'View Private Room' permission could rewrite the roles field in the /api/v1/me response using a local proxy and then reach the admin permissions page and read Direct Messages. The text claims this grants access to the permissions matrix and to Direct Messages that the role should not allow.
- Triaged in 2 days
- Fixed in 2.1 years
- Disclosed after 2.2 years
Summary by the program
Description:
For the user with "View Private Room" permission only it is possible to rewrite permission role (e.g. to admin) in /api/v1/me method response via some proxy tools (e.g. Charles) and get access to server`s permissions matrix and view Direct messages.
Releases Affected:
Tested on 3.3.3
Steps To Reproduce (from initial installation to vulnerability):
Leave existing "Guest" role with only "View Private Room" permission and associate newly created user with it . Install Charles or another network proxy Enable local SSL proxy. Turn on the rewrite tool and edit body response "roles" parameter to admin ("roles": ["admin"]) for /api/v1/me method. Reload Rocket page. Now you can get https://your_server/admin/permissions page with current server`s permissions. Now you can receive Direct Messages even if "View Direct Messages" permissions is disabled for you.
Impact
The user which is not meant to be able to participate in Direct Messaging gains the ability to do so and also gets access to the server`s permissions scheme.
This issue has been fixed in 5.0>
Summary by the researcher
I found out, that ANY user with the role without permissions at all, can be added to channel, private group or direct message, and can see permission matrix as well, following the steps describe in attached video.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted client-supplied role data from the /api/v1/me response instead of checking permissions server-side against the stored user record.
Impact
A low-privileged user could view the server's permission scheme and read Direct Messages they were not permitted to see.
What the attacker needed
An account with a low-privilege role; ability to intercept and rewrite HTTPS traffic
The fix
The issue was fixed in version 5.0; the text does not say how.
How it was found
- Create a role with only the 'View Private Room' permission and assign a new user to it.
- Install a network proxy such as Charles and enable local SSL proxying.
- Use the proxy rewrite tool to change the roles field in the /api/v1/me response to admin.
- Reload the application page.
- Open the admin permissions page and read the server's permission matrix.
- Read Direct Messages despite lacking the 'View Direct Messages' permission.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The server sends a list of roles to the browser. A user could edit that response with a proxy tool so it said 'admin', and the server then treated them as an admin.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.