One parameter & Two IDORs
The group management API trusted a manager identifier supplied by the client, letting a user add an account that was not in their contact list as a group manager. A second endpoint let a user create a group in another account's group list by supplying that account's identifier, and combining both flaws bypassed the contact-list requirement.
medium.com
Published on medium.com
Bug Bounty
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.
Context
The target is a public program on YesWeHack. The product lets a user register devices and connect to them remotely through the application. Users organise those devices into groups: you create a group, add devices to it, and add members to the group with different permission sets. Adding a member is supposed to require that the person is already in your contact list, meaning they have accepted an invitation request from you.
The write-up covers two IDORs in the group management API, both reached through the same parameter, managerId. The first is in the "add member" call on an existing group; the second is in group creation. The first was closed as informative, the second was marked as a duplicate.
Setup
The researcher worked against the program's web application, referred to in the requests as web.target.com. The only precondition described is a normal account on the platform with the ability to create groups. No specific tools, versions or roles are mentioned beyond that. The requests carry a CSRF token in an X-Csrf-Token header.
Finding it
The starting point was the "add member" functionality. The request that adds a manager to a group looks like this:
PUT /api/manageddevices/v2/groups/{group-UUID} HTTP/2
Host: web.target.com
Content-Type: application/json
X-Csrf-Token: {CSRF-token};
{
"displayName": {"operation": "Update", "displayName": "privesc test"},
"managers": [
{
"operation": "Add",
"displayName": "created victim",
"managerId": "b54ce6b0-a015-4844-afad-4360e8fa1c2f",
"permissionSets": ["EasyAccess"],
"accountId": 332157636
}
]
}
Two identifiers appear in the manager object: managerId, a UUID, and accountId, a numeric value. The researcher tested accountId first by changing it, and it did not work, so that parameter appeared to be validated. That left managerId as the interesting one.
Exploitation
Step 1: injecting a foreign managerId into an existing group
The researcher picked a managerId belonging to a user who had just signed up and had no contacts, and put it into the request. The response came back 200 OK, confirming that the injection succeeded.

The response body was:
{
"permissionSets": ["PolicyAdministration","GroupAdministration","EasyAccess","InheritDeviceAdministration","InheritDeviceDescription","InheritPolicyAdministration","CustomFieldsAdministration"],
"displayName": "created victim",
"isInvalidManager": false,
"managerId": "b54ce6b0-a015-4844-afad-4360e8fa1c2f",
"managerType": "Account",
"accountId": 331931452,
"userGroupId": 0,
"companyId": 0
}
The important observation is that the request only depends on managerId: it is the only parameter that matters for the membership check. The contact-list requirement was therefore bypassed by supplying the UUID of someone who was never a contact.
On its own the researcher judged this as low severity, because the attacker needs the victim's UUID. So the next step was to find a way to obtain other users' managerId values.
Step 2: leaking managerId values from the group read endpoint
The researcher found this request:
GET /api/manageddevices/v2/groups/{groupId}
It returns all users' managerId values in the response, and any user could access this data even with the "view-only" role.

With a readable source of managerId values, the first IDOR no longer depended on guessing a UUID, which raised its severity in the researcher's assessment. The bug was reported and closed as "informative": from the program's perspective it did not warrant a fix.

Step 3: IDOR in group creation via accountId
The second IDOR is in the same section of the API. Creating a new group uses this request:
POST /api/manageddevices/v2/groups HTTP/2
Host: web.target.com
Content-Type: application/json
X-Csrf-Token: <redacted>
{
"displayName": {
"displayName": "created by hacker",
"operation": "Add"
},
"managers": [
{
"accountId": <victim_accountId>,
"operation": "Add",
"permissionSets": ["ManagerAdministration", "GroupAdministration"]
}
]
}
Here the researcher tested IDOR in the accountId parameter, adding the ID of a user who was in the contact list. It worked.

This is an IDOR that lets an attacker create groups in the victim's group list. Changing the ID to someone who was not in the contact list did not work as expected, so at this point the issue was low severity: the victim had to be added as a contact first. It was made lower still by the fact that the attacker could only create the group in the victim's list, without being able to add themselves or perform any actions.
Step 4: combining the two, using managerId in group creation
The researcher then reused the managerId that had been vulnerable in the other request. A victim's managerId that was not in the contact list was obtained quickly and added to the request:

