Skip to content
Info disclosure Write-up Intermediate

Disclose-Page-Admins-Via-Job-Source-Recruiter-Requests

A GraphQL endpoint used when responding to a job source recruiter request returned the identity of the page admin who accepted or declined it. An attacker who could obtain a job source request ID could learn which admin had acted on the request.

Philippe Harewood Follow

Published on philippeharewood.com

It is possible to grant access to external recruiters and hiring managers for Facebook job posts. However, the page admin, responding to a request was disclosed, if the request was accepted or rejected.

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. 3 min read.

Context

Facebook job posts let a page grant access to external recruiters and hiring managers, so that people outside the page can be attached to a job opening as a source of candidates. The feature is managed from the page's jobs section, and the page admin has to respond to each recruiter or hiring manager request: they can decline, accept or ignore it.

The problem described here is that the response to such a request leaked the identity of the page admin who made it. The disclosure happened whether the request was accepted or rejected.

Setup

The write-up does not describe any special accounts, tools or versions. The report does not describe any special accounts, tools or versions.

Finding it

The researcher was looking at how job source recruiter requests are handled. Responding to a request produced a GraphQL response that contained the viewer's account user object, and a notification was sent to the admins of the page. That response exposed the page admin who had acted on the request, which is information the requesting party should not have been able to see.

Exploitation

Step 1: send the GraphQL mutation

The request is a POST to the GraphQL endpoint with a doc_id and a variables parameter:

HTTP
HTTP POST
graph.facebook.com/graphql
doc_id=1
variables={"input":{"client_mutation_id":"6","actor_id":"1","page_id":"1"}}

The variables value carries the mutation input: a client_mutation_id, the actor_id and the page_id. The response came back as follows:

JSON
{
    "data": {
        "jobs_request_recruiter_role": {
            "viewer": {
                "account_user": {
                    "id": "1"
                }
            }
        }
    }
}

The jobs_request_recruiter_role field returns a viewer object, and under it an account_user with an id. That is the account of the page admin who responded. A notification is also sent to any admins of the page.

Step 2: obtain the job source request ID

To act on a specific request, the researcher needed its identifier. An indirect object reference to the job section gives it:

Text
https://m.facebook.com/pages/edit/jobs/PAGE_ID

On that page there is an action link:

Text
https://m.facebook.com/pages/edit_job_source/?job_opening_source_id=111

The job_opening_source_id parameter represents the job source request from the user. The page admin has three choices: decline, accept or ignore. Accepting or declining the request produces a response:

JSON
{
    "111": {
        "page_job_opening_source_page_admin_actor": {
            "name": "Facebook User with a page role",
            "url": "https://www.facebook.com/1",
            "id": "1"
        }
    }
}

Keyed by the request ID (111), the response contains page_job_opening_source_page_admin_actor with the admin's name, url and id. The response contains the admin actor's name, url and id.

Root cause

The job source request object is tied to the page admin who acted on it, and the response returned that actor's profile data to the party who made the request.

Impact

The identity of page admins could be disclosed when they respond to job source recruiter requests. This applies to external recruiters and hiring managers who have been granted access to a page's job posts, and it happens whether the admin accepts or declines the request. The disclosure exposes the admin's account ID and profile URL.

Fix

Facebook fixed the issue on 18 June 2018, five days after the report was sent.

Variants to test

  1. Look for other GraphQL fields that return an actor, viewer or admin object alongside a request or approval flow, and check whether a non-admin participant can read it. A positive result is a response containing a profile ID or URL for a user who is not the caller.
  2. Test the same pattern on other page-level request flows (access requests, role invitations, source approvals) where an external party initiates the request. A positive result is the external party seeing the identity of the admin who responded.
  3. Check whether the request ID in job_opening_source_id can be enumerated or swapped for another page's request. A positive result is a response for a request the caller should not be able to see.
  4. Compare the accept and decline paths. A positive result is either path returning the admin actor object when the other does not, which suggests the check is applied inconsistently.

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. 8 min read.

What happened, in plain words

