Skip to content
Access control Write-up Intermediate

Unremovable facebook group admin

A group admin could link an unpublished Facebook page to a group, making it an admin that the group creator could not remove on mobile versions. This allowed the attacker to retain admin access even after being removed as a personal admin.

Ritish Kumar Singh Follow

Published on medium.com

Bounty$500 View original

Hello readers, welcome again. Today I am going to share the details of a recent vulnerability I caught in Facebook Groups.

Ritish Kumar Singh, 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 lets people create a group and manage it. The report deals with two related features: linking a Facebook page to a group, and managing the group while interacting as that page instead of as a personal profile. The researcher links to Facebook's own help pages for Groups and for pages.

The report sets out three points about how groups normally behave:

  1. Group Creator: a group creator can add any number of admins and moderators, and the creator cannot be removed by other admins.
  2. Linked Page: admins can link their Facebook page to the group and manage the group by interacting as the page instead of their personal profile.
  3. Published page: the contents of a published page are always visible to the public, while an unpublished page is not visible to the public and is only visible to the people who manage the page.

The weakness is a logic flaw: an unpublished page can be added as a group admin and then cannot be removed by the group creator or by other admins.

Setup

The reproduction needs:

  • 2 Facebook accounts (Admin1, Admin2)
  • A Facebook page (Admin2 is admin)

Admin1 is the original creator of the group and cannot be removed by other admins. Admin2 is the attacker and must already be a group admin. The researcher tested on multiple versions of Facebook; the behaviour was present on all versions except the Desktop version, so only mobile users were affected.

Finding it

The idea came from unpublished pages. The researcher asked: if a group creator is not an admin on my page, and I link my page to the group and unpublish it, will the creator be able to see my page in the list of admins?

The first test was done on a phone. The group creator was able to see the page in the "Admins list". The researcher then clicked the "remove" button, and the group creator always encountered an error message while removing the unpublished page as an admin. The same test on multiple versions was vulnerable on all of them except the Desktop version.

From the original on medium.com

The screenshot shows the error the group creator hit when trying to remove the unpublished page as an admin. The researcher notes that this happened on every version tested except Desktop.

Exploitation

Step 1: create the group

Admin1 creates a Facebook group and is the original creator, who cannot be removed by other admins.

Step 2: add the attacker as admin

Admin1 adds Admin2 as an admin. Admin2 is the attacker.

Step 3: link the page to the group

Admin2 links his page to the group, following the flow described in Facebook's help page on linking a page.

Step 4: unpublish the page

Admin2 unpublishes the page. An unpublished page is not visible to the public and is only visible to the people who manage it.

Step 5: try to remove the page as admin

Admin1 accesses the group on any version of Facebook except the desktop version and cannot remove the page as an admin. The removal attempt produces an error message, as shown in the screenshot above.

Root cause

The report does not describe the code or the check that failed. What it establishes is the behaviour: the removal path for an admin that is an unpublished page fails, while the page still appears in the admins list. The report does not explain why the removal fails.

Impact

  1. A malicious group admin can add an unpublished page as an admin which cannot be removed by other admins and the group creator.
  2. Since a linked page is always an admin, all the people who manage the page can access the admin tools. If the malicious admin is kicked out as an admin on the group, he can still access the admin tools of the group by publishing the page whenever he wants and unpublishing it again.

There are two limits:

  1. The attacker must already be a group admin.
  2. It was not vulnerable on the desktop version, so only mobile users were affected.

Fix

The report states that Facebook fixed the vulnerability and that it can no longer be reproduced. The timeline is:

Date Event
Nov. 25 Report sent
Dec. 04 Reproduced by Facebook
Dec. 05 Triaged
Jan. 03 Fixed
Jan. 03 Researcher confirmed the fix
Jan. 15 Bounty of $500 awarded

Variants to test

The report does not list variants. The following are concrete things to try on comparable products, based on the same idea:

  1. Unpublished or hidden entity as a privileged member. Add an entity that is not publicly visible (an unpublished page, a hidden service account, a disabled bot) as an admin or member of a group, team or workspace, then try to remove it from every client. A positive result is that the entity stays in the member list and removal returns an error, while the entity still has access to admin tools.
  2. State change after linking. Link an entity to a group, then change its visibility state (publish or unpublish, enable or disable). A positive result is that the removal path behaves differently depending on the state, and the entity can be re-enabled later to regain access.
  3. Client parity. Repeat the removal on web, mobile web and native apps. A positive result is that one client rejects the removal while another accepts it, which points to a check that exists on only one path.
  4. Re-entry after removal. Remove the attacker as an admin, then have the attacker change the state of the linked entity. A positive result is that the attacker regains access to the group's admin tools without being re-added.

Summary