It worked.

It worked. This second issue was reported quickly and was marked as a duplicate.

Root cause
The contact-list requirement is enforced on one identifier and not on the other. In the add-member call, accountId is validated but managerId is trusted as supplied, so the membership check can be satisfied by a UUID that was never a contact. In group creation, accountId is the parameter that is accepted, and it is only checked against the contact list. The read endpoint that returns every user's managerId removes the only practical obstacle, the unguessable UUID, and it does so even for view-only users.
Impact
An authenticated attacker can add an account whose managerId they know as a manager of a group they control, without the victim ever accepting a contact invitation. In the other direction, an attacker can create groups in another user's group list without being a contact. The researcher's own assessment was that the first issue alone would be low severity because of the UUID requirement, and that the second is limited because the attacker can only create the group in the victim's list and cannot add themselves or perform any actions there. The group read endpoint exposes every user's managerId to any user, including view-only ones, which is what turns the UUID from a barrier into a lookup.
Fix
The report does not describe any fix being applied. The first issue was closed as informative and the second was marked as a duplicate, so what the program changed, if anything, is not stated. Based on the behaviour shown, the server should resolve the manager from a single identifier and enforce the contact-list check on that same identifier, rather than validating one field and acting on another. The group read endpoint should also stop returning other users' managerId values to users who have no relationship with them, including view-only users.
Variants to test
- Send two identifiers for the same object in one request, for example a numeric account ID and a UUID, and change each in turn. A positive result is a
200where the object is created or modified for an identity that fails the intended check. - Look for read endpoints in the same API that return identifiers of other users, and test them with the lowest-privilege role available. A positive result is another user's identifier appearing in a response for a view-only account.
- Take an identifier leaked from a read endpoint and feed it into every write endpoint that accepts it, including creation calls. A positive result is a resource appearing in another user's list without any prior relationship.
- Compare the permission sets accepted at creation with those returned afterwards. A positive result is a response granting more than the request asked for, as in the add-member response above.
- Repeat the contact-list bypass on other relationship-gated features, such as sharing, invitations or device assignment. A positive result is the action succeeding for an account that never accepted an invitation.
What happened, in plain words
A security researcher found two related bugs in a website that lets people manage their computers and other devices remotely. Both bugs let someone do something to another person's account that the website was supposed to prevent. The website was supposed to require that you only add people you already know (people in your contact list) to your groups. The researcher found that by changing one particular value in the request, called managerId, they could add anyone, even a stranger, to a group. They also found a second bug where they could create a group in a stranger's account. The first bug was closed as "informative", and from the program's perspective it did not warrant a fix. and the second was marked as a duplicate of something already reported.
This article explains the whole story from scratch, assuming you have never done any security testing before. We will go slowly, explain every term, and walk through each request line by line.
Background: what is this website?
The target is a public bug bounty program on YesWeHack. A bug bounty program is a scheme where a company invites independent researchers to try to find security problems in its systems and report them responsibly, instead of exploiting them.
The product itself lets you register devices (computers, phones, whatever) and connect to them remotely through a web application. Think of it like a remote-control app: you sign in, you see a list of your devices, and you can connect to any of them from anywhere.
Users organise their devices into groups. A group is just a collection, like a folder. You create a group, put devices in it, and add other people as members of the group, each with different permissions. Permissions are rules about what a member is allowed to do: for example, some members might only be able to view devices, while others can control them fully.
There is an important rule: to add someone as a member of your group, that person must already be in your contact list. Being in your contact list means they accepted an invitation you sent them. This is a trust boundary: the website is supposed to stop you from adding strangers to your groups, because a stranger could then access your devices.
What is an API and what is a request?
When you click a button on a website, your browser sends a message to the server (the computer that runs the website). That message is called a request. The server sends back a response. The part of the server that receives these messages and does things is called the API (Application Programming Interface). You can think of the API as a waiter in a restaurant: you tell the waiter what you want, the waiter goes to the kitchen, and brings back your food. You never go into the kitchen yourself.
Requests have a few parts:
- Method: a verb that says what kind of action you want.
GETmeans "give me something" (like reading a page).POSTmeans "create something new".PUTmeans "update something that already exists". - URL / path: the address of the thing you want. For example
/api/manageddevices/v2/groupsmeans "the groups part of the API". - Headers: extra information attached to the request, like a label on an envelope. For example
Content-Type: application/jsonsays "the body of this request is written in JSON format". - Body: the actual data you are sending, usually in JSON format. JSON is just a way of writing structured data using curly braces
{}, square brackets[], and"key": valuepairs. It looks a bit like a shopping list written in a very strict format.
What is a CSRF token?
One header you will see in the requests is X-Csrf-Token. CSRF stands for Cross-Site Request Forgery. It is an attack where a malicious website tricks your browser into sending a request to another website where you are already logged in. To prevent this, many websites give your browser a secret random string called a CSRF token when you log in. Your browser must include this token in every request that changes something. A malicious website cannot know the token, so it cannot forge requests.
In the requests below, the token appears as {CSRF-token} or <redacted>. That is because the researcher removed the real value before publishing, since it is a secret tied to their session.
What is an IDOR?
IDOR stands for Insecure Direct Object Reference. It is one of the simplest and most common security bugs. Here is the idea in everyday terms:
Imagine a hotel where every room key is just a number written on a card. Your room is 204, so your card says "204". If you change the number on your card to "205", you can open room 205, even though you never paid for it. The hotel trusted the number on the card without checking whether you were actually allowed to use that room.
In web applications, the "room number" is usually an ID: a unique identifier for a user, a group, an order, a file, and so on. If the server accepts whatever ID you send without checking that the ID belongs to you or that you have permission to use it, that is an IDOR. The fix is for the server to check, on every request, whether the logged-in user is actually allowed to access the object with that ID.
What is a UUID?
A UUID (Universally Unique Identifier) is a long random-looking string used as an ID, for example b54ce6b0-a015-4844-afad-4360e8fa1c2f. It is designed to be so unlikely to repeat that you can generate one anywhere in the world without coordinating with anyone. Because it is long and random, it is also hard to guess. That matters later: if an attacker needs to know a victim's UUID, and there is no way to find it, the attack is much harder.
The first bug: adding a stranger to your group
The researcher started by looking at the "add member" feature. When you add someone to a group, your browser sends a request like this:
PUT /api/manageddevices/v2/groups/{group-UUID} HTTP/2
Host: web.target.com
Content-Type: application/json
X-Csrf-Token: {CSRF-token};
{
"displayName": {"operation": "Update", "displayName": "privesc test"},
"managers": [
{
"operation": "Add",
"displayName": "created victim",
"managerId": "b54ce6b0-a015-4844-afad-4360e8fa1c2f",
"permissionSets": ["EasyAccess"],
"accountId": 332157636
}
]
}
Let us go through it line by line:
PUT /api/manageddevices/v2/groups/{group-UUID} HTTP/2: This says "update the group whose ID is{group-UUID}".PUTis the update verb.HTTP/2is just the version of the web protocol being used.Host: web.target.com: This tells the server which website we are talking to.web.target.comis the host shown in the request.Content-Type: application/json: The body is written in JSON.X-Csrf-Token: {CSRF-token};: The secret token that proves the request came from the real website, not a malicious one.- The blank line separates the headers from the body.
"displayName": {"operation": "Update", "displayName": "privesc test"}: This renames the group to "privesc test".privescis short for privilege escalation, a term for gaining more permissions than you should have. The researcher chose this name as a label for the test."managers": [ ... ]: A list of people to add as managers (members with management permissions)."operation": "Add": We want to add this person."displayName": "created victim": A label for this member."managerId": "b54ce6b0-a015-4844-afad-4360e8fa1c2f": The UUID of the person being added."permissionSets": ["EasyAccess"]: What this person is allowed to do.EasyAccessis one of the permission sets the application offers."accountId": 332157636: A numeric ID for the same person.
So there are two identifiers for the same person: managerId (a UUID) and accountId (a number). The researcher tried changing accountId first. It did not work, which suggested the server was checking that value. That left managerId as the interesting one to test.
Step 1: putting a stranger's managerId into the request
The researcher picked a managerId belonging to a user who had just signed up and had no contacts. In other words, a complete stranger to the researcher. They put that UUID into the request. The server responded with 200 OK, which is the standard HTTP status code for success. That meant the injection worked: the stranger was added to the group even though they were never in the researcher's contact list.

