IDOR via Comma-Injection: How Concatenating Two IDs Leaked Cross-Tenant PII
A permissions endpoint accepted a comma-separated pair of user IDs in a single field, checking only the last one for tenant ownership. An attacker could add an external user to a folder's access list and read back that user's full name, email and internal tenant ID.
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 document-vault application: it stores folders and files, and Access Control Lists (ACLs) are applied to them. Folder owners can grant other users Read, Write or FullControl permissions through a "Permissions" panel.
Under the hood, every action in that panel goes through a single JSON-RPC-style endpoint:
POST /rpc/api.phpContent-Type: application/json
A typical addObjectAccess call looks like this:
{ "method": "addObjectAccess", "data": [{ "data": [{ "user_group_id": 1012, "name": "firstName lastName", ... }], "id": "..." }], "type": "rpc", "tid": 55}
The field that tells the backend which user to add and apply an ACL to is user_group_id.
Setup
The write-up does not describe any special tooling, accounts or versions. The precondition for the attack, as stated in the report, is that the attacker has at least one folder with FullControl permissions in their own tenant, and can guess or enumerate a valid user_id belonging to another tenant.
Finding it
The obvious test is whether a user outside the attacker's tenant can be added. Sending the victim's ID directly in user_group_id:
"user_group_id": "victim_id"
returns Access Denied. That is the expected behaviour: a server-side ownership check confirms that the target user is visible to, or owned by, the requesting tenant.
The researcher then probed how the server behaves when special characters are sent in user_group_id, and noticed that the response differs when the parameter contains a comma. That observation led to the bypass.
Exploitation
Step 1: Send two IDs joined by a comma
Instead of a single ID, the researcher sent two IDs joined by a comma: the victim's ID first, followed by a legitimate user ID from their own tenant.
"user_group_id": "victim_id,tenant_user_id"
The order matters. As the researcher observed, the server appears to check only the last value in the parameter for tenant ownership. With a valid tenant user in the trailing position, the request was accepted.
Step 2: Read back the folder ACL
To confirm the effect, the researcher called the companion method getObjectAcl to read the folder's ACL:
{ "method": "getObjectAcl", "data": [{ "id": "FOLDER_ID" }], "tid": 589}
The response now contained a full ACL entry for the victim account, a user with no relationship to the attacker's tenant at all:
{ "id": "512", "name": "V...", "first_name": "V...", "last_name": "...", "email": "[redacted]", "tenant_id": "184", "group_type": "Provider", "user_group_id": "512"}
That entry discloses the victim's full name, email address and internal tenant ID, for a user in a completely different organisation. The researcher notes that this is retrievable by anyone who can guess or enumerate a valid user_id and who has at least one folder with FullControl permissions in their own tenant.
Root cause
The endpoint expects a single numeric user ID in user_group_id, but the backend does not treat the value as a single identifier. When the value contains a comma, the ownership check appears to validate only the last element of the list, while the rest of the processing acts on the other element, the victim's ID. The request is therefore authorised on the strength of the attacker's own tenant user, and then applied to the victim.
The researcher observed that the server appears to check only the last value in the parameter for tenant ownership, while the request was still applied to the victim's ID. The report notes a server-side ownership check confirming the target user is visible to or owned by the requesting tenant.
Impact
- Confidentiality: disclosure of PII (full name, email, internal tenant and user ID) belonging to users in unrelated tenants.
- Integrity: the ability to add arbitrary external users to a folder's ACL, bypassing tenant isolation.
The attack requires a valid user_id in the target tenant, obtained by guessing or enumeration, and a folder under the attacker's FullControl in their own tenant.
Fix
The report does not state what was changed. The fix implied by the root cause is to treat user_group_id as a single scalar identifier: reject any value that is not exactly one numeric ID, and run the ownership check on that same parsed value that the write path uses, rather than on a substring or on the last element of a split list.
Variants to test
When a parameter takes a single ID and is rejected for an unauthorised value, the researcher suggests trying:
- Delimiter injection. Send multiple values separated by a comma, semicolon or pipe, for example
victim_id,tenant_user_id. A positive result is that the request is accepted where the single victim ID was denied, and that a follow-up read (such asgetObjectAcl) shows the victim's entry, including name, email and tenant ID. - Array injection. Send the parameter as an array, for example
["victim_id"]or{"id": ["a","b"]}. The researcher suggests trying the parameter as an array, for example["victim_id"]or{"id": ["a","b"]}.
The researcher noticed the response differed when a comma was sent in the parameter, which led to the bypass attempt.
What happened, in plain words
A company runs a website where teams store their documents in folders, a bit like a shared drive at work. The owner of a folder can decide who else is allowed to look inside it, and what they are allowed to do there: only read, read and write, or have full control.
When the owner adds someone, the website sends a small message to the company's server (the computer that does the real work behind the scenes) saying "give this person access". That message contains the ID number of the person to add. An ID is just a number that identifies one specific account, the way a membership number identifies one member at a gym.
A security researcher tried to abuse that message. First he asked the server to add a person from a completely different company. The server said no, which is the correct behaviour. Then he tried sending two ID numbers in the same field, separated by a comma: first the stranger's number, then the number of a normal user from his own company. The server accepted the request. It added the stranger to the folder, and when the researcher read the folder's list of who has access, the list showed the stranger's full name, email address and internal company number.
That is the whole story: a check that was supposed to stop people from touching other companies' accounts was fooled by putting a comma and a second number in the same box.
The product and the feature
The target is a document vault. Think of it as an online filing cabinet: it holds folders, and folders hold files. Each folder and file has an Access Control List, usually shortened to ACL. An ACL is simply a list attached to an object that says who may do what with it. At an office, the list taped to the stationery cupboard door saying "managers: any time, everyone else: ask the manager" is an ACL in paper form.
Folder owners manage that list through a "Permissions" panel in the website. In that panel they can grant another user one of three levels:
Read: the person can look at the contents but not change them.Write: the person can look and also change things.FullControl: one of the three permission levels a folder owner can grant.
Every button in that panel does not talk to the server in its own special way. Instead, all of them send their requests to one single address, using a style called JSON-RPC. RPC stands for Remote Procedure Call: instead of asking for a web page, the browser asks the server to run a named action, like calling a function in a program. JSON is just a text format for structured data, made of curly brackets, names in quotes, and values. It is how the browser and the server write down "here is the action I want and the details it needs" in a way both sides understand.
The address every panel action goes to is:
POST /rpc/api.phpContent-Type: application/json
Line by line:
POSTis the type of request. A browser usesGETwhen it just wants to receive a page.POSTis used when it is sending data to the server, here the details of the action./rpc/api.phpis the path on the server.api.phpis a script written in the PHP programming language that acts as the single entry point for these actions. "API" means Application Programming Interface: a defined way for one piece of software to talk to another, like a service counter where you hand in a form and get an answer, rather than walking into the back office yourself.Content-Type: application/jsontells the server what format the body of the request is in, so it knows to read it as JSON rather than, say, as a web form.
A normal request to add someone to a folder looks like this:
{ "method": "addObjectAccess", "data": [{ "data": [{ "user_group_id": 1012, "name": "firstName lastName", ... }], "id": "..." }], "type": "rpc", "tid": 55}
Line by line:
- The outer
{ ... }is one JSON object, a bundle of named values. "method": "addObjectAccess"names the action the server should perform.addObjectAccessliterally means "add an entry to an object's access list"."data"holds the details for that action. It is wrapped in square brackets[ ], which in JSON means a list. Here the list has one item, another object.- Inside that item there is a second
"data"list, again with one object in it. That inner object describes the person being added. "user_group_id": 1012is the ID number of the user to add. This is the field that tells the server which account the new permission applies to."name": "firstName lastName"is a display name for that person.- The
...stands for further fields that are not relevant here. "id": "..."identifies the folder the permission is being added to."type": "rpc"labels the kind of call."tid": 55is a tenant ID. A tenant is one customer organisation on a shared service: many companies use the same website, and each company's data is supposed to be kept apart, like separate flats in one building with their own front doors. The tenant ID says which company is making the request.
So the whole message reads as: "run the action addObjectAccess, and for this folder, add user 1012 with the given name".
What the researcher needed before starting
The write-up does not mention any special tools, test accounts or software versions. It does state the two things an attacker needs for this to work:
- At least one folder in their own company's account on which they have
FullControl, so they are allowed to use the Permissions panel at all. - A valid user ID belonging to someone in another company. IDs are numbers, so they can be guessed, or found by trying many numbers in sequence, which is called enumeration.
First attempt: asking for a stranger, and being refused
The obvious thing to try is to add a user who does not belong to your own company. In the request, you put that stranger's ID into user_group_id:
"user_group_id": "victim_id"
Line by line:
"user_group_id"is the same field as before, the one that says which user to add."victim_id"stands for the ID number of the person in the other company. In the real request this would be an actual number; the write-up uses this placeholder to avoid publishing it.- The value is now in quotes, so it is sent as text rather than as a bare number.
The server answered Access Denied. That is the correct and expected result. Behind the scenes the server performs an ownership check: before acting, it confirms that the target user is visible to, or owned by, the company making the request. In everyday terms, the receptionist checks that the visitor you are signing in actually works for your own firm before issuing a badge. The check was working.
The bypass: two IDs in one field
Rather than stopping there, the researcher asked a different question: what does the server do when the field contains unusual characters? He sent values containing special characters and watched the replies. He noticed that the response changed when the value contained a comma.
That led to the actual attempt. Instead of one ID, he sent two IDs joined by a comma: the stranger's ID first, then the ID of a legitimate user from his own company.
"user_group_id": "victim_id,tenant_user_id"
Line by line:
"victim_id"is again the stranger's ID, the account he is not allowed to touch.,is the comma. To a human it is punctuation; to a program that splits text on commas, it is a separator that turns one value into a list of two."tenant_user_id"is the ID of a real user in the researcher's own company, someone he is allowed to add.- The order matters. The researcher observed that the server appears to check only the last value in the field for ownership. With a legitimate user in the trailing position, the ownership check passes, and the request was accepted.
The server was supposed to receive exactly one ID. It received two, and the researcher observed that the server appears to check only the last value for ownership. The guard was checking one visitor's badge while the work was done for a different visitor.
Confirming the leak
A successful request is not proof by itself. To see what really happened, the researcher used a companion action, getObjectAcl, which asks the server to return the folder's current access list:
{ "method": "getObjectAcl", "data": [{ "id": "FOLDER_ID" }], "tid": 589}
Line by line:
"method": "getObjectAcl"names the action: get the object's ACL, meaning "tell me who currently has access to this folder"."data": [{ "id": "FOLDER_ID" }]passes the folder's identifier.FOLDER_IDis a placeholder for the real value."tid": 589is the tenant ID of the company making the request, here the researcher's own company.
The reply now contained a complete access entry for the stranger's account, a person with no relationship at all to the researcher's company:
{ "id": "512", "name": "V...", "first_name": "V...", "last_name": "...", "email": "[redacted]", "tenant_id": "184", "group_type": "Provider", "user_group_id": "512"}
Line by line:
"id": "512"is the identifier of this access entry."name": "V..."is the person's display name, shortened here to hide it."first_name": "V..."and"last_name": "..."are the person's first and last name, also shortened."email": "[redacted]"is their email address, with the start hidden. The domain shows it belongs to a different organisation."tenant_id": "184"is the internal number of the company that person belongs to, which is not the researcher's company."group_type": "Provider"describes the kind of account."user_group_id": "512"is the person's user ID, the same kind of number that was placed in the request.
So the response handed over the stranger's full name, email address and internal company number. The researcher notes that anyone could obtain this, as long as they can guess or enumerate a valid user ID and have at least one folder with FullControl in their own company.
Why it worked
The endpoint expects a single numeric user ID in user_group_id, but the backend does not treat the value as a single identifier. When the value contains a comma, the ownership check appears to validate only the last element of the list, while the rest of the processing acts on the other element, the stranger's ID. The request is therefore authorised on the strength of the attacker's own company user, and then applied to the stranger.
The researcher observed that the server appears to check only the last value in the field for ownership, while the request was still applied to the stranger's ID. The report notes a server-side ownership check confirming the target user is visible to or owned by the requesting company.
Impact
- Confidentiality: disclosure of PII (full name, email, internal tenant and user ID) belonging to users in unrelated tenants. PII means personally identifiable information: data that points to a specific real person.
- Integrity: the ability to add arbitrary external users to a folder's ACL, bypassing tenant isolation. Integrity here means the data can be changed by someone who should not be able to change it.
The attack requires a valid user_id in the target tenant, obtained by guessing or enumeration, and a folder under the attacker's FullControl in their own tenant.
Fix
The report does not state what was changed. The fix implied by the root cause is to treat user_group_id as a single scalar identifier: reject any value that is not exactly one numeric ID, and run the ownership check on that same parsed value that the write path uses, rather than on a substring or on the last element of a split list.
Variants to test
When a parameter takes a single ID and is rejected for an unauthorised value, the researcher suggests trying:
- Delimiter injection. Send multiple values separated by a comma, semicolon or pipe, for example
victim_id,tenant_user_id. A positive result is that the request is accepted where the single victim ID was denied, and that a follow-up read (such asgetObjectAcl) shows the victim's entry, including name, email and tenant ID. - Array injection. Send the parameter as an array, for example
["victim_id"]or{"id": ["a","b"]}. The researcher suggests trying the parameter as an array, for example["victim_id"]or{"id": ["a","b"]}.
The researcher noticed the response differed when a comma was sent in the parameter, which led to the bypass attempt.
Glossary
- ACL (Access Control List): a list attached to a file or folder saying who is allowed to do what with it.
- API (Application Programming Interface): a defined way for one program to ask another to do something, like a service counter with set forms.
- Backend: the server-side part of an application that does the real work, as opposed to what the user sees in the browser.
- Comma-injection / delimiter injection: putting a separator character such as a comma into a value so that a program splits it into several values when it expected one.
- Content-Type: a header in a request that says what format the body is in, for example JSON.
- Enumeration: trying many values in sequence, such as ID numbers, to discover which ones exist.
- FullControl: the highest permission level in this product, allowing a user to do everything with a folder, including managing who else has access.
- GET / POST: two types of HTTP request;
GETasks for something,POSTsends data to the server. - ID: a number or string that uniquely identifies one record, such as one user or one folder.
- IDOR (Insecure Direct Object Reference): a flaw where a program lets you reach an object, such as another user's record, just by supplying its identifier, without properly checking that you are allowed to.
- Integrity: the property that data can only be changed by those authorised to change it.
- JSON: a text format for structured data, built from curly brackets, square brackets, quoted names and values.
- JSON-RPC: a way of calling named actions on a server by sending JSON messages that contain a
methodname and itsdata. - Ownership check: a server-side test confirming that the thing being acted on belongs to, or is visible to, the organisation making the request.
- Parameter / field: one named value inside a request, such as
user_group_id. - PII (Personally Identifiable Information): data that identifies a specific real person, such as a name or email address.
- POST: an HTTP request type used to send data to the server.
- RPC (Remote Procedure Call): asking a server to run a named action, rather than just fetching a page.
- Scalar: a single value, as opposed to a list of values.
- Tenant: one customer organisation on a shared service, whose data is meant to be kept separate from other organisations'.
- Tenant isolation: the guarantee that one tenant cannot see or change another tenant's data.
- Token: a piece of text, often in a split list, produced by cutting a string on a separator.
- User ID: the number that identifies one user account.
- Vulnerability: a weakness in software that allows someone to make it behave in a way its owners did not intend.