IDOR leads to removing members from any Google Chat Space.
A Google Chat Space member-removal request accepted arbitrary Space and user identifiers, so an attacker could remove the Space Manager or any member from any Space. The author states this let an attacker remove members from spaces they did not belong to.
September 06, 2022
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
Google Chat Spaces are shared rooms inside Google Chat. When someone creates a Space, they automatically become the Space Manager. The feature under examination here is member management: a Space Manager, or anyone with the right permissions, can open the member list and remove a member from the Space.
The removal action is performed by the web client through an internal batchexecute endpoint on chat.google.com. The request carries the Space ID and the user ID of the member to remove. By changing the Space ID and user ID, the researcher could remove members from any Space.
Setup
The report does not describe any special accounts, tools or versions. The only precondition shown is an authenticated Google account with access to Google Chat in the browser, since the steps start from the Chat web interface at https://mail.google.com/chat/u/0/#chat/space/. The researcher used an intercepting proxy to capture and modify the removal request.
Finding it
The member removal request sent by the Chat web client contains both the Space ID and the target user ID. Changing them lets an attacker remove members from any Space.
Exploitation
Step 1: Open the Chat Space
Navigate to the Chat web interface:
https://mail.google.com/chat/u/0/#chat/space/
Step 2: Capture the removal request
Open View Members, click Remove from space on a member, and intercept the outgoing request. The captured request is:
POST /u/0/_/DynamiteWebUi/data/batchexecute?rpcids=itoCId&source-path=%2Fu%2F0%2Fmole%2Fworld&f.sid=2214863011575308312&bl=boq_dynamiteuiserver_20220624.01_p0&hl=en&soc-app=1&soc-platform=1&soc-device=1&_reqid=14582833&rt=c HTTP/2
Host: chat.google.com
[[["itoCId","[[],["space/AAAAuypwSbs","AAAAuypwSbs",2],4,[["user/105599426893724266332",null,"105599426893724266332",null,["105599426893724266332","human/105599426893724266332",0],"user/human/105599426893724266332"]],null,null,[]]",null,"generic"]]]&at=ALDO5-NfcbsvAFhduORqxN84kZGt:1656869432201&
The important parts of this request are:
- The
rpcids=itoCIdquery parameter, which selects the backend RPC that performs the removal. - The
atquery parameter, which carries the caller's authorisation token. - The request body, a nested JSON array in which the Space ID appears as
space/AAAAuypwSbsand the target user ID appears asuser/105599426893724266332(repeated several times in the same structure).
Step 3: Replace the identifiers
Replace the user ID and the Space ID in the body with the victim's user ID and Space ID, then send the request. The report does not show the modified request, only the original one.
Step 4: Observe the result
The victim is removed from the Space.


