Skip to content
Access control Write-up Intermediate

Bypass Admin approval, Mute Member and Posting Permissions for Only admins in Facebook groups

The Watch Party feature in Facebook groups did not check the group_id parameter against the user's permissions, so an attacker could create a Watch Party in a group where they were muted or where posting was restricted to admins. This allowed bypassing mute, admin approval, and posting permissions.

Sarmad Hassan Follow

Published on medium.com

Security

Sarmad Hassan (Juba Baghdad), 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Facebook groups have a feature called Watch Party. As the report describes it, the feature lets group admins, and even normal members, pick any public video on Facebook and show it to other members at the same time, with a dedicated comment reel, to create a "shared viewing experience".

This is how Watch Party Option looks like From the original on medium.com

This is how Watch Party Option looks like

The write-up covers three ways the Watch Party creation flow could be abused against a group the attacker does not control: bypassing a mute placed on the attacker, bypassing post approval, and bypassing posting permissions restricted to admins only.

Setup

The researcher used two test groups and two accounts:

  1. A first test group, referred to as "MyTestGroup", used from the account of Sarmad Hassan.
  2. A second test group named Noobs, used as the victim group, from a second test account running in a virtual machine.

Requests were intercepted and modified with Burp Suite. The work was motivated by the Facebook June Whitehat Promotion, announced on 1 June 2018, which offered two researchers a free trip to Defcon in Vegas for the best quality report and highest reward value. The researcher picked the target area from a personal Facebook notes document listing areas to dig into.

My Facebook Document Notes where I put everything related to facebook for future hunting From the original on medium.com

My Facebook Document Notes where I put everything related to facebook for future hunting

Finding it

From the Sarmad Hassan account, the researcher opened the first test group, clicked on the Watch Party option to make a post, and intercepted the request in Burp Suite. The request looked like this:

HTTP
POST /api/graphql/ HTTP/1.1
variables={"input":{"client_mutation_id":"2","actor_id":"userID","composer_session_id":"SESSIONID","creator_actor_id":"actorID","custom_name":null,"group_id":"MyTestGroupID","video_ids":["VIDEO-ID"]}}&doc_id=doc-id

The group_id parameter stood out. The mutation is a GraphQL call, group_living_room_create, that creates a Watch Party session (a LivingRoomSession) for a group, and the group it targets is supplied by the client in the request body rather than being tied to the group the composer was opened from.

Exploitation

Step 1: creating a Watch Party in a group from another group's composer

The researcher changed the value of group_id from the first test group's ID to the ID of the second test group, Noobs, of which the account was a member. The Watch Party post was created in Noobs. The response was:

JSON
{
 "data": {
 "group_living_room_create": {
 "client_mutation_id": "2",
 "living_room": {
 "__typename": "LivingRoomSession",
 "id": "id of the video party"
 }
 }
 }
}

So the server accepted a group_id that did not match the context the request was made from, and returned the ID of the created video party.

Step 2: bypassing a mute

To test whether group moderation applied to this flow, the researcher switched to the second test account in the virtual machine, opened the victim group Noobs, went to the Members tab, clicked on Sarmad Hassan (the attacker user) and muted him. A muted member cannot make posts in the group.

Admin of Victim Group (Noobs) Muted the attacker Sarmad Hassan From the original on medium.com

Admin of Victim Group (Noobs) Muted the attacker Sarmad Hassan

Back on the first test group, from the Sarmad Hassan account, the researcher made a Watch Party post and changed group_id to the victim group ID (Noobs). It worked: despite the mute, the attacker could still create a Watch Party video in the victim group. The mute was bypassed.

Step 3: bypassing post approval and admin-only posting permissions

Next, the researcher went back to the Noobs group and, in group settings, enabled:

  • Post Approval: all group posts must be approved by an admin or a moderator.
  • Posting Permissions: only admins.

With these options set, no one else should be able to make any post, and with posting permissions set to anyone, all posts should be approved by an admin.

The Graph API call was taken again from the first test group, from the Sarmad Hassan account, and the group_id parameter was changed to the victim group ID (Noobs). The response was:

JSON
{
 "data": {
 "group_living_room_create": {
 "client_mutation_id": "2",
 "living_room": {
 "__typename": "LivingRoomSession",
 "id": "199255894077754"
 }
 }
 }
}

Here "id": "199255894077754" is the ID of the Watch Party room. The attacker can then go to:

Text
https://www.facebook.com/groups/[group-id]/wp/[watch party room id]

and watch the video and invite all group members to see it. Both protections set by the admin of the victim group were bypassed: the post was created without approval and despite posting being restricted to admins.

Root cause

The group_living_room_create mutation accepted a client-supplied group_id and created a session in a group where the actor was muted or restricted. The report does not explain why the checks were not applied to this path.