This vulnerability has been fixed by Facebook and cannot be reproduced anymore. The researcher thanks the Facebook security team for the bounty and for allowing participation in their Bug Bounty Program.

From the original on medium.com

This story is published in Noteworthy, where 10,000+ readers come every day to learn about the people & ideas shaping the products we love.

Follow our publication to see more product & design stories featured by theJournalteam.

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. 10 min read.

What happened, in plain words

Facebook Groups are places where people gather around a topic, and each group has people in charge. The person who made the group is called the creator, and the creator can appoint other people as admins, who help run the group. Facebook also lets a group be managed by a Facebook page (a public profile for a business, a brand or a person) instead of by a personal profile. An admin can link their page to the group and manage the group while acting as the page.

A page can be published or unpublished. A published page is visible to everyone. An unpublished page is hidden from the public and only the people who manage it can see it.

The researcher wondered what happens when an unpublished page is linked to a group as an admin. He tested it on a phone and found that the group creator could see the page in the list of admins, but when the creator pressed the button to remove it, the removal always failed with an error message. The page stayed an admin. The same thing happened on every version of Facebook he tried except the desktop version.

This is a logic flaw: nothing crashes and no password is stolen, but the rules of the product do not add up. A page that is supposed to be hidden can be planted as a permanent admin, and the people who run the group cannot get rid of it. The researcher reported it, Facebook fixed it, and he was paid a bounty of 500 US dollars.

The features involved

Two Facebook features sit at the centre of this report.

Groups. A group is a shared space with members and with people who manage it. The report links to Facebook's own help page for Groups. Inside a group there are roles:

  1. Group Creator: the person who made the group. The creator can add any number of admins and moderators, and other admins cannot remove the creator.
  2. Linked Page: admins can link their Facebook page to the group and then manage the group while acting as the page instead of as their personal profile.
  3. Published page: the contents of a published page are always visible to the public. An unpublished page is not visible to the public; only the people who manage the page can see it.

The report also links to Facebook's help page about pages for background on what a page is.

A useful everyday comparison: think of a group as a club, the creator as the founder, and admins as committee members. A linked page is like a company that sits on the committee through its representative. An unpublished page is a company that has not yet opened its doors to the public, so outsiders should not even know it exists.

The setup

To reproduce the behaviour, the researcher needed:

  • 2 Facebook accounts (Admin1, Admin2)
  • A Facebook page (Admin2 is admin)

Admin1 plays the honest group creator, the person who cannot be removed by other admins. Admin2 plays the attacker, and Admin2 must already be an admin of the group. The researcher tested on several versions of Facebook. The problem appeared on all of them except the Desktop version, which means only people using mobile versions were affected.

How the idea came about

The starting point was the unpublished page. The researcher asked himself a question: if a group creator is not an admin on my page, and I link my page to the group and then unpublish it, will the creator be able to see my page in the list of admins?

That question matters because an unpublished page is meant to be hidden. If it shows up in a group's admin list, the hiding has already leaked. And if it can be added but not removed, the hiding turns into a trap.

The first test was done on a phone. The group creator could see the page in the "Admins list". The researcher then clicked the "remove" button, and the group creator always got an error message when trying to remove the unpublished page as an admin. He repeated the test on multiple versions of Facebook and found the same behaviour on all of them except the Desktop version.

From the original on medium.com

The screenshot shows the error message the group creator received when trying to remove the unpublished page as an admin. The researcher notes that this happened on every version he tested except Desktop.

Walking through the attack, step by step

Step 1: create the group

Admin1 creates a Facebook group and becomes the original creator. The creator cannot be removed by other admins, which makes Admin1 the right person to play the group owner in this test.

Step 2: add the attacker as admin

Admin1 adds Admin2 as an admin. Admin2 is the attacker. This step is needed because the trick only works for someone who already has admin rights in the group; the report lists this as a limitation.

Step 3: link the page to the group

Admin2 links his page to the group, following the flow described in Facebook's help page on linking a page. Once a page is linked, the page itself acts as an admin of the group, and everyone who manages that page can use the group's admin tools.

Step 4: unpublish the page

Admin2 unpublishes the page. An unpublished page is not visible to the public and is only visible to the people who manage it. This is the key move: the page is now hidden from the world, but it is still attached to the group as an admin.

Step 5: try to remove the page as admin

Admin1 opens the group on any version of Facebook except the desktop version and tries to remove the page as an admin. The removal fails with an error message, the same one shown in the screenshot above. The page stays in the admins list.

Why it works

The report does not describe the code or the exact check that failed. What it establishes is the behaviour: when an admin is an unpublished page, the removal path fails, while the page still appears in the admins list. The report does not explain why the removal fails.

In plain terms, the product has two rules that collide. Rule one: an unpublished page is hidden. Rule two: a linked page is an admin. When both are true at once, the removal fails and the page stays in place.