The response body was:
{
"permissionSets": ["PolicyAdministration","GroupAdministration","EasyAccess","InheritDeviceAdministration","InheritDeviceDescription","InheritPolicyAdministration","CustomFieldsAdministration"],
"displayName": "created victim",
"isInvalidManager": false,
"managerId": "b54ce6b0-a015-4844-afad-4360e8fa1c2f",
"managerType": "Account",
"accountId": 331931452,
"userGroupId": 0,
"companyId": 0
}
Line by line:
"permissionSets": [...]: The list of permissions the new member now has. Notice it is much longer than the singleEasyAccessthat was sent in the request. The server added several more permissions on its own."displayName": "created victim": The label we sent."isInvalidManager": false: The server says the manager is valid. This is the key line: the server did not consider the stranger invalid."managerId": "b54ce6b0-a015-4844-afad-4360e8fa1c2f": The UUID we sent."managerType": "Account": The type of manager."accountId": 331931452: The numeric account ID the server associated with that UUID. Notice it is different from theaccountIdwe sent in the request (332157636). The server ignored ouraccountIdand looked up the real one from themanagerId."userGroupId": 0and"companyId": 0: Other fields, both zero.
The important observation is that the request only depends on managerId. It is the only parameter that matters for the membership check. The contact-list requirement was bypassed by supplying the UUID of someone who was never a contact.
On its own, the researcher judged this as low severity, because the attacker needs to know the victim's UUID. And UUIDs are hard to guess. So the next step was to find a way to obtain other users' managerId values.
Step 2: leaking managerId values from the group read endpoint
The researcher found this request:
GET /api/manageddevices/v2/groups/{groupId}
This is a GET request, meaning "give me information about the group with this ID". The response returns all users' managerId values. And any user could access this data, even one with the "view-only" role. A view-only role is the lowest level of permission: you can look but not change anything.