Impact

An attacker who is a member of a group can create Watch Party posts in that group even when the group admin has muted them, has required admin or moderator approval for all posts, or has restricted posting to admins only. The created room is reachable at the group's Watch Party URL, and the attacker can invite all group members to watch the video. The report frames this as a way to make a post in a group without the admin's approval, defeating protections the admin deliberately configured.

Fix

The report's timeline records the remediation:

  • June 03, 2018: initial report
  • June 14, 2018: report triaged
  • June 27, 2018: first two impacts fixed
  • July 17, 2018: complete fix
  • July 18, 2018: fix confirmed
  • July 18, 2018: bounty awarded
From the original on medium.com

The report does not describe the code change itself.

Variants to test

  1. Other GraphQL mutations that take a group_id. Create the object from one group's composer and swap group_id to a group where you are muted or restricted. A positive result is a successful response containing a created object for the target group.
  2. Mute bypass on other content types. With a member muted, attempt to create each kind of group content (posts, live sessions, events, files). A positive result is any content appearing in the group despite the mute.
  3. Post approval bypass. With post approval required, submit content through non-standard creation paths and check whether it appears without moderator action. A positive result is content visible to members without approval.
  4. Admin-only posting bypass. With posting permissions set to admins only, repeat the same swap. A positive result is content created by a non-admin account.
  5. Cross-group object references. Where a mutation accepts both a container ID and a content ID (such as group_id and video_ids), mix IDs from different groups and observe whether the server validates the relationship. A positive result is a session created with content the caller should not be able to attach.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

Facebook groups have a feature called Watch Party. As the report describes it, the feature lets group admins, and even normal members, pick any public video on Facebook and show it to other members at the same time, with a dedicated comment reel, to create a "shared viewing experience".

This is how Watch Party Option looks like From the original on medium.com

This is how Watch Party Option looks like

A group admin has a set of tools to keep order in their group. They can mute a member, so that member cannot post. They can require that every post be approved by an admin or moderator before it appears. They can restrict posting so that only admins may post. These are the group's rules, and members are supposed to be bound by them.

The researcher found that the Watch Party creation flow did not apply these rules. A member who had been muted could still create a Watch Party in the group. A member whose posts needed approval could create a Watch Party without any approval. A member in a group where only admins may post could still create a Watch Party. The write-up covers these three ways the Watch Party creation flow could be abused against a group the attacker does not control.

To understand how, you need one idea: when you click a button in a web page, your browser sends a message to Facebook's computers asking them to do something. That message is called a request. Some requests carry information that the server trusts, and if a person can change that information before it arrives, they can sometimes make the server do something it should not. That is the heart of this bug.

Setting up the test

The researcher used two test groups and two accounts:

  1. A first test group, referred to as "MyTestGroup", used from the account of Sarmad Hassan.
  2. A second test group named Noobs, used as the victim group, from a second test account running in a virtual machine.

A virtual machine is a computer running inside another computer, like a second, separate machine on your desk. Researchers use one so that the "victim" account and the "attacker" account are cleanly separated, as if two different people on two different computers were using Facebook.

Requests were intercepted and modified with Burp Suite. Burp Suite is a tool that sits between your browser and the website. When your browser sends a request, Burp catches it and lets you read it, change it, and then forward it on. Think of it as a postal worker who lets you open a letter, rewrite part of it, and seal it again before delivery. Without a tool like this, you only see the web page; with it, you see the actual messages underneath.

The work was motivated by the Facebook June Whitehat Promotion, announced on 1 June 2018, which offered two researchers a free trip to Defcon in Vegas for the best quality report and highest reward value. Defcon is a well-known security conference. The researcher picked the target area from a personal Facebook notes document listing areas to dig into.

My Facebook Document Notes where I put everything related to facebook for future hunting From the original on medium.com

My Facebook Document Notes where I put everything related to facebook for future hunting

Keeping a list of features to examine is a simple habit: Facebook has many features, and a written list stops you from forgetting the ones you meant to look at.

Finding it

From the Sarmad Hassan account, the researcher opened the first test group, clicked on the Watch Party option to make a post, and intercepted the request in Burp Suite. The request looked like this:

HTTP
POST /api/graphql/ HTTP/1.1
variables={"input":{"client_mutation_id":"2","actor_id":"userID","composer_session_id":"SESSIONID","creator_actor_id":"actorID","custom_name":null,"group_id":"MyTestGroupID","video_ids":["VIDEO-ID"]}}&doc_id=doc-id

