Skip to content
Info disclosure Write-up Beginner

Leaked Credentials gives access to internalfb.com

Philippe Harewood Follow

Published on philippeharewood.com

Bounty$6,000 View original

Facebook uses a contracting company in Someplace called Something to test new and upcoming features across the Facebook family. This company uses real Facebook and Instagram profiles to test in public.

Philippe, on philippeharewood.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Facebook (Meta) uses a contracting company to test new and upcoming features across the Facebook family of products. According to the report, that company uses real Facebook and Instagram profiles to carry out this testing in public. A trivially found "flag" allows anyone to identify multiple contractors on Facebook with minimal difficulty.

The target here is internalfb.com, the internal Facebook property that employees log in to. The report is about what becomes reachable once a session exists on that property, even when the session has not passed two-factor authentication.

Setup

The precondition is a set of valid @fb.com credentials. In this case they were not obtained by any technical attack: one of the Facebook contractors live streamed three credentials for @fb.com while testing in public. One of the Facebook contractors live streamed three credentials for @fb.com while testing in public.

One of those credentials worked to log in to internalfb.com, but the login stopped at a 2FA screen. The important observation is that the logged-in user, even with 2FA still required, was still allowed to reach internal data. The report does not describe the browser, tooling or any further account setup beyond this.

Finding it

Two things combined. First, contractors doing public testing are identifiable through a flag that is easy to find, so their public output, including live streams, can be located. Second, one such stream contained three @fb.com credentials. One credential worked to log in to internalfb.com but stopped at a 2FA screen; the logged-in user was still allowed internal data to be leaked.

That gap between "logged in" and "passed 2FA" is the whole issue. The report notes that parts of it are intentionally vague or missing to abide by Facebook, so the exact endpoints used are not given.

Exploitation

Step 1: send an internal XController request after logging in

With the partially authenticated session, the researcher sent an internal XController request:

JavaScript
new AsyncRequest(‘/intern/something/’).setData({value:1}).send()

AsyncRequest is the client-side request helper, the path points at an internal XController endpoint, and setData supplies the request body. The path and field shown here are placeholders: the report deliberately does not disclose the real endpoint or parameters.

Step 2: read the error and use it to enumerate valid controllers

The request above raises an error through a stack trace. The error essentially states that the correct fields for the XController were not supplied. The report says that, given a URL or list of URLs, one could use this error to build a valid list of internal XControllers with valid fields.

In other words, the error handling turns an authenticated-but-unverified session into a discovery oracle for the internal API surface.

Root cause

The report does not describe the server-side mechanism behind the gap between logging in and passing 2FA. The logged-in user, even with 2FA still required, was still allowed internal data to be leaked.

A second, smaller weakness compounds it: XController error responses leak a stack trace and enough detail about required fields to let a caller enumerate valid controllers and their parameters. The report says the logged-in user was still allowed internal data to be leaked, and that the error could be used to build a list of valid XControllers.

Impact

The report states that the logged-in user, even with 2FA required, was still allowed internal data to be leaked. The report states that the logged-in user, even with 2FA required, was still allowed to leak internal data, and that the error oracle allows mapping internal XControllers and their valid fields. The report does not enumerate which data was exposed.

Facebook's own position, given in the timeline, was that the impact was minimal because without 2FA the internal infrastructure cannot be accessed, and it said the issue was out of scope and not considered a security vulnerability. Later, on 20 October 2021, Facebook said it had re-analysed the surface area reachable when logged in to an employee account without 2FA and found that a number of endpoints related to mobile app downloads were accessible there, potentially exposing internal-only and unreleased applications. On 20 October 2021 a $6000 bounty was awarded by Meta.

The practical condition is important: the attack requires valid @fb.com credentials in the first place, and here they came from a public live stream rather than from any flaw in Facebook's authentication.

Fix

Facebook's reply of 16 February 2021 states that the vulnerability was patched, the video was taken down and the credentials were invalidated.

The October 2021 follow-up describes the remediation direction for the wider surface: Facebook said it was working to limit the applications exposed through the mobile app download endpoints to only otherwise publicly available applications. Facebook said it was working to limit the applications exposed there to otherwise publicly available ones.