This means the UUID is no longer a secret: the endpoint returns all users' managerId values, and any user could access this data even with the "view-only" role. With a readable source of managerId values, the first IDOR no longer depended on guessing a UUID, which raised its severity in the researcher's assessment.
The bug was reported and closed as "informative". From the program's perspective, it did not warrant a fix.

Step 3: IDOR in group creation via accountId
The second IDOR is in the same section of the API. Creating a new group uses this request:
POST /api/manageddevices/v2/groups HTTP/2
Host: web.target.com
Content-Type: application/json
X-Csrf-Token: <redacted>
{
"displayName": {
"displayName": "created by hacker",
"operation": "Add"
},
"managers": [
{
"accountId": <victim_accountId>,
"operation": "Add",
"permissionSets": ["ManagerAdministration", "GroupAdministration"]
}
]
}
Line by line:
POST /api/manageddevices/v2/groups HTTP/2:POSTmeans "create something new". The path points to the groups collection, so this creates a new group.Host: web.target.com: The website we are talking to.Content-Type: application/json: The body is JSON.X-Csrf-Token: <redacted>: The secret token, removed before publishing."displayName": { "displayName": "created by hacker", "operation": "Add" }: The name of the new group is "created by hacker"."managers": [ ... ]: The list of managers for the new group."accountId": <victim_accountId>: The numeric ID of the person who will be a manager. The researcher put a victim's ID here."operation": "Add": Add this person."permissionSets": ["ManagerAdministration", "GroupAdministration"]: The permissions the manager will have.
Here the researcher tested IDOR in the accountId parameter, adding the ID of a user who was in the contact list. It worked.

This is an IDOR that lets an attacker create groups in the victim's group list. Changing the ID to someone who was not in the contact list did not work as expected, so at this point the issue was low severity: the victim had to be added as a contact first. It was made lower still by the fact that the attacker could only create the group in the victim's list, without being able to add themselves or perform any actions.
Step 4: combining the two, using managerId in group creation
The researcher then reused the managerId that had been vulnerable in the other request. A victim's managerId that was not in the contact list was obtained quickly and added to the request:

It worked.

It worked. This second issue was reported quickly and was marked as a duplicate. A duplicate means someone else had already reported the same bug, so the program did not treat it as a new finding.

