Disclose-Page-Admins-Via-Our-Story-Feature
A GraphQL endpoint returned the name of the admin or editor who authored a page's 'Our Story' content to any user, even one without a role on that page. An attacker could therefore learn the identity of a page's admin or editor for any page using the feature.
Published on philippeharewood.com
Facebook “Our Story” is a feature that seems to be in and out of testing for various pages. This feature from my understanding has been built based on how Facebook Notes works.
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 have a feature called "Our Story", which at the time of this report appeared to be in and out of testing for various pages. The feature lets a page publish a story, and from the researcher's understanding it was built on top of how Facebook Notes works. That design inheritance is what made the report interesting: a story is authored by a person, and the underlying document model records who owns it.
The target here is the page story composer and the GraphQL endpoint that serves page story data. The researcher is Philippe Harewood, and the report was disclosed on 5 January 2018.
Setup
No special tooling is required beyond a browser and the ability to send requests to the GraphQL endpoint. The preconditions are:
- A Facebook page that has the "Our Story" feature available.
- An admin or editor of that page who has published a story.
- A second account, a user with no role on the page, to query the data.
If the feature is not rolled out to your page, the composer can be brought up manually with the URL below, substituting your own page ID.
https://www.facebook.com/page_story/composer/?page_id=YOUR_PAGE_ID
Finding it
The researcher noticed that because "Our Story" is built on the Notes model, publishing a story records an author. The page itself is shown as the source of the story, but the underlying published document keeps a document_owner. That owner is the admin or editor who authored or edited the story, not the page. The question was whether a user with no role on the page could reach that owner field through GraphQL.
Exploitation
Step 1: Create and publish a page story
Given a page, create a page story through the composer. If the feature is not available in the interface, open the composer URL directly with the page ID. Publish the story as an admin or editor of the page.
Step 2: Query the story as a user without a role
Using GraphQL as a user who has no role on the page, request the page story's from and the published_document's document_owner for the target page ID.
https://graph.facebook.com/graphql?q=graphql%3Fq%3Dnode%28PAGE_ID%29{page_story{from,published_document{document_owner}}}
The q parameter carries a GraphQL query that resolves the node for PAGE_ID and selects page_story, then from and published_document { document_owner }. The response returns both the page name and the name of the user who owns the published document.
{
"PAGE_ID": {
"page_story": {
"from": {
"name": "Page Name"
},
"published_document": {
"document_owner": {
"name": "User Name of Admin or Editor"
}
}
}
}
}
The from.name is the page name, which is public anyway. The interesting field is published_document.document_owner.name, which resolves to the name of the admin or editor who authored or edited the story. The query succeeded for a user with no role on the page, disclosing the author identity.
Root cause
"Our Story" was built on the Notes model, and that model stores a document_owner on the published document. The GraphQL query returned published_document { document_owner } to a user with no role on the page. The page-level view showed only the page as the source, but the document-level field leaked the individual behind it.
Impact
A malicious user could derive the name of a page admin or editor who last authored or edited the "Our Story" on any chosen page. The disclosure is limited to pages that have the "Our Story" feature authored or edited, and it reveals the name of the person, not the page. The report does not describe any further data being exposed through this path.
Fix
Facebook fixed the endpoint on 10 January 2018, five days after the report was sent. The report does not describe the specific change made.
Variants to test
- Other page features built on Notes or documents: query the underlying document owner through GraphQL as a user with no role. A positive result is a name returned where only the page should be visible.
- Other
page_storysubfields: request fields beyondfromandpublished_document, such as editor metadata, as a user with no role. A positive result is any field that identifies an individual admin or editor. - Pages where the story was edited by a different admin than the author: check whether
document_ownerreflects the last editor. A positive result is a name that differs from the original author, showing the field tracks edits. - The same node query against pages without the feature: confirm the endpoint returns nothing rather than an error that reveals structure. A positive result is a consistent empty response.
Timeline
- 5 January 2018: report sent.
- 9 January 2018: further investigation by Facebook.
- 10 January 2018: endpoint fixed by Facebook.
- 16 January 2018: bounty awarded by Facebook.
What happened, in plain words
Facebook pages (the profiles that businesses, bands and public figures use) have a feature called "Our Story". At the time of this report it seemed to be switched on for some pages and off for others, as if Facebook were still testing it. The feature lets a page publish a story, and from the researcher's understanding it was built on top of how Facebook Notes works. That detail is the heart of the report: a story is written by a person, and the underlying document model records who owns it.
The researcher, Philippe Harewood, found that a user with no role on a page could ask Facebook's servers for the story data and receive back the name of the admin or editor who wrote or edited that story. The page itself was shown as the source, but a hidden field underneath pointed at the individual. The report was disclosed on 5 January 2018.
To follow the rest of this article you only need a browser and a basic idea of what a web request is. Everything else is explained as it comes up.
Context
What a Facebook page and a page role are
A Facebook page is a public presence, separate from a personal profile. Pages are run by people who have been given a role on that page, typically an admin (full control) or an editor (can publish content). The page is what the public sees; the people behind it are not normally named.
What "Our Story" is
"Our Story" is a page feature that lets the page publish a story. The researcher understood it to be built on Facebook Notes, an older feature for writing longer pieces of text. Building one feature on top of another is common in software: it saves work, but it also means the new feature inherits the old feature's data model, including details the new feature never meant to show.
What a data model and an owner field are
A data model is the way a system stores information: which things exist and how they relate. In the Notes model, a published piece of writing is a document, and a document has an owner, the person who created it. When "Our Story" reuses that model, every published story carries a document_owner field recording the individual who authored or edited it, even though the page-level view only shows the page.
What GraphQL and an API are
An API (application programming interface) is a way for one piece of software to ask another for data, like a waiter taking your order to the kitchen and bringing back exactly the dish you asked for. GraphQL is a particular style of API where the client sends a query describing precisely which fields it wants, and the server returns just those fields. That matters here: if a field exists in the data model, a client can ask for it by name, and the server has to decide whether to hand it over.
The target
The target is the page story composer (the screen where a story is written) and the GraphQL endpoint that serves page story data.
Setup
No special tooling is required beyond a browser and the ability to send requests to the GraphQL endpoint. The preconditions are:
- A Facebook page that has the "Our Story" feature available.
- An admin or editor of that page who has published a story.
- A second account, a user with no role on the page, to query the data.
The third point is the important one. The whole question is whether someone outside the page's team can see data about the team. Having a separate account with no role is how you test that honestly.
If the feature is not rolled out to your page, the composer can be brought up manually with the URL below, substituting your own page ID. A page ID is the number Facebook uses internally to identify a page; you can see it in the page's address.
https://www.facebook.com/page_story/composer/?page_id=YOUR_PAGE_ID
Line by line:
https://www.facebook.comis the Facebook website, reached over HTTPS, the encrypted version of the web's request protocol./page_story/composer/is the path to the story-writing screen.?page_id=YOUR_PAGE_IDis the query string, the part after the question mark that passes extra information. Here it tells Facebook which page the composer is for.YOUR_PAGE_IDis a placeholder you replace with the real number.
Opening a URL directly like this is a way of reaching a screen that the normal menus may not show you, for example because the feature is still being tested.
Finding it
The researcher noticed that because "Our Story" is built on the Notes model, publishing a story records an author. The page itself is shown as the source of the story, but the underlying published document keeps a document_owner. That owner is the admin or editor who authored or edited the story, not the page. The question was whether a user with no role on the page could reach that owner field through GraphQL.
This is the reasoning step worth pausing on. Nothing was broken into. The researcher read how the feature was put together, spotted that a person's identity was stored one layer below the page, and then asked a simple question: does the server check who is asking before it returns that layer?
Exploitation
Step 1: Create and publish a page story
Given a page, create a page story through the composer. If the feature is not available in the interface, open the composer URL directly with the page ID, as shown above. Publish the story as an admin or editor of the page.
This step exists to create the data being tested. Without a published story there is no document and no owner to look for.
Step 2: Query the story as a user without a role
Using GraphQL as a user who has no role on the page, request the page story's from and the published_document's document_owner for the target page ID.
https://graph.facebook.com/graphql?q=graphql%3Fq%3Dnode%28PAGE_ID%29{page_story{from,published_document{document_owner}}}
Line by line:
https://graph.facebook.comis Facebook's API host, the address that serves data to programs rather than web pages to people./graphqlis the endpoint, the specific address that accepts GraphQL queries.?q=starts the query string and names the parameterq, which carries the query itself.- Everything after
q=is the query, encoded so it can travel safely inside a URL. Characters such as?,(,)and{have special meanings in a URL, so they are written as percent-encoded sequences:%3Fis?,%28is(,%29is). Decoded, the value readsgraphql?q=node(PAGE_ID){page_story{from,published_document{document_owner}}}. node(PAGE_ID)asks for the object identified by that page ID.{page_story{...}}says: from that object, take thepage_storyfield.fromasks for the source of the story, which is the page.published_document{document_owner}goes one level deeper, into the published document, and asks for its owner.
The response returns both the page name and the name of the user who owns the published document.
{
"PAGE_ID": {
"page_story": {
"from": {
"name": "Page Name"
},
"published_document": {
"document_owner": {
"name": "User Name of Admin or Editor"
}
}
}
}
}
Line by line:
- The outer object is keyed by
PAGE_ID, the page that was asked about. page_storyholds the story data for that page.from.nameisPage Name, the page name, which is public anyway.published_document.document_owner.nameisUser Name of Admin or Editor, the name of the person who authored or edited the story.
The from.name is the page name, which is public anyway. The interesting field is published_document.document_owner.name, which resolves to the name of the admin or editor who authored or edited the story. The query succeeded for a user with no role on the page, disclosing the author identity.
In plain terms: the front door showed the page, but the back door, reachable by anyone who knew the address, showed the person.
Root cause
"Our Story" was built on the Notes model, and that model stores a document_owner on the published document. The GraphQL query returned published_document { document_owner } to a user with no role on the page. A resolver is the piece of server code that answers a single field in a query; it is where the decision to allow or deny should be made.
The page-level view showed only the page as the source, but the document-level field leaked the individual behind it.
Authorisation is the process of deciding whether a particular user is allowed to do or see a particular thing. Authentication is proving who you are; authorisation is what you are then permitted to do. Here the server knew who was asking, but did not apply the page-role rule to the deeper field. A useful comparison is a building where the reception desk checks your badge, but the door to the staff room behind it has no lock at all.
Impact
A malicious user could derive the name of a page admin or editor who last authored or edited the "Our Story" on any chosen page. The disclosure is limited to pages that have the "Our Story" feature authored or edited, and it reveals the name of the person, not the page. The report does not describe any further data being exposed through this path.
The report does not claim any of that happened; it simply shows that the identity was readable when it should not have been.
Fix
Facebook fixed the endpoint on 10 January 2018, five days after the report was sent. The report does not describe the specific change made.
In everyday terms: put the same lock on the staff room door that the reception desk already uses.
Variants to test
These are follow-up ideas in the same spirit, useful for anyone learning how to look for similar gaps.
- Other page features built on Notes or documents: query the underlying document owner through GraphQL as a user with no role. A positive result is a name returned where only the page should be visible.
- Other
page_storysubfields: request fields beyondfromandpublished_document, such as editor metadata, as a user with no role. A positive result is any field that identifies an individual admin or editor. - Pages where the story was edited by a different admin than the author: check whether
document_ownerreflects the last editor. A positive result is a name that differs from the original author, showing the field tracks edits. - The same node query against pages without the feature: confirm the endpoint returns nothing rather than an error that reveals structure. A positive result is a consistent empty response.
Timeline
- 5 January 2018: report sent.
- 9 January 2018: further investigation by Facebook.
- 10 January 2018: endpoint fixed by Facebook.
- 16 January 2018: bounty awarded by Facebook.
Glossary
- API: a way for one piece of software to ask another for data, like a waiter carrying your order to the kitchen and back.
- Admin: a person with full control over a Facebook page.
- Authentication: proving who you are.
- Authorisation: deciding what a proven user is allowed to see or do.
- Bounty: a reward paid by a company for a security report it finds useful.
- Composer: the screen where a piece of content, here a page story, is written and published.
- Data model: the way a system stores information, including which things exist and how they relate.
- Document: in the Notes model, a published piece of writing.
- document_owner: the field on a document recording the person who authored or edited it.
- Editor: a person with permission to publish content on a Facebook page.
- Endpoint: a specific address on a server that accepts a particular kind of request.
- GraphQL: a style of API where the client sends a query naming exactly the fields it wants.
- HTTPS: the encrypted version of the protocol browsers use to talk to websites.
- Notes: an older Facebook feature for writing longer text pieces, on which "Our Story" was built.
- Our Story: a Facebook page feature for publishing a story, at the time of the report still being tested on some pages.
- Page: a public Facebook presence for a business, band or public figure, run by people with roles.
- Page ID: the number Facebook uses internally to identify a page.
- Percent-encoding: writing special characters in a URL as
%followed by a code, such as%3Ffor?. - Query string: the part of a URL after the question mark that passes extra information.
- Resolver: the server code that answers a single field in a GraphQL query, and the place where access should be checked.
- Role: the permission level a person has on a page, such as admin or editor.
- Root cause: the underlying reason a vulnerability exists, as opposed to its visible symptom.
- Vulnerability: a weakness in software that lets someone do something they should not be able to do.