Facebook pages can post job openings. A page can also let people from outside the page, such as external recruiters and hiring managers, be attached to a job opening as a source of candidates. When one of those outside people asks to be connected to a job, a page admin has to respond. The admin can decline the request, accept it, or simply ignore it.

The bug in this report is about what the outside person sees after the admin responds. When the admin accepted or declined, the response sent back to the requesting party included information about the admin: their account ID and a link to their profile. That is information the recruiter or hiring manager should not have been able to see. It happened whether the admin accepted or rejected the request.

To follow the rest of this article you only need to know how a web page works and what it means to send a request to a server. Everything else is explained as it comes up.

Background ideas you will need

A few terms appear throughout the report, so here they are before we start.

  • API: a way for one piece of software to talk to another. Think of a restaurant: you do not walk into the kitchen, you tell the waiter what you want and the waiter brings it back. An API is the waiter between your browser (or a tool) and Facebook's servers.
  • GraphQL: a style of API where the client sends a query describing exactly which pieces of data it wants, and the server answers with those pieces. Instead of many separate addresses for many separate things, there is usually one address, here graph.facebook.com/graphql, and the request says what to fetch or change.
  • Mutation: in GraphQL, a request that changes something rather than only reading it. Accepting a recruiter request is a change, so it is a mutation.
  • Endpoint: the address a request is sent to. graph.facebook.com/graphql is the endpoint used here.
  • Parameter: a named value attached to a request, such as doc_id=1. It is like filling in a field on a form.
  • ID: a number or string that uniquely identifies something, such as a user, a page or a request. Facebook uses numeric IDs.
  • Object reference: a way of pointing at a specific item, usually by putting its ID in a URL or a parameter. An indirect object reference means the ID is not shown in an obvious place but can still be found and used, for example by looking at a link on a page.
  • Access control: the rules that decide who is allowed to see or do what. A missing or too loose access control rule is what lets someone see data they should not.
  • Information disclosure: a vulnerability class where data that should stay private is shown to someone who should not have it. Here the private data is the identity of the page admin.
  • Notification: a message Facebook sends to a user, for example to tell page admins that something happened on their page.

The feature being tested

Facebook job posts let a page grant access to external recruiters and hiring managers, so that people outside the page can be attached to a job opening as a source of candidates. The feature is managed from the page's jobs section. Each recruiter or hiring manager request has to be answered by a page admin, who can decline it, accept it or ignore it.

The researcher was looking at how these job source recruiter requests are handled. Responding to a request produced a GraphQL response that contained the viewer's account user object, and a notification was sent to the admins of the page. That response exposed the page admin who had acted on the request, which is information the requesting party should not have been able to see.

What you need before trying it

The write-up does not describe any special accounts, tools or versions. The report does not describe any special accounts, tools or versions.

Step 1: send the GraphQL mutation

The first step is the request that answers a recruiter request. It is a POST to the GraphQL endpoint, carrying a doc_id and a variables parameter:

HTTP
HTTP POST
graph.facebook.com/graphql
doc_id=1
variables={"input":{"client_mutation_id":"6","actor_id":"1","page_id":"1"}}

Line by line:

  1. HTTP POST says this request is meant to change something on the server, not just read it. Accepting or declining a request is a change.
  2. graph.facebook.com/graphql is the address the request goes to, Facebook's GraphQL endpoint.
  3. doc_id=1 is a parameter that tells Facebook which stored GraphQL operation to run.
  4. variables={...} carries the input for that operation. Inside it, client_mutation_id is an identifier the client attaches to its own change, actor_id identifies the account performing the action, and page_id identifies the page the job belongs to. All the values shown are placeholders.

The response came back as follows:

JSON
{
    "data": {
        "jobs_request_recruiter_role": {
            "viewer": {
                "account_user": {
                    "id": "1"
                }
            }
        }
    }
}

Line by line:

  1. data is the part of a GraphQL response that holds the requested information.
  2. jobs_request_recruiter_role is the field that was asked for: the result of the recruiter role request operation.
  3. viewer is the account that is viewing or acting, in this case the page admin who responded.
  4. account_user is the user account behind that viewer.
  5. id is that account's numeric ID. The value 1 is a placeholder.