Variants to test

  1. 2FA bypass on sibling internal properties. Take a session that has passed password authentication but not 2FA on any internal property and replay requests to internal API routes. A positive result is any response containing internal data rather than a redirect to, or error from, the 2FA gate.
  2. Error-based controller enumeration. Send requests with deliberately wrong or missing fields to candidate internal endpoints and compare the errors. A positive result is a stack trace or validation error that names the required fields, letting you distinguish real controllers from non-existent paths.
  3. Mobile app download endpoints. On an employee session without 2FA, request the endpoints related to mobile app downloads. A positive result is a listing or download of internal-only or unreleased applications.
  4. Contractor identification. Look for the flag that marks contractor accounts on the public platform and review their public output, such as live streams, for exposed credentials. A positive result is a working credential for an internal property.

Timeline

The report includes the exchange verbatim, with redactions.

  • Reported Thursday, 11 February 2021 at 5:54 AM; the leaked credential video had been up for three days.
  • Facebook replied on 11 February 2021 at 6:23 AM, confirming it had reproduced the report, asking the researcher to cease testing that relies on leaked credentials, and asking for the link to the livestream.
  • The researcher replied at 6:26 AM with the video link, and at 6:47 AM with an MDM config obtained from a later video by the same owner.
  • Facebook replied on Tuesday, 16 February 2021 at 4:56 AM: the vulnerability was believed patched, the video taken down and the credentials invalidated; the Seqrite MDM config was not related to Facebook.
  • The researcher asked for disclosure on Thursday, 25 February 2021 at 7:03 AM.
  • Facebook replied on Tuesday, 2 March 2021 at 2:25 PM and again at 3:45 PM, saying the team would follow up.
  • The researcher replied on Thursday, 4 March 2021 at 5:13 AM, quoting the response given at whitehat.workplace.com, which sets out the obligation to cease access, notify Facebook, delete the data and not share it.
  • Facebook replied on Thursday, 11 March 2021 at 2:09 PM: the issue was out of scope and not considered a security vulnerability, the impact was minimal because without 2FA the internal infrastructure cannot be accessed, the data accessed is personal data and cannot be shared publicly, a blog about the general issue is allowed but posting raw information would violate the terms, and the researcher's actions demonstrated good faith.
  • On Wednesday, 20 October 2021 at 1:34 PM, Facebook said it had re-analysed the surface area reachable when logged in to an employee account without 2FA, identified accessible endpoints related to mobile app downloads that could expose internal-only and unreleased applications, and was working to limit the applications exposed there to otherwise publicly available ones.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

Facebook (the company is now called Meta) hires an outside contracting company to try out new and upcoming features across the Facebook family of products. According to the report, that company uses real Facebook and Instagram profiles to do this testing in public, where anyone can see it. A "flag" that is trivially easy to find lets anyone spot several of these contractors on Facebook with minimal difficulty.

The property at the centre of this report is internalfb.com, the internal Facebook site that employees log in to. The question the report answers is: what can someone reach on that site once they have a session, even if that session has not yet passed two-factor authentication?

Two-factor authentication (2FA) is the second proof of identity you are asked for after your password, usually a short code from an app or a text message. The idea is that a stolen password alone is not enough to get in. Here, the logged-in user, even with 2FA still required, was still allowed internal data to be leaked.

Setup

The starting point is a set of valid @fb.com credentials. These were not obtained by any technical attack. One of the Facebook contractors live streamed three credentials for @fb.com while testing in public, One of the Facebook contractors live streamed three credentials for @fb.com while testing in public.

One of those credentials worked to log in to internalfb.com, but the login stopped at a 2FA screen. The important observation is that the logged-in user, even with 2FA still required, was still allowed to reach internal data. The report does not describe the browser, the tooling or any further account setup beyond this.

Finding it

Two things combined. First, contractors doing public testing are identifiable through a flag that is easy to find, so their public output, including live streams, can be located. Second, one such stream contained three @fb.com credentials. One credential worked to log in to internalfb.com but stopped at a 2FA screen; the logged-in user was still allowed internal data to be leaked.

