Access to FBConnections
The FBConnections recruitment mini-site had an endpoint that generated valid access links for any user ID without proper authorisation. An attacker could create a link to view the non-public site, though the GraphQL call failed to load sensitive data.
Published on philippeharewood.com
FBConnections seems to be a mini-site connected to the application process for Facebook recruitment. Using a simple AJAX call it was possible to generate a valid link to view the site used for recruiting ambassadors at 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
FBConnections is a mini-site tied to the application process for Facebook recruitment. One part of it is used for recruiting ambassadors at Facebook, and it was not meant to be public. The report describes a way to obtain a valid link into that recruiting mini-site through a simple AJAX call, and then what that link did and did not expose.
Setup
The only precondition shown in the report is a Facebook user ID. The proof of concept uses YOUR_USER_ID as a placeholder for the requester's own ID, so no special role, account type or tooling is described. The request is a plain HTTP POST made as an AJAX call.
Finding it
The report shows an endpoint under /fbconnections/ that generates a link for a candidate, keyed by candidate_id. Supplying a user ID to it produced a link into the recruiting mini-site. Since that site was not intended to be public, being able to generate a valid link was the issue worth reporting.
Exploitation
Step 1: request a link for a candidate
HTTP POST
/fbconnections/link_generator/?candidate_id=YOUR_USER_ID
The endpoint takes the candidate identifier as a query parameter and returns a generated link. The report does not show the response body, only the shape of the link it produces.
Step 2: use the generated link
The link points at the recruiting mini-site and carries a token plus the candidate ID:
https://www.facebook.com/fbconnections/candidate/?[redacted]&id=YOUR_USER_ID
The token parameter is a base64-encoded value, and id is the user ID that was passed to the generator. With that token, the report says it should be possible to see resources for available Facebook ambassadors to contact. In practice the GraphQL call behind that page failed to load anything sensitive, so the access did not yield sensitive data.
Root cause
The link generator issued a valid token for the candidate ID supplied in the request. The report does not describe the server-side checks, if any, around the generator, so the exact missing control is not stated;
Impact
Anyone could generate a valid link to access the FBConnections page, which was not meant to be public. The report is explicit that no sensitive data is shown: the GraphQL call on the candidate page failed to load anything sensitive. The report states that no sensitive data is shown, because the GraphQL call failed to load anything sensitive.
Fix
Facebook fixed the issue on 14 March 2018, two days after its further investigation on 12 March.
Variants to test
Timeline
| Date | Event |
|---|---|
| Mar 10, 2018 | Report sent |
| Mar 12, 2018 | Further investigation by Facebook |
| Mar 14, 2018 | Fixed by Facebook |
| Mar 20, 2018 | Bounty awarded by Facebook |
What happened, in plain words
Facebook runs a small internal website called FBConnections, which is part of the process for recruiting people to work at Facebook. One part of that site is used to recruit "ambassadors" and was not supposed to be visible to the public. The researcher found that a simple web request could produce a working link into that private recruiting site. The link worked, but the page behind it did not actually show any sensitive information: the data call it made failed to load anything private. Facebook fixed the problem on 14 March 2018, two days after its further investigation, and paid a bounty.
This article walks through the report step by step, explaining every term as it comes up, so you can follow it even if you have never done security work before.
Background: what FBConnections is
FBConnections is described in the report as a mini-site connected to the application process for Facebook recruitment. A "mini-site" here just means a small section of a larger website, with its own pages, that serves one purpose. In this case the purpose is recruiting. One part of it is used for recruiting ambassadors at Facebook. The report mentions resources for available Facebook ambassadors to contact, but does not define the role. The report says this recruiting mini-site was not meant to be public.
The setup: what you need to try this
The only thing the report says you need is a Facebook user ID. A user ID is the number (or string) that identifies an account on Facebook. The proof of concept writes it as YOUR_USER_ID, a placeholder meaning "put your own ID here". No special account type, role or tool is mentioned. The request is a plain HTTP POST made as an AJAX call.
Two terms to unpack there:
- HTTP is the language browsers and web servers use to talk to each other. Every time you load a page or click a button that sends data, an HTTP request goes out and an HTTP response comes back.
- POST is one type of HTTP request. A GET request is what happens when you type an address into the browser bar: you are asking to get a page. A POST request is used when you are sending something to the server, such as a form submission. The report uses POST for the link generator, which fits: you are asking the server to create something for you.
- AJAX is the technique a web page uses to send a request in the background, without reloading the whole page. Think of it like sending a text message while a conversation continues, rather than hanging up and calling back. The report says the researcher used a simple AJAX call, meaning the request could be made from the browser's developer tools or from a page's own JavaScript, without any special software.
Finding it
The report shows an endpoint under /fbconnections/ that generates a link for a candidate, keyed by candidate_id. An endpoint is a specific address on a server that does one job, like a service window in a building: you go to the right window with the right form and you get a specific service. This endpoint's job is to produce a link for a candidate. "Keyed by candidate_id" means the endpoint takes a candidate identifier as input and uses it to decide what link to produce.
Supplying a user ID to it produced a link into the recruiting mini-site. Since that site was not intended to be public, being able to generate a valid link was the issue worth reporting. "Mint" here just means "create": the server was handing out links the way a machine hands out tickets.
Exploitation
Step 1: request a link for a candidate
The first step is to ask the link generator for a link, passing your own user ID as the candidate:
HTTP POST
/fbconnections/link_generator/?candidate_id=YOUR_USER_ID
Line by line:
HTTP POSTsays which kind of request this is. It is a POST, so the browser is sending something to the server rather than just asking for a page./fbconnections/link_generator/is the path of the endpoint on the server. The name is descriptive: it is the part of FBConnections that generates links.?candidate_id=YOUR_USER_IDis the query string. Everything after the?is data passed along with the request. Here the parameter is namedcandidate_idand its value isYOUR_USER_ID, the placeholder for the requester's own ID. A parameter is simply a named value in a request, like a field on a form.
The endpoint takes the candidate identifier as a query parameter and returns a generated link. The report does not show the response body, only the shape of the link it produces. In other words, we know what came back in outline, not the exact text.
Step 2: use the generated link
The link points at the recruiting mini-site and carries a token plus the candidate ID:
https://www.facebook.com/fbconnections/candidate/?[redacted]&id=YOUR_USER_ID
Line by line:
https://www.facebook.comis the site the link belongs to./fbconnections/candidate/is the page inside that site: the candidate page of the FBConnections mini-site.?[redacted] is the first parameter. A **token** is a short string that acts as proof that you are allowed in, like a cloakroom ticket: whoever holds the ticket gets the coat, and the server does not need to know your name, only that you hold a valid ticket.SOME_BASE64ENCODED_TOKEN` is a placeholder for the real value. Base64 is a way of encoding data as text using a standard alphabet, so that it can travel safely inside a URL. It is not encryption: anyone can decode it. The report says the token is base64-encoded, nothing more.&id=YOUR_USER_IDis the second parameter, separated from the first by&. It carries the user ID that was passed to the generator.
With that token, the report says it should be possible to see resources for available Facebook ambassadors to contact. In practice the GraphQL call behind that page failed to load anything sensitive, so the access did not yield sensitive data.
GraphQL is a way for a web page to ask a server for exactly the data it needs, through a single endpoint, instead of fetching many separate pages. Think of it as a restaurant menu where you tick exactly the dishes you want, rather than ordering a fixed set meal. The candidate page made such a call to load its content, and that call did not return anything sensitive.
Root cause
The link generator issued a valid token for the candidate ID supplied in the request. "Arbitrary user" means any user at all, not just the intended candidate. The report does not describe the server-side checks, if any, around the generator, so the exact missing control is not stated;
Impact
Anyone could generate a valid link to access the FBConnections page, which was not meant to be public. The report is explicit that no sensitive data is shown: the GraphQL call on the candidate page failed to load anything sensitive. The report states that no sensitive data is shown, because the GraphQL call failed to load anything sensitive.
This is worth pausing on. A vulnerability that lets you into a private area is still a vulnerability even if the private area turns out to be empty of secrets, because the same flaw could expose more if the page changed. But the report is honest about what was actually reachable.
Fix
Facebook fixed the issue on 14 March 2018, two days after its further investigation on 12 March.
Variants to test
Timeline
| Date | Event |
|---|---|
| Mar 10, 2018 | Report sent |
| Mar 12, 2018 | Further investigation by Facebook |
| Mar 14, 2018 | Fixed by Facebook |
| Mar 20, 2018 | Bounty awarded by Facebook |
A bounty is a payment a company makes to a researcher who reports a security problem responsibly, as an incentive to report rather than exploit it.
Glossary
- AJAX: a technique for sending a request from a web page in the background, without reloading the page.
- API: the set of addresses and rules a program uses to request data or actions from a server.
- Authentication: the process of proving who you are, such as logging in.
- Base64: an encoding that turns data into plain text characters so it can travel safely in a URL; it is not encryption.
- Bounty: a payment made by a company to someone who reports a security issue to it.
- Candidate ID: the identifier of a candidate in the recruiting system, used here as the input to the link generator.
- Endpoint: a specific address on a server that performs one job.
- FBConnections: a mini-site connected to Facebook's recruitment application process, part of which was used for recruiting ambassadors.
- GraphQL: a way for a page to request exactly the data it needs from a server through a single endpoint.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- Impact: what an attacker could actually do or see because of a vulnerability.
- Mini-site: a small section of a larger website with its own pages and purpose.
- Parameter: a named value passed with a request, like a field on a form.
- POST: an HTTP request type used to send data to a server, as opposed to GET, which asks for a page.
- Query string: the part of a URL after the
?, carrying parameters. - Root cause: the underlying reason a vulnerability exists.
- Token: a short string that acts as proof of permission, like a cloakroom ticket.
- User ID: the identifier of a Facebook account.
- Vulnerability: a weakness in a system that allows someone to do something the system's owners did not intend.