Get Group's DOC without User Permission: Facebook Graph API Bug
The Facebook Graph API allowed an access token without the user_groups permission to retrieve details and documents from closed groups. An attacker with a basic app token could access private group content that should have required explicit permission.
Meta
Published on medium.com
Recently I was working with Facebook Graph API and found this bug. Facebook Group (https://developers.facebook.com/docs/graph-api/reference/v2.2/group) & Groups Docs graph API(https://developers.facebook.com/docs/graph-api/reference/v2.2/group/docs) states that 1) usergroups permission to retrieve any groups that the…
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the API endpoint did not properly check for the user_groups permission before returning closed group data and documents.
Impact
An app with no permission could get the docs of a closed group which is not intended to be shared, affecting group privacy.
What the attacker needed
A Facebook app with basic permissions; a user access token without user_groups; membership in the target closed group
The fix
The bug was fixed within 4–5 days after being reported.
How it was found
- Create an app with basic profile permission and get the user access token.
- Make a request to the group endpoint to get closed group details.
- Make a request to the group's docs endpoint to get the documents.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Facebook's Graph API is a way for apps to read data from Facebook. Normally, to see a closed group's information, an app needs a special permission called user_groups. This report found that an app without that permission could still read the group's details and documents, which should have been private.
What is Access control?
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.