Disclose the FB profile of Facebook employees who create official announcement messages (Bug Bounty)
A GraphQL response for a Facebook announcement included a field containing a profile picture ID, which could be used to view the profile picture and profile of the Facebook employee who created the announcement. An attacker could thus disclose the identity of employees behind official messages.
Published on amineaboud.medium.com
The vulnerability could have let a malicious user reveal the profile picture and FB profile of Facebook employees who create official announcement messages (supposed to be displayed to users as coming from Facebook).
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 sends users notifications about its Bug Bounty Program Announcements. Those announcements are presented to the recipient as coming from Facebook itself, but each one is authored by an employee, and the platform stores a reference to that employee's profile picture alongside the announcement data. The announcement is supposed to be displayed to users as coming from Facebook.
The researcher found that the GraphQL response powering the announcement page leaked a picture identifier belonging to the creator, and that this identifier could be turned into the employee's profile picture and full Facebook profile through a public photo URL.
Setup
The only tooling described is Burp (written as "Blurp" in the report) with its HTTP History, used to inspect the traffic generated while browsing an announcement page.
Finding it
Everything started when the researcher received a notification regarding a Facebook Bug Bounty Program Announcement. Reviewing the HTTP History in Burp, they noticed that a GraphQL request was triggered while browsing the announcement page.
Analysing the response to that request, they found a value named creator_profile_pic_uri that returned a URL containing a picture ID. The field returned a URL containing a picture ID.
Exploitation
Step 1: Request the announcement data through GraphQL
Send a POST request to the GraphQL endpoint with CSRF parameters and the following parameters in the request body:
&variables={"input":{"trigger_event_type":"OPEN_SUPPORT_INBOX","trigger_session_id":"0","selected_support_inbox_item_id":"X"},"scale":2}&doc_id=355954265079591
Here X is the ID of the Facebook announcement message. The trigger_event_type is OPEN_SUPPORT_INBOX and trigger_session_id is 0. The request is sent to:
https://www.facebook.com/api/graphql/
Step 2: Extract the picture ID
Search for creator_profile_pic_uri in the returned GraphQL response. The value is a URL that carries a picture ID.
Step 3: Resolve the picture ID to a profile
Take the picture ID from creator_profile_pic_uri and insert it into the following URL, where Y is the picture ID:
https://www.facebook.com/photo?fbid=Y
The profile picture and the Facebook profile of the employee who created the announcement were displayed. In the researcher's initial manual check the same technique was applied with the picture ID copied from the link and inserted as X in https://www.facebook.com/photo?fbid=X, with the same result.
Root cause
The GraphQL response for the announcement page includes creator_profile_pic_uri, a URL that embeds the picture ID of the employee who authored the announcement. The picture ID from creator_profile_pic_uri could be inserted into the public photo URL and resolved to the employee's profile. The announcement is supposed to be displayed to users as coming from Facebook, yet the response carried a reference to the creator's picture.
Impact
A malicious user could reveal the profile picture and the Facebook profile of Facebook employees who create official announcement messages, that is, the people behind messages that are supposed to be displayed to users as coming from Facebook. The report does not describe any further use of the disclosed identity.
Fix
Facebook marked the issue as fixed on January 14, 2021, six days after the report was acknowledged.
Timeline
| Date | Event |
|---|---|
| January 8, 2021 | Reported |
| January 8, 2021 | Acknowledged by Facebook |
| January 14, 2021 | Fixed by Facebook |
| February 1, 2021 | Bounty awarded by Facebook |
Variants to test
- A positive result is a URL or ID that resolves through a public object endpoint to a real person's profile.
- A positive result is a rendered profile picture plus a link to the owning profile.
- A positive result is a different employee identity per announcement.
What happened, in plain words
Facebook runs a Bug Bounty Program: a scheme where people outside the company can report security mistakes and, if the report is valid, get paid for it. When Facebook has news about that programme, it sends users a notification. The notification opens an announcement page. To the person reading it, the announcement looks like it comes from Facebook itself, as an official message. In reality a particular Facebook employee wrote it, and Facebook's systems keep a reference to that employee's profile picture next to the announcement data.
The announcement is supposed to be displayed to users as coming from Facebook. The researcher found that the data behind the announcement page quietly included a reference to the author's profile picture. That reference could be turned into the employee's profile picture and full Facebook profile using a normal public photo link. The researcher found that the picture ID in the response resolved to the employee's profile.
This kind of mistake is called information disclosure: nothing is broken or taken over, but information that was meant to stay hidden is handed out. A useful comparison is a parcel that is supposed to arrive with the sender printed as "the shop". If the shop also leaves the name of the individual packer on the label, nothing bad happens to the parcel, but you learn something you were not meant to know.
The pieces involved
Before the steps, here are the concepts the report relies on.
- Notification and announcement page: a message in your Facebook notifications that links to a page describing a Bug Bounty Program Announcement. The researcher had received one of these.
- HTTP request and response: when your browser loads a page, it sends a request to a server and the server sends back a response. The response can contain data as well as the page itself.
- API: a way for one piece of software to ask another for data, without a human clicking through pages. Think of it as the service counter of a shop: you name what you want and get it back in a fixed format.
- GraphQL: a style of API where the client sends a query describing exactly which fields it wants, and the server answers with those fields. The endpoint used here is
https://www.facebook.com/api/graphql/. - Burp (written "Blurp" in the report): a tool that sits between your browser and the internet and records every request and response. Its HTTP History is the list of everything it recorded. It lets you read the traffic your browser generated while you were simply browsing.
- CSRF parameters: extra values a site includes in a request to prove the request really came from the site's own pages and not from some other website. The report says the request was sent with CSRF parameters.
- Picture ID: a number that identifies one photo on Facebook. The public photo page accepts such an ID in its address and shows the photo.
fbid: the name of the part of the photo page address that carries the picture ID.
Finding it
Everything started when the researcher received a notification regarding a Facebook Bug Bounty Program Announcement. With Burp recording the traffic, they opened the announcement page and looked at the HTTP History. There they noticed that a GraphQL request was triggered while browsing the announcement page. In other words, the page was not just a static document: the browser asked Facebook's GraphQL service for data to fill it in.
They analysed the response to that request. Inside it was a value named creator_profile_pic_uri, which returned a URL containing a picture ID. The field name is the clue: "creator" means the person who made the announcement, and "profile_pic_uri" means a link to their profile picture. Since the announcement is supposed to be displayed to users as coming from Facebook, a per-creator picture reference in a response delivered to the recipient looked wrong.
As a quick manual check, the researcher copied the picture ID from that link and inserted it into the following URL, where X is the picture ID:
https://www.facebook.com/photo?fbid=X
Line by line: https://www.facebook.com/photo is Facebook's public photo page, the page anyone sees when they open a photo. The ? starts the list of extra values passed in the address. fbid=X says "show the photo whose ID is X". Because the ID came from the announcement data, the page resolved it to the photo of the employee who wrote the announcement.
The profile picture and FB profile of the Facebook employee who created the announcement was displayed. That confirmed the leak: an ordinary public photo link, fed with an ID taken from the announcement response, reveals the person behind an official message.
Reproduction Steps
The report lays the same finding out as a repeatable sequence.
Step 1: Request the announcement data through GraphQL
Send a POST request to the GraphQL endpoint with CSRF parameters and the following parameters in the request body:
&variables={"input":{"trigger_event_type":"OPEN_SUPPORT_INBOX","trigger_session_id":"0","selected_support_inbox_item_id":"X"},"scale":2}&doc_id=355954265079591
Line by line:
&variables=begins the part of the body that carries the query's input values, written in JSON (a plain text format for structured data, with names and values in curly braces)."input":{...}is one named group of values passed to the query."trigger_event_type":"OPEN_SUPPORT_INBOX"is the trigger event type sent in the request."trigger_session_id":"0"is a session identifier passed along with the trigger."selected_support_inbox_item_id":"X"names the specific item being opened, whereXis the ID of the Facebook announcement message."scale":2is another value passed alongside the input object.&doc_id=355954265079591is the document ID sent in the request body.
The request is sent to:
https://www.facebook.com/api/graphql/
That is the address the request is sent to.
Step 2: Extract the picture ID
Search for creator_profile_pic_uri in the returned GraphQL response. The value is a URL that carries a picture ID. This is the same field the researcher spotted in Burp's HTTP History; here it is found by reading the response directly.
Step 3: Resolve the picture ID to a profile
Take the picture ID from creator_profile_pic_uri and insert it into the following URL, where Y is the picture ID:
https://www.facebook.com/photo?fbid=Y
As before, this is the public photo page with the ID placed in the fbid value. The profile picture and the Facebook profile of the employee who created the announcement were displayed. In the manual check, the picture ID copied from the link was inserted as X in https://www.facebook.com/photo?fbid=X.
Why it worked
The GraphQL response for the announcement page includes creator_profile_pic_uri, a URL that embeds the picture ID of the employee who authored the announcement. The picture ID from creator_profile_pic_uri could be inserted into the public photo URL and resolved to the employee's profile. The announcement is supposed to be displayed to users as coming from Facebook, yet the response carried a reference to the creator's picture.
A comparison: a company newsletter might be signed "the company". If the envelope also carried the author's staff photo number, and the staff photo album was open to the public, anyone holding the envelope could look up the author. Nothing was hacked; two ordinary things, the envelope and the public album, simply fitted together.
Impact
A malicious user could reveal the profile picture and the Facebook profile of Facebook employees who create official announcement messages, that is, the people behind messages that are supposed to be displayed to users as coming from Facebook. The report does not describe any further use of the disclosed identity.
Fix
Facebook marked the issue as fixed on January 14, 2021, six days after the report was acknowledged.
Timeline
| Date | Event |
|---|---|
| January 8, 2021 | Reported |
| January 8, 2021 | Acknowledged by Facebook |
| January 14, 2021 | Fixed by Facebook |
| February 1, 2021 | Bounty awarded by Facebook |
Variants to test
- A positive result is a URL or ID that resolves through a public object endpoint to a real person's profile.
- A positive result is a rendered profile picture plus a link to the owning profile.
- A positive result is a different employee identity per announcement.
Glossary
- API: a fixed way for software to ask another service for data, like a service counter with a set menu.
- Announcement page: the page a Bug Bounty Program Announcement notification opens.
- Bug bounty: a programme that pays people for reporting security mistakes to a company.
- Burp: a tool that records and lets you inspect the requests and responses between your browser and a website.
- CSRF parameters: extra values in a request that show it came from the site's own pages rather than another site.
creator_profile_pic_uri: the field in the GraphQL response that held a URL to the announcement author's profile picture.doc_id: the identifier of a stored GraphQL query kept on the server.fbid: the part of a Facebook photo page address that carries the picture ID.- GraphQL: an API style where the client names the exact fields it wants and the server returns them.
- HTTP History: Burp's list of every request and response it recorded.
- HTTP request / response: the message your browser sends to a server, and the message the server sends back.
- Information disclosure: a flaw where information meant to stay hidden is revealed, without anything being broken or taken over.
- JSON: a plain text format for structured data, using names and values in curly braces.
- Notification: a message in your Facebook notifications that links to a page.
- Picture ID: a number identifying one photo on Facebook.
- POST request: an HTTP request that carries data in its body, used here to send the GraphQL query values.
- Profile picture: the image shown on a person's Facebook profile.
selected_support_inbox_item_id: the value naming which announcement item is being opened.trigger_event_type: the value describing what kind of action triggered the request.trigger_session_id: a session identifier passed along with the trigger.