Skip to content
Access control Disclosed report Intermediate

Admin can create a hidden admin account which even the owner can not detect and remove and do administrative actions on the application.

The application allowed the same email to be invited multiple times to an organisation with different roles, and the resulting duplicate membership was not shown in the members list. An admin could exploit this to create a hidden admin account that the owner could not see or remove, and then use its token to perform administrative actions even after being removed.

41bin Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 6 days
  • Paid in 6 days
  • Disclosed after 5 months

ads.reddit.com is an ads creating and managing application for reddit. The application has the feature to invite other members to the organization and give different roles at ad management. Testing around the role management functionalities, I have noticed that a user with the same email can get invited to the same organization multiple times if the user is assigned with different roles. So, taking advantage of this behavior I found the admin as an attacker can create an undetectable/hidden admin account and do administrative actions on the organization like remove other users and invite other users. Since this malicious account information can not be seen in the members section, even the owner of the organization can not detect and remove this malicious user from the organization.

Steps to reproduce:

  1. Login as admin from https://ads.reddit.com/
I know creating an owner account and then creating an admin account with in a limited time is  little-bit painful.
You can use the following credentials to login as admin

        email :██████████
        name: ███████
        password : ██████████
  1. Go to https://ads.reddit.com/account/███/permissions and invite a user (malicious hidden user) by giving the role as admin
  2. login to that account (malicious hidden user) from a different browser and accept the invite.
  3. Same as the second step, go to the admin account and invite the same malicious user by giving the role as Analyst.
  4. Now go to the malicious user account and then go to https://ads.reddit.com/accounts.
  5. You will see the new invitation arrived with the Analyst role. Accept the invitation.
  6. From this account (malicious) go to https://ads.reddit.com/account/████████/billing while intercepting the requests using burpsuite.
  7. Look at the burp history and find out the Authorization token used by the account and copy it. (see copy-the-auth-token.png)
  8. Now go to the normal admin account and change the permission of this malicious account to None (It removes malicious account from the organization) and refresh the page to confirm that the malicious user is removed.
  9. Using burpsuite repeater, change the email and send the following request by replacing the token which you copied from the 8'th step.
POST /api/v2.0/accounts/█████████/invitations HTTP/2
Host: ads-api.reddit.com
Content-Length: 87
Sec-Ch-Ua: " Not A;Brand";v="99", "Chromium";v="102"
Accept: application/json
Content-Type: application/json
Authorization: ██████
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Sec-Ch-Ua-Platform: "Linux"
Origin: https://ads.reddit.com
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://ads.reddit.com/
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

{"data":{"recipient_email":"█████████","type":"ADMIN"}}

  1. Now you are able to invite other users to the organization even though you are not a member of that organization.

Impact

Let me explain the impact with different scenarios as an example.

  • The owner invites an admin to the organization and the admin who knows about this issue creates an account in this way.
  • Latter, the owner decide to change the role of this admin to analyst or remove this admin from the organization due to some reasons
  • Now the admin as the malicious user, can do sensitive actions in the organization like inviting or removing other users.
  • When the owner goes to the members section, he will not find the malicious account there and even he can not remove that malicious account from the organization.
  • It also happens when the owner or admin invites other users accidentally in this way.
  • It is not complicated, the vulnerability arises when a user accepts multiple invitations assigned with different roles from a single organization.

The original report as published on HackerOne, by 41bin. 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

Impact

An admin could create a hidden account that the owner could not see or remove, and use it to invite or remove other users even after being removed from the organisation.

What the attacker needed

Admin access to the organisation; ability to log in as the invited user; ability to intercept HTTP requests

How it was found

  1. Log in as an admin and invite a user with the admin role.
  2. Log in as that user in a different browser and accept the invitation.
  3. From the admin account, invite the same user again with the Analyst role.
  4. Accept the new invitation from the user's account.
  5. Capture the user's authorization token while browsing the billing page.
  6. Remove the user from the organisation, then use the captured token to send an invitation request.

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.

When you invite someone to a team, the system should only allow one account per email. Here, the same email could be invited twice with different roles, creating a second hidden membership. That hidden account kept working even after the visible one was removed, letting the attacker act as an admin without being seen.

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 from Reddit

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.