Disclose-Facebook-Page-Admins-In-3d
A page's 3D assets were linked to the user who uploaded them, and the Graph API exposed this link publicly. An attacker could query a user ID to find 3D assets and match them to a page, revealing that the user has a role on that page.
Published on philippeharewood.com
This is because it seems the 3D assets get linked to the user on behalf of the page. Since the page is public, the 3D assets will be public.
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
Facebook Pages can upload 3D assets. When a page does so, the platform records who performed the upload, and that attribution is tied to the user account acting on behalf of the page rather than to the page itself. The page is public, so its 3D assets are public, and any public link between a public asset and a user account becomes a way to learn which users have a role on that page.
The report is about that link: a Graph API edge that returns the 3D assets associated with a user, and the fact that the same object IDs are visible on the public page. The researcher, Philippe Harewood, framed the issue as disclosing Facebook Page admins in 3D.
Setup
The report does not describe any special setup. The proof of concept uses a Graph API request against a user ID with an access token, and the response is shown with placeholder values. The only precondition stated is that a page has uploaded a 3D asset. The researcher refers to a specific public permalink and specific numeric IDs, which are reproduced below as they appear in the report.
Finding it
The researcher noticed that when a page uploads a 3D asset, the asset appears to be linked to the user on behalf of the page. Because the page is public, the 3D assets are public, and therefore the link between the asset and the user is public too. That link reveals a user who has a role on the page.
The concern is attribution: the asset should ideally be attributed to the page (the report names page ID 113702895386410 as the preferred attribution), or at the very least the user link should not be visible to everyone.
Exploitation
Step 1: Query the user's 3D assets
The researcher requests the asset3ds edge for a user ID, using any token:
https://graph.facebook.com/USER_ID/asset3ds?access_token=ANY_TOKEN
The response lists the asset IDs associated with that user:
{
"data": [{
"id": "ASSET_ID"
}]
}
The request uses ANY_TOKEN as a placeholder for the access token. The response returns object IDs, not page IDs.
Step 2: Match the asset ID against the public page
The researcher then examines the ID of the 3D asset on the public page at:
https://www.facebook.com/permalink.php?story_fbid=1603814199708598&id=113702895386410
The object IDs from the Graph API response match the asset ID shown on that public permalink. Since the permalink belongs to page 113702895386410, the match ties the asset, and therefore the user returned in step 1, to that page.
Step 3: Conclude the role
The researcher states that this should suffice to prove that user 13608786 has a role on the page. The chain is: user ID to asset ID via the Graph edge, asset ID to page via the public permalink, therefore user ID to page.
Root cause
The report describes the behaviour rather than the code: 3D assets uploaded by a page are linked to the user acting on behalf of the page, and that link is exposed through the asset3ds edge to any token holder. The page and its assets are public by design, so the object IDs are public, and the user-to-asset edge is what turns a public asset into a public role disclosure. The report does not state which authorisation check was missing or why the edge was readable.
Impact
An attacker who can read the asset3ds edge for a user ID can learn which 3D assets are linked to that user, match those asset IDs against public page permalinks, and so identify users with a role on a page. The report limits the claim to pages that have uploaded a 3D asset, and to the link being visible to everyone.
Fix
Facebook fixed the issue on 5 March 2018, according to the timeline. The researcher's stated preference was that attribution should be via the page ID (113702895386410) or, at the very least, that the user link should not be visible to everyone.
Variants to test
- A positive result is an ID that matches a public page object and identifies a user with a role.
- A positive result is the same user-to-page link through a different object type.
- A positive result is the same data returned regardless of the caller's relationship to the user or page.
- A positive result is a stale attribution that still ties the user to the page.
Timeline
| Date | Event |
|---|---|
| Feb 23, 2018 | Report sent |
| Feb 23, 2018 | Further investigation by Facebook |
| Mar 5, 2018 | Fixed by Facebook |
| Mar 5, 2018 | Bounty awarded by Facebook |
What happened, in plain words
Facebook Pages can upload 3D assets. When a page does that, Facebook records which user account performed the upload, and that record is tied to the person acting on behalf of the page, not to the page itself. The page is public, so its 3D assets are public, and any public link between a public asset and a user account becomes a way to learn which users have a role on that page.
The report is about that link: a Graph API edge that returns the 3D assets associated with a user, and the fact that the same object IDs are visible on the public page. The researcher, Philippe Harewood, framed the issue as disclosing Facebook Page admins in 3D.
Setup
The report does not describe any special setup. The proof of concept uses a Graph API request against a user ID with an access token, and the response is shown with placeholder values. The only precondition stated is that a page has uploaded a 3D asset. The researcher refers to a specific public permalink and specific numeric IDs, which are reproduced below as they appear in the report.
Finding it
The researcher noticed that when a page uploads a 3D asset, the asset appears to be linked to the user on behalf of the page. Because the page is public, the 3D assets are public, and therefore the link between the asset and the user is public too. That link reveals a user who has a role on the page.
The concern is attribution: the asset should ideally be attributed to the page (the report names page ID 113702895386410 as the preferred attribution), or at the very least the user link should not be visible to everyone.
Exploitation
Step 1: Query the user's 3D assets
The researcher requests the asset3ds edge for a user ID, using any token:
https://graph.facebook.com/USER_ID/asset3ds?access_token=ANY_TOKEN
This is a URL. The first part, https://graph.facebook.com, is the address of Facebook's Graph API. An API (Application Programming Interface) is a way for one computer program to ask another for data or to perform an action, using a defined set of addresses and rules. Think of it as a waiter in a restaurant: you do not go into the kitchen yourself; you tell the waiter what you want from a menu, and the waiter brings it back. Here the menu item is USER_ID/asset3ds.
USER_ID is a placeholder for a numeric identifier that Facebook uses for a user account. Every user has one. asset3ds is the name of a connection, often called an edge, on that user. An edge is simply a list of things attached to an object. In this case, it is the list of 3D assets associated with that user.
The ? starts the query string, which is the part of a URL that carries extra instructions. access_token=ANY_TOKEN is a parameter named access_token with the value ANY_TOKEN. An access token is a short string that acts like a temporary key or badge: it tells the API who is calling and what they are allowed to do. ANY_TOKEN is a placeholder for the access token used in the request.
The response lists the asset IDs associated with that user:
{
"data": [{
"id": "ASSET_ID"
}]
}
This is JSON, a common text format for structured data. The outer braces { and } enclose an object, which is a collection of named values. "data" is the name of a field, and its value is a list, shown by the square brackets [ and ]. The list contains one object, and that object has a field "id" whose value is "ASSET_ID". ASSET_ID is a placeholder for the real identifier of a 3D asset. So the response says: here is a list of assets, and here is the ID of one of them. The response returns object IDs, not page IDs.
Step 2: Match the asset ID against the public page
The researcher then examines the ID of the 3D asset on the public page at:
https://www.facebook.com/permalink.php?story_fbid=1603814199708598&id=113702895386410
This is another URL, this time on the normal Facebook website rather than the Graph API. https://www.facebook.com is the main site. permalink.php is a page on that site that shows a single post or story. The query string has two parameters. story_fbid=1603814199708598 identifies the specific story. id=113702895386410 identifies the page that owns the story. Both numbers are copied from the report.
The object IDs from the Graph API response match the asset ID shown on that public permalink. Since the permalink belongs to page 113702895386410, the match ties the asset, and therefore the user returned in step 1, to that page.
Step 3: Conclude the role
The researcher states that this should suffice to prove that user 13608786 has a role on the page. The chain is: user ID to asset ID via the Graph edge, asset ID to page via the public permalink, therefore user ID to page.
Root cause
The report describes the behaviour rather than the code: 3D assets uploaded by a page are linked to the user acting on behalf of the page, and that link is exposed through the asset3ds edge to any token holder. The page and its assets are public by design, so the object IDs are public, and the user-to-asset edge is what turns a public asset into a public role disclosure. The report does not state which authorisation check was missing or why the edge was readable.
Impact
An attacker who can read the asset3ds edge for a user ID can learn which 3D assets are linked to that user, match those asset IDs against public page permalinks, and so identify users with a role on a page. The report limits the claim to pages that have uploaded a 3D asset, and to the link being visible to everyone.
Fix
Facebook fixed the issue on 5 March 2018, according to the timeline. The researcher's stated preference was that attribution should be via the page ID (113702895386410) or, at the very least, that the user link should not be visible to everyone.
Variants to test
- A positive result is an ID that matches a public page object and identifies a user with a role.
- A positive result is the same user-to-page link through a different object type.
- A positive result is the same data returned regardless of the caller's relationship to the user or page.
- A positive result is a stale attribution that still ties the user to the page.
Timeline
| Date | Event |
|---|---|
| Feb 23, 2018 | Report sent |
| Feb 23, 2018 | Further investigation by Facebook |
| Mar 5, 2018 | Fixed by Facebook |
| Mar 5, 2018 | Bounty awarded by Facebook |
Glossary
- API: A way for one computer program to ask another for data or to perform an action, using a defined set of addresses and rules.
- Access token: A short string that acts like a temporary key or badge, telling an API who is calling and what they are allowed to do.
- Edge: A list of things attached to an object in the Graph API, such as the list of 3D assets associated with a user.
- Graph API: Facebook's API for reading and writing data about users, pages, and other objects.
- JSON: A common text format for structured data, using braces, brackets, and quoted names and values.
- Object ID: A numeric identifier that Facebook uses for a specific object, such as a user, page, or asset.
- Parameter: A named value in a URL's query string, such as
access_token=ANY_TOKEN. - Permalink: A URL that points to a specific post or story on a website.
- Query string: The part of a URL after the
?that carries extra instructions as parameters. - Role: A position a user holds on a page, such as admin, which gives them certain permissions.
- 3D asset: A three-dimensional model or file that a page can upload and display.