Broken access control on apps
A user without administrative privileges could upload and install any application into Rocket.Chat, and because the application ID is controlled in the app.json file, the user could also activate it. This allowed users to install and activate malicious apps.
- Disclosed after 4 months
Summary:
The user without administrative privileges can upload and install any Application into the rocket.chat As ID of application is controlled in the app.json file (which is controlled by uploader) user can also activate the app.
Releases Affected:
- 0.73.2
Steps To Reproduce:
- User log-in into the chat
- User open the following link:
http://<rocket-chat.link>>/admin/app/install
- Upload any app
- Activate it by send the following POST request to the installed app:
POST /api/apps/<ID_of_the_installed_App>/status HTTP/1.1
Host: rocket-chat.link
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
X-User-Id: [redacted]
X-Auth-Token: [redacted]
X-Requested-With: XMLHttpRequest
Cookie: [redacted]
DNT: 1
Connection: close
Content-Length: 29
{"status":"manually_enabled"}
Supporting Material/References:
You can see the uploading process in the attached video. Left user is admin, right - user without any additional privileges.
Suggested mitigation
Managing apps should be available to admins only.
Impact
Users can install and activate malicious apps into the rocket.chat.
Attachments
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 application installation and activation endpoints lacked proper authorization checks, allowing any authenticated user to perform admin-only actions.
Impact
Users could install and activate malicious apps into Rocket.Chat.
What the attacker needed
A logged-in user account
How it was found
- Log in to the chat as a regular user.
- Open the app installation page at /admin/app/install.
- Upload any app.
- Send a POST request to activate the installed app.
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.
In Rocket.Chat, applications can be added to extend functionality. Normally only administrators should be able to install them. Here, any logged-in user could reach the installation page and upload an app, then activate it, which could let them run harmful code.
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.