Skip to content
Access control Write-up Beginner

How I Found My First Bug: Invitation Bypass Exploit

The role update endpoint accepted arbitrary user IDs in the subjects array without checking whether the user had been invited or consented. An attacker could add any user to their company group without an invitation, and the added user could not leave.

medium.com

Published on medium.com

Hello guys! its Ahmed0x00 and today I will tell you how I found my first bug which was a little bit interesting, but first of all you must have an overview of the application

Ahmed Hussein, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the role update endpoint trusted the client-supplied subjects array and did not verify that each user had a pending or accepted invitation to the company.

Impact

An attacker could force any user into their company group without consent, and the user could not leave, which could expose the victim to the group's data and actions.

What the attacker needed

An account in a company group; knowledge of the victim's user ID; ability to send crafted API requests

The fix

The role update endpoint should verify that each user ID in the subjects array belongs to an invited or accepted member of that company before applying the change.

How it was found

  1. Observe the role update request that changes a member's role and note the subjects array of user IDs.
  2. Observe that removing a member is done by sending an empty subjects array to the role endpoint.
  3. Send a role update request with a victim's user ID in the subjects array.
  4. Reload the member list and see the victim added to the company without an invitation.

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 write-up has not been written yet. The Original tab links to the source.

A company group has roles, and each role holds a list of user IDs for the people in it. The server trusted that list blindly, so anyone who could edit a role could put a stranger's ID into it. That stranger was then treated as a member without ever agreeing to join.

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.

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.