What an attacker could do with it

The report lists two consequences:

  1. A malicious group admin can add an unpublished page as an admin which cannot be removed by other admins and the group creator.
  2. Since a linked page is always an admin, all the people who manage the page can access the admin tools. If the malicious admin is kicked out as an admin on the group, he can still access the admin tools of the group by publishing the page whenever he wants and unpublishing it again.

If the attacker is kicked out as an admin, the page can be published again to regain access to the admin tools. The attacker keeps a spare key even after being shown the door.

There are two limits on the attack:

  1. The attacker must already be a group admin.
  2. It was not vulnerable on the desktop version, so only mobile users were affected.

The fix and the timeline

The report states that Facebook fixed the vulnerability and that it can no longer be reproduced. The timeline is:

Date Event
Nov. 25 Report sent
Dec. 04 Reproduced by Facebook
Dec. 05 Triaged
Jan. 03 Fixed
Jan. 03 Researcher confirmed the fix
Jan. 15 Bounty of $500 awarded

"Triaged" means the security team reviewed the report, confirmed it was a real issue and put it into their queue to be fixed. The fix came on Jan. 03, after the report was sent on Nov. 25.

Similar things to try on other products

The report does not list variants. The following are concrete things to try on comparable products, based on the same idea:

  1. Unpublished or hidden entity as a privileged member. Add an entity that is not publicly visible (an unpublished page, a hidden service account, a disabled bot) as an admin or member of a group, team or workspace, then try to remove it from every client. A positive result is that the entity stays in the member list and removal returns an error, while the entity still has access to admin tools.
  2. State change after linking. Link an entity to a group, then change its visibility state (publish or unpublish, enable or disable). A positive result is that the removal path behaves differently depending on the state, and the entity can be re-enabled later to regain access.
  3. Client parity. Repeat the removal on web, mobile web and native apps. A positive result is that one client rejects the removal while another accepts it, which points to a check that exists on only one path.
  4. Re-entry after removal. Remove the attacker as an admin, then have the attacker change the state of the linked entity. A positive result is that the attacker regains access to the group's admin tools without being re-added.

Closing

This vulnerability has been fixed by Facebook and cannot be reproduced anymore. The researcher thanks the Facebook security team for the bounty and for allowing participation in their Bug Bounty Program.

From the original on medium.com

This story is published in Noteworthy, where 10,000+ readers come every day to learn about the people & ideas shaping the products we love.

Follow our publication to see more product & design stories featured by theJournalteam.

Glossary

  • Facebook Group: a shared space on Facebook where members gather around a topic and admins manage it.
  • Group Creator: the person who made the group; other admins cannot remove them.
  • Admin: a member of a group with extra rights, such as adding or removing other admins and using admin tools.
  • Moderator: a group role with some management rights, mentioned in the report alongside admins.
  • Facebook Page: a public profile for a business, brand or person, separate from a personal profile.
  • Linked Page: a page that has been attached to a group so that it acts as an admin of that group.
  • Published page: a page whose contents are visible to the public.
  • Unpublished page: a page hidden from the public and visible only to the people who manage it.
  • Admin tools: the controls a group admin uses to manage the group.
  • Logic flaw: a weakness where the product's rules do not add up, rather than a crash or a memory bug; the software does what it was told, but the rules themselves are wrong.
  • Vulnerability: a weakness in software that someone can use to do something the product did not intend.
  • Reproduce: to follow the same steps and see the same result.
  • Triaged: reviewed and confirmed as a real issue by the security team, then queued for a fix.
  • Bounty: a payment made by a company to a researcher who reports a valid security issue.
  • Bug Bounty Program: a scheme where a company invites outside researchers to report security issues in exchange for rewards.
  • Client: a version of an app through which a person uses the service, such as a phone app, mobile web or desktop web.
  • Desktop version: the version of Facebook used in a browser on a computer, as opposed to mobile versions.
  • Mobile versions: the versions of Facebook used on phones and tablets.
  • State: the current condition of an object, for example whether a page is published or unpublished.
  • Removal path: the sequence of steps the product takes when someone tries to remove an admin.
  • Client parity: whether different clients behave the same way for the same action.
  • Entity: a thing that can be a member or admin, such as a page, an account or a bot.
  • Service account: an account used by software rather than a person.
  • Bot: an automated account that acts without a human behind it.
  • Workspace: a shared space in a product where a team manages members and settings.
  • Re-entry: getting back into a place after having been removed from it.
  • Impact: the harm that a vulnerability could cause if someone used it.
  • Limitation: a condition that must be true for the attack to work, which narrows who can carry it out.
  • Root cause: the underlying reason a vulnerability exists.
  • Fix: a change to the product that closes the vulnerability.
  • Screenshot: an image of a screen captured to show what happened.

More by Ritish Kumar Singh

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.