That gap between "logged in" and "passed 2FA" is the whole issue. The report notes that parts of it are intentionally vague or missing to abide by Facebook, so the exact endpoints used are not given.

Exploitation

Step 1: send an internal XController request after logging in

With the partially authenticated session, the researcher sent an internal XController request:

JavaScript
new AsyncRequest(‘/intern/something/’).setData({value:1}).send()

Line by line, in plain words:

  • new AsyncRequest(...) creates a request object. AsyncRequest is the client-side helper Facebook's own web pages use to talk to their servers in the background, without reloading the page. Think of it as a pre-addressed envelope the site uses for its own internal messages.
  • ‘/intern/something/’ is the path the request is sent to. It points at an internal XController endpoint. An XController is one of the server-side handlers that answers these background requests. The path and field shown here are placeholders: the report deliberately does not disclose the real endpoint or parameters.
  • .setData({value:1}) supplies the request body, the content of the message. Here it is a single field called value set to 1, again a placeholder.
  • .send() actually sends the request.

The report says that after logging in, an internal XController request was sent. Sending a normal internal request is the simplest way to find out.

Step 2: read the error and use it to enumerate valid controllers

The request above raises an error through a stack trace. A stack trace is the debugging output a program produces when something goes wrong: it lists the internal steps the code went through before failing, and it often reveals details that were never meant for outsiders. The error essentially states that the correct fields for the XController were not supplied.

The report says that, given a URL or list of URLs, one could use this error to build a valid list of internal XControllers with valid fields. In other words, the error handling turns an authenticated-but-unverified session into a discovery oracle for the internal API surface.

An API (application programming interface) is the set of addresses and message formats a site's own pages use to exchange data with its servers. An "oracle" here means a source of answers: you ask a question by sending a request, and the error tells you something true about the system, like whether the address exists and which fields it expects. It is like knocking on doors in a corridor: a door that answers with "you forgot the password" is a real door, while silence or "no such address" tells you there is nothing there.

Root cause

The report does not describe the server-side mechanism behind the gap between logging in and passing 2FA. The logged-in user, even with 2FA still required, was still allowed internal data to be leaked.

A second, smaller weakness compounds it: XController error responses leak a stack trace and enough detail about required fields to let a caller enumerate valid controllers and their parameters. The report says the logged-in user was still allowed internal data to be leaked, and that the error could be used to build a list of valid XControllers.

Impact

The report states that the logged-in user, even with 2FA required, was still allowed internal data to be leaked. The report states that the logged-in user, even with 2FA required, was still allowed to leak internal data, and that the error oracle allows mapping internal XControllers and their valid fields. The report does not enumerate which data was exposed.

Facebook's own position, given in the timeline, was that the impact was minimal because without 2FA the internal infrastructure cannot be accessed, and it said the issue was out of scope and not considered a security vulnerability. Later, on 20 October 2021, Facebook said it had re-analysed the surface area reachable when logged in to an employee account without 2FA and found that a number of endpoints related to mobile app downloads were accessible there, potentially exposing internal-only and unreleased applications. On 20 October 2021 a $6000 bounty was awarded by Meta.

The practical condition is important: the attack requires valid @fb.com credentials in the first place, and here they came from a public live stream rather than from any flaw in Facebook's authentication.

Fix

Facebook's reply of 16 February 2021 states that the vulnerability was patched, the video was taken down and the credentials were invalidated.

The October 2021 follow-up describes the remediation direction for the wider surface: Facebook said it was working to limit the applications exposed through the mobile app download endpoints to only otherwise publicly available applications. Facebook said it was working to limit the applications exposed there to otherwise publicly available ones.

Variants to test

  1. 2FA bypass on sibling internal properties. Take a session that has passed password authentication but not 2FA on any internal property and replay requests to internal API routes. A positive result is any response containing internal data rather than a redirect to, or error from, the 2FA gate.
  2. Error-based controller enumeration. Send requests with deliberately wrong or missing fields to candidate internal endpoints and compare the errors. A positive result is a stack trace or validation error that names the required fields, letting you distinguish real controllers from non-existent paths.
  3. Mobile app download endpoints. On an employee session without 2FA, request the endpoints related to mobile app downloads. A positive result is a listing or download of internal-only or unreleased applications.
  4. Contractor identification. Look for the flag that marks contractor accounts on the public platform and review their public output, such as live streams, for exposed credentials. A positive result is a working credential for an internal property.