Root cause
The server accepted the Space ID and user ID from the request body and acted on them without confirming that the authenticated caller was a member of, or manager in, the referenced Space. The report does not include any server-side code, so the exact check that was missing is not shown; the behaviour is consistent with a missing object-level authorisation check on the Space and user pair.
Impact
An attacker with an authenticated Google Chat account could remove the Space Manager and members from any Space, provided they knew or could obtain the target Space ID and the victim's user ID. The removal is a destructive action against other users' Spaces, including Spaces the attacker does not belong to.
Fix
Google confirmed a fix on 14-08-2022.
Timeline
| Event | Date |
|---|---|
| Reported | 04-07-2022 |
| Triaged | 04-07-2022 |
| Accepted | 04-07-2022 |
| Rewarded | 19-07-2022 |
| Fix confirmed | 14-08-2022 |
The bounty was 3133.70 USD.
Variants to test
- Other member-management RPCs. Capture requests for adding members, changing roles, renaming a Space or deleting a Space, and swap the Space ID and user ID. A positive result is the action succeeding on a Space the test account does not belong to.
- Other
batchexecuteRPCs. The same client-supplied identifier pattern may appear in other RPCs on the same endpoint. Change the identifiers and look for a response that reflects or acts on another user's object. - Role changes rather than removal. Try promoting or demoting a user in a Space the test account does not manage. A positive result is a role change taking effect for a user outside the caller's Space.
- Identifier formats. The payload repeats the user ID in several positions (
user/...,human/...). Change only some of them to see which one the server actually validates, if any. - Cross-tenant or cross-organisation Spaces. If the product supports organisation-scoped Spaces, test whether the same swap works across organisations, which would widen the impact beyond individual users.
What happened, in plain words
Google Chat lets people create shared rooms called Spaces. Think of a Space as a group chat room, similar to a group conversation in any messaging app. When you create a Space, you automatically become its Space Manager, which is the person in charge of that room. A Space Manager can open the list of members and remove someone from the Space.
The researcher found that the request the browser sends when a manager removes a member contained two pieces of information: which Space the removal is for, and which user should be removed. Those two values were supplied by the browser, and by changing them an attacker could remove members from any Space. By swapping in a different Space ID and a different user ID, an attacker could remove the Space Manager or any member from any Space, including Spaces they had nothing to do with.
This kind of flaw is called an IDOR, which stands for Insecure Direct Object Reference. In everyday terms: imagine a hotel where the key card for room 101 also opens room 102, 103 and every other room, because the door only checks that you have a key card, not that it is your room's card. The door trusts the room number written on the card instead of checking who you are. Here, the server trusted the Space ID and user ID written in the request instead of checking whether the caller was allowed to act on them.
Background concepts, from zero
Before walking through the steps, here are the ideas you need.
- API: An API (Application Programming Interface) is the set of addresses and rules a program uses to talk to a server. When you click a button in a web app, the app quietly sends a message to the server asking it to do something. That message is an API request. Think of it as a waiter taking your order to the kitchen: you do not walk into the kitchen yourself, you tell the waiter what you want and the waiter relays it.
- Request: The message the browser sends to the server. It has a method (like
POST, meaning "please create or change something"), a URL (the address), sometimes a body (the data being sent), and headers (extra information about the message). - Endpoint: A specific address on a server that accepts requests, for example
chat.google.comwith a particular path. Think of it as a specific counter in a large office building. batchexecute: This is the name of an internal endpoint Google's web apps use to send several actions to the server in one go. The name is a clue: "batch" plus "execute". The browser bundles up an action and posts it here.- RPC: Remote Procedure Call. It means "ask the server to run a specific function for me". In this request, the function being asked for is identified by the code
itoCId, which is the removal action. - Token (here, the
atparameter): A token is a short string that proves who you are, like a wristband at an event. The server gave it to you when you logged in, and you show it with every request so the server knows it is you. It is a secret: anyone who has your token can act as you. - Space ID: A unique identifier for a particular Space. Every Space has one, just as every house has an address.
- User ID: A unique identifier for a particular Google account. Every user has one.
- IDOR (Insecure Direct Object Reference): A vulnerability where the server accepts an identifier (like a Space ID or user ID) from the client and acts on it without checking that the client is allowed to touch that object. The fix is always the same idea: the server must check permissions on the specific object being referenced, not just that the caller is logged in.
- Intercepting proxy: A tool that sits between your browser and the server, letting you pause a request, look at it, change it, and then send it on. Think of it as a mailroom where you can open an envelope, swap the contents, and reseal it before it goes out.
The vulnerable request
Here is the request the browser sends when a Space Manager removes a member. The researcher captured it with an intercepting proxy.
POST /u/0/_/DynamiteWebUi/data/batchexecute?rpcids=itoCId&source-path=%2Fu%2F0%2Fmole%2Fworld&f.sid=2214863011575308312&bl=boq_dynamiteuiserver_20220624.01_p0&hl=en&soc-app=1&soc-platform=1&soc-device=1&_reqid=14582833&rt=c HTTP/2
Host: chat.google.com
[[["itoCId","[[],["space/AAAAuypwSbs","AAAAuypwSbs",2],4,[["user/105599426893724266332",null,"105599426893724266332",null,["105599426893724266332","human/105599426893724266332",0],"user/human/105599426893724266332"]],null,null,[]]",null,"generic"]]]&at=ALDO5-NfcbsvAFhduORqxN84kZGt:1656869432201&
Line by line, in plain words:
POST /u/0/_/DynamiteWebUi/data/batchexecute?...is the address being called.POSTmeans "please change something". The path ends inbatchexecute, the internal endpoint described above.rpcids=itoCIdtells the server which action to run.itoCIdis the internal code for "remove this user from this Space".source-path=%2Fu%2F0%2Fmole%2Fworldis just a note about which page the request came from (the%2Fsequences are slashes encoded for a URL).f.sid=...,bl=...,hl=en,soc-app=1,soc-platform=1,_reqid=...,rt=care housekeeping parameters the web app adds automatically. They tell the server things like the language and which build of the client is calling. They are not the interesting part.Host: chat.google.comsays which server the request is going to.- The body is a nested list of values (JSON, a common data format). Inside it you can see
space/AAAAuypwSbs, which is the Space ID, anduser/105599426893724266332, which is the user ID of the member being removed. The user ID appears several times in slightly different forms (user/...,human/...), because the client repeats it in different positions of the structure. at=ALDO5-NfcbsvAFhduORqxN84kZGt:1656869432201is the caller's authorisation token. This is what tells the server who is asking. It is a secret and must never be shared.
The key observation: the Space ID and the user ID are both supplied by the browser. If the server trusts them without checking the caller's permissions, an attacker can change them.
Steps to reproduce
The researcher's steps, with the reasoning behind each one.
-
Go to the Chat web interface. The address used is:
Text https://mail.google.com/chat/u/0/#chat/space/This is just the normal Google Chat page in a browser. The researcher started here to make the browser produce a genuine removal request, so that the captured request would be exactly what a real user sends.
-
Open View Members, click Remove from space on a member, and intercept the request. The point of this step is to make the browser send the removal request so it can be captured. The intercepting proxy pauses the request before it reaches the server, so the researcher can inspect and edit it. Without this step, there would be nothing to modify.
-
Replace the user ID and the Space ID with the victim's user ID and Space ID, then send the request. This is the actual attack. The attacker keeps their own valid token (so the server still thinks the request comes from a logged-in user) but changes the two identifiers to point at someone else's Space and someone else's account. If the server only checks "is this a logged-in user?" and not "is this user allowed to remove that person from that Space?", the removal goes through.
-
The victim is removed from the Space. The result confirms the flaw: the action succeeded on a Space the attacker was not authorised to manage.