Why did this happen?
The contact-list requirement is enforced on one identifier and not on the other. In the add-member call, accountId is validated but managerId is trusted as supplied, so the membership check can be satisfied by a UUID that was never a contact. In group creation, accountId is the parameter that is accepted, and it is only checked against the contact list. The read endpoint that returns every user's managerId removes the only practical obstacle, the unguessable UUID, and it does so even for view-only users.
What could an attacker do?
An authenticated attacker can add an account whose managerId they know as a manager of a group they control, without the victim ever accepting a contact invitation. In the other direction, an attacker can create groups in another user's group list without being a contact. The researcher's own assessment was that the first issue alone would be low severity because of the UUID requirement, and that the second is limited because the attacker can only create the group in the victim's list and cannot add themselves or perform any actions there. The group read endpoint exposes every user's managerId to any user, including view-only ones, which is what turns the UUID from a barrier into a lookup.
Was it fixed?
The report does not describe any fix being applied. The first issue was closed as informative and the second was marked as a duplicate, so what the program changed, if anything, is not stated. Based on the behaviour shown, the server should resolve the manager from a single identifier and enforce the contact-list check on that same identifier, rather than validating one field and acting on another. The group read endpoint should also stop returning other users' managerId values to users who have no relationship with them, including view-only users.
Other things to try
- Send two identifiers for the same object in one request, for example a numeric account ID and a UUID, and change each in turn. A positive result is a
200where the object is created or modified for an identity that fails the intended check. - Look for read endpoints in the same API that return identifiers of other users, and test them with the lowest-privilege role available. A positive result is another user's identifier appearing in a response for a view-only account.
- Take an identifier leaked from a read endpoint and feed it into every write endpoint that accepts it, including creation calls. A positive result is a resource appearing in another user's list without any prior relationship.
- Compare the permission sets accepted at creation with those returned afterwards. A positive result is a response granting more than the request asked for, as in the add-member response above.
- Repeat the contact-list bypass on other relationship-gated features, such as sharing, invitations or device assignment. A positive result is the action succeeding for an account that never accepted an invitation.
Glossary
- API: The part of a website that receives requests from your browser and does things, like a waiter taking your order to the kitchen.
- Bug bounty program: A scheme where a company invites independent researchers to find and report security problems in its systems, often in exchange for a reward.
- Contact list: A list of people you have invited and who have accepted your invitation. The website uses it as a trust boundary.
- CSRF (Cross-Site Request Forgery): An attack where a malicious website tricks your browser into sending a request to another website where you are logged in.
- CSRF token: A secret random string given to your browser at login, which must be included in requests that change things, so that a malicious website cannot forge them.
- Duplicate: A bug report that describes the same issue as one already reported, so it is not treated as a new finding.
- GET: An HTTP method meaning "give me information".
- Group: A collection of devices that users can manage together, like a folder.
- Header: Extra information attached to a request, like a label on an envelope.
- HTTP/2: A version of the protocol used to send requests and responses on the web.
- IDOR (Insecure Direct Object Reference): A bug where the server accepts an ID you send without checking that you are allowed to access the object with that ID, like a hotel key card that just has a room number on it.
- Informative: A bug report status meaning the program decided the issue did not warrant a fix.
- JSON: A way of writing structured data using curly braces, square brackets, and key-value pairs.
- Manager: A member of a group with management permissions.
- Method: The verb in a request that says what kind of action you want, such as
GET,POST, orPUT. - Permission set: A named collection of permissions that defines what a member is allowed to do.
- POST: An HTTP method meaning "create something new".
- PUT: An HTTP method meaning "update something that already exists".
- Request: A message your browser sends to a server.
- Response: The message the server sends back.
- Role: A named set of permissions, such as "view-only".
- Severity: How serious a security bug is judged to be.
- Trust boundary: A line the system draws between people or things that are trusted and those that are not, such as the rule that only contacts can be added to a group.
- UUID (Universally Unique Identifier): A long random-looking string used as an ID, designed to be very unlikely to repeat and hard to guess.
- View-only: The lowest level of permission, where you can look but not change anything.
- YesWeHack: A bug bounty platform where companies publish programs and researchers submit reports.