Timeline

The report includes the exchange verbatim, with redactions.

  • Reported Thursday, 11 February 2021 at 5:54 AM; the leaked credential video had been up for three days.
  • Facebook replied on 11 February 2021 at 6:23 AM, confirming it had reproduced the report, asking the researcher to cease testing that relies on leaked credentials, and asking for the link to the livestream.
  • The researcher replied at 6:26 AM with the video link, and at 6:47 AM with an MDM config obtained from a later video by the same owner.
  • Facebook replied on Tuesday, 16 February 2021 at 4:56 AM: the vulnerability was believed patched, the video taken down and the credentials invalidated; the Seqrite MDM config was not related to Facebook.
  • The researcher asked for disclosure on Thursday, 25 February 2021 at 7:03 AM.
  • Facebook replied on Tuesday, 2 March 2021 at 2:25 PM and again at 3:45 PM, saying the team would follow up.
  • The researcher replied on Thursday, 4 March 2021 at 5:13 AM, quoting the response given at whitehat.workplace.com, which sets out the obligation to cease access, notify Facebook, delete the data and not share it.
  • Facebook replied on Thursday, 11 March 2021 at 2:09 PM: the issue was out of scope and not considered a security vulnerability, the impact was minimal because without 2FA the internal infrastructure cannot be accessed, the data accessed is personal data and cannot be shared publicly, a blog about the general issue is allowed but posting raw information would violate the terms, and the researcher's actions demonstrated good faith.
  • On Wednesday, 20 October 2021 at 1:34 PM, Facebook said it had re-analysed the surface area reachable when logged in to an employee account without 2FA, identified accessible endpoints related to mobile app downloads that could expose internal-only and unreleased applications, and was working to limit the applications exposed there to otherwise publicly available ones.

Glossary

  • 2FA (two-factor authentication): a second proof of identity after the password, usually a code, so a stolen password alone is not enough to log in.
  • API: the set of addresses and message formats a site's own pages use to exchange data with its servers.
  • AsyncRequest: the client-side helper Facebook's web pages use to send background requests to their servers.
  • Authenticated vs authorised: authenticated means the system knows who you are; authorised means it has decided you are allowed to do a particular thing. A session can be one without the other.
  • Bounty: a payment a company makes to a researcher who reports a security problem to it.
  • Contractor: an outside worker hired by a company, here to test features on its products.
  • Credentials: the pair of a username (or email) and password used to log in.
  • Disclosure: making the details of a security report public, here with the company's agreement.
  • Endpoint: a specific address on a server that accepts requests, such as one internal handler's URL.
  • Enumeration: systematically listing things that exist, for example which endpoints are real and which fields each one expects.
  • Flag: a marker or setting that identifies something, here one that marks contractor accounts.
  • Good faith: acting honestly and stopping when you realise you have gone too far, which matters for the safe harbour rules quoted in the report.
  • Internal property: a website or service that only a company's own staff are meant to use.
  • Live stream: a video broadcast in real time that anyone can watch while it happens.
  • MDM config: mobile device management configuration, settings used to manage phones and tablets in an organisation.
  • Oracle: any behaviour that answers questions about a system you cannot see directly, such as an error message that reveals whether an endpoint exists.
  • Out of scope: outside the rules of a bug bounty programme, so not eligible for a reward under those rules.
  • Patched: fixed by changing the code or configuration.
  • Request body: the content sent along with a request, such as the fields and values a handler should act on.
  • Safe harbour: a promise from a company that researchers who follow its rules will not be treated as attackers.
  • Session: the state a server keeps after you log in, so it can recognise your later requests without asking for the password again.
  • Stack trace: debugging output listing the internal steps code went through before failing, which can reveal implementation details.
  • Surface area: everything an attacker can reach and interact with, here the internal endpoints available to a logged-in session.
  • XController: one of the server-side handlers that answers the site's internal background requests.

More by Philippe Harewood

View all

12 more disclosed reports, best first.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.