The two screenshots accompany the reproduction steps and the timeline.
Why it worked
The server accepted the Space ID and user ID from the request body and acted on them without confirming that the caller was a member of, or manager in, the referenced Space. In other words, the server asked "who are you?" (answered by the token) but not "are you allowed to do this to this Space and this user?".
The report does not include any server-side code, so the exact check that was missing is not shown. The behaviour is consistent with a missing object-level authorisation check on the Space and user pair.
Impact
An attacker with an authenticated Google Chat account could remove the Space Manager and members from any Space, provided they knew or could obtain the target Space ID and the victim's user ID. The report does not describe how those identifiers would be obtained, nor does it state whether the attacker needed any prior relationship with the Space. The removal is a destructive action against other users' Spaces, including Spaces the attacker does not belong to.
Fix
Google confirmed a fix on 14-08-2022. The report does not describe what was changed.
Timeline
| Event | Date |
|---|---|
| Reported | 04-07-2022 |
| Triaged | 04-07-2022 |
| Accepted | 04-07-2022 |
| Rewarded | 19-07-2022 |
| Fix confirmed | 14-08-2022 |
The bounty was 3133.70 USD.
Variants to test
If you are learning from this report, here are related things a tester would try next. Each one is the same idea (swap an identifier) applied to a different action.
- Other member-management actions. Capture requests for adding members, changing roles, renaming a Space or deleting a Space, and swap the Space ID and user ID. A positive result is the action succeeding on a Space the test account does not belong to.
- Other
batchexecuteactions. The same client-supplied identifier pattern may appear in other actions on the same endpoint. Change the identifiers and look for a response that reflects or acts on another user's object. - Role changes rather than removal. Try promoting or demoting a user in a Space the test account does not manage. A positive result is a role change taking effect for a user outside the caller's Space.
- Identifier formats. The payload repeats the user ID in several positions (
user/...,human/...). Change only some of them to see which one the server actually validates, if any. - Cross-organisation Spaces. If the product supports organisation-scoped Spaces, test whether the same swap works across organisations, which would widen the impact beyond individual users.
Glossary
- API: The set of addresses and rules a program uses to talk to a server, so the program can ask the server to do things without the user doing them by hand.
- Request: The message a browser sends to a server, containing a method, an address, headers and sometimes a body.
- Endpoint: A specific address on a server that accepts requests.
batchexecute: An internal Google endpoint used by web apps to send actions to the server in a batch.- RPC: Remote Procedure Call; asking the server to run a specific named function.
- Token: A short secret string that proves who you are to the server, like a wristband at an event.
- Space ID: A unique identifier for a particular Google Chat Space.
- IDOR (Insecure Direct Object Reference): A flaw where the server accepts an identifier from the client and acts on it without checking that the client is allowed to touch that object.
- Intercepting proxy: A tool that sits between browser and server so you can pause, inspect and edit requests.
- JSON: A common text format for structured data, using brackets and quotes.
- Space Manager: The person in charge of a Google Chat Space, automatically the creator.
- Authorisation check: The server-side decision about whether a logged-in user is allowed to perform a particular action on a particular object.
- Bounty: A payment made by a company to a researcher who reports a valid security flaw.
- Triaged: The stage where a company has reviewed a report and confirmed it is worth investigating.