Let us go through this line by line.

  • POST /api/graphql/ HTTP/1.1 is the first line of the request. POST is the type of request used when you are sending data to the server, as opposed to just asking for a page. /api/graphql/ is the address on Facebook's servers that handles it. HTTP/1.1 is the version of the language the browser and server use to talk. An API, by the way, is simply a way for one piece of software to ask another to do something, without a human clicking. When the Watch Party button sends this request, it is using Facebook's API.
  • variables={...} is the part of the request that carries the details. It is written in JSON, a text format for structured data: curly braces group things, and each entry has a name and a value.
  • "client_mutation_id":"2" is an identifier the browser attaches to this particular action. A mutation, in GraphQL (Facebook's API style), is a request that changes something, such as creating a post. The ID helps match the response to the request.
  • "actor_id":"userID" is the ID of the user performing the action. A user ID is a number that identifies an account.
  • "composer_session_id":"SESSIONID" is a session identifier. A session is the server's memory of you being logged in; the session ID is like a wristband at an event that proves you are allowed in. If someone else gets it, they can act as you, which is why it is sensitive.
  • "creator_actor_id":"actorID" is the ID of the account creating the Watch Party.
  • "custom_name":null means no custom name was given. null is the JSON way of saying "nothing".
  • "group_id":"MyTestGroupID" is the important one. It tells the server which group the Watch Party is for. This is the value the researcher later changed.
  • "video_ids":["VIDEO-ID"] is a list (the square brackets) of video IDs to show in the party. Here there is one video.
  • &doc_id=doc-id is another parameter, separated by &, that names the specific GraphQL operation being run.

The group_id parameter stood out. The mutation is a GraphQL call, group_living_room_create, that creates a Watch Party session (a LivingRoomSession) for a group, and the group it targets is supplied by the client in the request body rather than being tied to the group the composer was opened from. In plain terms: the browser tells the server which group to use, and the server appears to believe it. A safer design would have the server work out the group from the page you were on, or check that the group you named is one you are allowed to post in.

Exploitation

Step 1: creating a Watch Party in a group from another group's composer

The researcher changed the value of group_id from the first test group's ID to the ID of the second test group, Noobs, of which the account was a member. The Watch Party post was created in Noobs. The response was:

JSON
{
 "data": {
 "group_living_room_create": {
 "client_mutation_id": "2",
 "living_room": {
 "__typename": "LivingRoomSession",
 "id": "id of the video party"
 }
 }
 }
}

Line by line:

  • "data" is the container for the server's answer.
  • "group_living_room_create" is the name of the operation that was run, matching the mutation.
  • "client_mutation_id": "2" echoes back the identifier from the request, so the browser knows which action this answer belongs to.
  • "living_room" is the object that was created. "__typename": "LivingRoomSession" says what kind of object it is: a Watch Party session.
  • "id": "id of the video party" is the identifier of the new party. The report shows this placeholder rather than the real value.

So the server accepted a group_id that did not match the context the request was made from, and returned the ID of the created video party. The researcher had started the action in one group and told the server to put the result in another. The server did not object.

Step 2: bypassing a mute

To test whether group moderation applied to this flow, the researcher switched to the second test account in the virtual machine, opened the victim group Noobs, went to the Members tab, clicked on Sarmad Hassan (the attacker user) and muted him. A muted member cannot make posts in the group.

Admin of Victim Group (Noobs) Muted the attacker Sarmad Hassan From the original on medium.com

Admin of Victim Group (Noobs) Muted the attacker Sarmad Hassan

This step is the control in the experiment. Before claiming that a rule was bypassed, you first set the rule and confirm it is in place. The mute is the rule; the question is whether the Watch Party path respects it.

Back on the first test group, from the Sarmad Hassan account, the researcher made a Watch Party post and changed group_id to the victim group ID (Noobs). It worked: despite the mute, the attacker could still create a Watch Party video in the victim group. The mute was bypassed.

Why does this matter? A mute is an admin's way of saying "this person may not post here". If one kind of post slips past the mute, the admin's decision is not being enforced. The researcher did not need any special access: the same account that had been muted simply used a different creation path.

Step 3: bypassing post approval and admin-only posting permissions

Next, the researcher went back to the Noobs group and, in group settings, enabled:

  • Post Approval: all group posts must be approved by an admin or a moderator.
  • Posting Permissions: only admins.

With these options set, no one else should be able to make any post, and with posting permissions set to anyone, all posts should be approved by an admin. These two settings are the strongest form of "nobody posts here but me and my moderators". They are what an admin uses when the group is being flooded or when they want tight control.

The Graph API call was taken again from the first test group, from the Sarmad Hassan account, and the group_id parameter was changed to the victim group ID (Noobs). The response was:

JSON
{
 "data": {
 "group_living_room_create": {
 "client_mutation_id": "2",
 "living_room": {
 "__typename": "LivingRoomSession",
 "id": "199255894077754"
 }
 }
 }
}

This is the same shape of answer as before, with one difference: the "id" value is a real-looking number, 199255894077754. Here "id": "199255894077754" is the ID of the Watch Party room. The server created the room in the victim group even though the group required approval and allowed only admins to post.

The attacker can then go to:

Text
https://www.facebook.com/groups/[group-id]/wp/[watch party room id]

This is a web address. https://www.facebook.com is the site. /groups/ is the part of the site for groups. [group-id] is a placeholder for the group's number, and /wp/ marks the Watch Party area, followed by [watch party room id], the number returned in the response. In the real attack those placeholders are filled with the victim group's ID and the room ID from the answer above.

At that address the attacker can watch the video and invite all group members to see it. Both protections set by the admin of the victim group were bypassed: the post was created without approval and despite posting being restricted to admins. The attacker can invite all group members to watch the video.

Root cause

The group_living_room_create mutation accepted a client-supplied group_id and created a session in a group where the actor was muted or restricted. The report does not explain why the checks were not applied to this path.

A useful comparison is a building with a front door where a guard checks your badge. The guard is the normal posting flow. The Watch Party path is a side door that nobody thought to staff. The badge check exists, but not at that door. The fix is to put the same check at every door.

Impact

An attacker who is a member of a group can create Watch Party posts in that group even when the group admin has muted them, has required admin or moderator approval for all posts, or has restricted posting to admins only. The created room is reachable at the group's Watch Party URL, and the attacker can invite all group members to watch the video. The report frames this as a way to make a post in a group without the admin's approval, defeating protections the admin deliberately configured.

For a group admin, this is the frustrating part: the settings look correct, the interface says the group is locked down, and yet content can still appear. For a member, it means the rules they see are not the whole story.

Fix

The report's timeline records the remediation:

  • June 03, 2018: initial report
  • June 14, 2018: report triaged
  • June 27, 2018: first two impacts fixed
  • July 17, 2018: complete fix
  • July 18, 2018: fix confirmed
  • July 18, 2018: bounty awarded
From the original on medium.com

"Triaged" means the security team reviewed the report and accepted it as a real issue worth working on. A bounty is the payment a company gives a researcher for a valid report.

The report does not describe the code change itself.

Variants to test

These are follow-up ideas in the same spirit, useful if you want to look for similar bugs yourself. Each one starts from the same observation: a value the browser sends is trusted by the server.

  1. Other GraphQL mutations that take a group_id. Create the object from one group's composer and swap group_id to a group where you are muted or restricted. A positive result is a successful response containing a created object for the target group.
  2. Mute bypass on other content types. With a member muted, attempt to create each kind of group content (posts, live sessions, events, files). A positive result is any content appearing in the group despite the mute.
  3. Post approval bypass. With post approval required, submit content through non-standard creation paths and check whether it appears without moderator action. A positive result is content visible to members without approval.
  4. Admin-only posting bypass. With posting permissions set to admins only, repeat the same swap. A positive result is content created by a non-admin account.
  5. Cross-group object references. Where a mutation accepts both a container ID and a content ID (such as group_id and video_ids), mix IDs from different groups and observe whether the server validates the relationship. A positive result is a session created with content the caller should not be able to attach.

Glossary

  • API: a way for one piece of software to ask another to do something, without a human clicking buttons.
  • Burp Suite: a tool that sits between your browser and a website, letting you read and change requests before they are sent.
  • Bypass: getting past a rule or check that is supposed to stop you.
  • Composer: the box or page where you write and submit a post.
  • GraphQL: a style of API where the request names the exact operation and the data it needs, often in JSON.
  • HTTP: the language browsers and web servers use to exchange requests and responses.
  • Impact: the real-world effect of a bug, such as content appearing where it should not.
  • JSON: a text format for structured data, using curly braces, names and values.
  • Moderator: a group member given extra powers by an admin, such as approving posts.
  • Mutation: in GraphQL, a request that changes something, such as creating a post or a session.
  • Mute: a group setting that stops a member from posting.
  • Parameter: a named value inside a request, such as group_id.
  • POST: an HTTP request type used to send data to a server.
  • Post approval: a group setting requiring an admin or moderator to approve each post before it appears.
  • Posting permissions: a group setting controlling who may post, for example admins only.
  • Request: the message your browser sends to a server asking it to do something.
  • Response: the message the server sends back.
  • Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
  • Session: the server's memory of you being logged in; the session ID is like a wristband proving it.
  • Token: a short piece of text that proves identity or permission; it must be kept secret.
  • Triaged: reviewed and accepted by a security team as a real issue.
  • Virtual machine: a computer running inside another computer, used to keep test accounts separate.
  • Watch Party: a Facebook groups feature for watching a public video together, with a shared comment reel.
  • Whitehat: a security researcher who finds bugs and reports them to the company rather than misusing them.

More by Sarmad Hassan

View all

6 more disclosed reports, best first.

More from Meta

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.