That id is the account of the page admin who responded. The response therefore tells the requesting party who handled their request. A notification is also sent to any admins of the page.

Step 2: obtain the job source request ID

To act on a specific request, the researcher needed its identifier. An indirect object reference to the job section gives it:

Text
https://m.facebook.com/pages/edit/jobs/PAGE_ID

This is the mobile web address of a page's jobs editing section. PAGE_ID stands for the numeric ID of the page. Opening it shows the page's job-related items, and from there the researcher could find the link to a particular request.

On that page there is an action link:

Text
https://m.facebook.com/pages/edit_job_source/?job_opening_source_id=111

Here job_opening_source_id is the parameter that represents the job source request from the user, and 111 is a placeholder for its value. The ID of the request appears in a link on the page, which the report calls an indirect object reference.

The page admin has three choices: decline, accept or ignore. Accepting or declining the request produces a response:

JSON
{
    "111": {
        "page_job_opening_source_page_admin_actor": {
            "name": "Facebook User with a page role",
            "url": "https://www.facebook.com/1",
            "id": "1"
        }
    }
}

Line by line:

  1. "111" is the key of the response: it is the request ID, the same value that was in job_opening_source_id.
  2. page_job_opening_source_page_admin_actor is the object describing the page admin who acted on that request.
  3. name is the admin's display name.
  4. url is a link to the admin's profile.
  5. id is the admin's numeric account ID, again a placeholder.

So the response is keyed by the request ID and contains the admin's name, profile URL and ID. The response contains the admin actor's name, url and id.

Why this is a problem

The job source request object is tied to the page admin who acted on it, and the response returned that actor's profile data to the party who made the request.

In everyday terms: the recruiter is allowed to see their own request, which is fine. The mistake is that the same answer also carried the admin's profile details, which the recruiter was never meant to see.

Impact

The identity of page admins could be disclosed when they respond to job source recruiter requests. This applies to external recruiters and hiring managers who have been granted access to a page's job posts, and it happens whether the admin accepts or declines the request. The disclosure exposes the admin's account ID and profile URL.

Fix

Facebook fixed the issue on 18 June 2018, five days after the report was sent.

Timeline

Date Event
13 June 2018 Report sent
14 June 2018 Further investigation by Facebook
18 June 2018 Fixed by Facebook
19 June 2018 Bounty awarded by Facebook

Similar things to test

  1. Look for other GraphQL fields that return an actor, viewer or admin object alongside a request or approval flow, and check whether a non-admin participant can read it. A positive result is a response containing a profile ID or URL for a user who is not the caller.
  2. Test the same pattern on other page-level request flows (access requests, role invitations, source approvals) where an external party initiates the request. A positive result is the external party seeing the identity of the admin who responded.
  3. Check whether the request ID in job_opening_source_id can be enumerated or swapped for another page's request. A positive result is a response for a request the caller should not be able to see.
  4. Compare the accept and decline paths. A positive result is either path returning the admin actor object when the other does not, which suggests the check is applied inconsistently.

Glossary

  • API: a way for one piece of software to talk to another, like a waiter carrying orders between you and the kitchen.
  • Access control: the rules that decide who may see or do what.
  • Actor: the account that performs an action, here the page admin who accepted or declined a request.
  • Endpoint: the address a request is sent to, such as graph.facebook.com/graphql.
  • GraphQL: an API style where the client describes exactly which data it wants and the server returns those fields.
  • ID: a number or string that uniquely identifies something, such as a user, page or request.
  • Indirect object reference: pointing at an item using an ID found somewhere else, such as in a link on a page, rather than knowing it in advance.
  • Information disclosure: a vulnerability where data that should stay private is shown to someone who should not have it.
  • Mutation: a GraphQL request that changes something rather than only reading it.
  • Notification: a message Facebook sends to a user, for example to page admins.
  • Object reference: a way of pointing at a specific item, usually by its ID.
  • POST: an HTTP method used when a request is meant to change something on the server.
  • Viewer: the account that is viewing or acting in a request, here the page admin who responded.

More by Philippe Harewood

View all

56 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.