Skip to content
Access control Disclosed report Beginner

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.

theappsec Follow

Originally disclosed on HackerOne

Critical 9.6 View original
  • 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:
HTTP
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

rocket-upload-plugins-2019-02-06_13.06.45.mp4 From the original on HackerOne

The original report as published on HackerOne, by theappsec. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Log in to the chat as a regular user.
  2. Open the app installation page at /admin/app/install.
  3. Upload any app.
  4. 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.

More by theappsec

View all

1 more disclosed report, best first.

More from Rocket.Chat

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.