Skip to content
Info disclosure Write-up Intermediate

Find-Mingle-Suggestions-For-Any-Facebook-User

A GraphQL query on Facebook's Mingle feature exposed a user's friend list even when that list was set to private. An attacker could use this to see friends of any user who had the feature enabled.

Philippe Harewood Follow

Published on philippeharewood.com

Facebook Mingle seems to be a product still in limited testing. It describes itself as a way to “make plans with friends – but only if everyone says yes”.

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

Context

Facebook Mingle was, at the time of this report, a product still in limited testing. It describes itself as a way to "make plans with friends, but only if everyone says yes". The feature produces a list of mingle suggestions for a user, and those suggestions are drawn from the user's friends.

That design detail is what makes the feature interesting from a privacy perspective. If the mingle suggestion list is composed of friends, then anyone who can read the Mingle data for a user can also learn who that user's friends are, even when the user has locked down their friend list.

Setup

The researcher did not have the Mingle feature enabled on their own account, so they could not observe the feature's normal behaviour directly. The work was done against the GraphQL endpoint of the Facebook Graph API, using a query that targets a user by ID. No special tooling, versions or account roles are described beyond that.

Finding it

The starting observation was the relationship between Mingle and the friend graph: because Mingle hands out suggestions as friends, the suggestion data is effectively a view onto the friend list. If the Mingle data can be reached through an API path that does not enforce the friend list privacy setting, the privacy control on the friend list is bypassed.

The researcher framed this as a question of whether one can see the Mingle data for a user, and noted that the answer would let them see that user's friends even when the friend list is locked down.

Exploitation

Step 1: Query the mingle suggestions for a target user

The proof of concept is a single GraphQL query sent to the Graph API, with the target user's ID substituted for USER_ID:

HTTP
https://graph.facebook.com/graphql?q=node(USER_ID){mingle_suggestions{nodes{id,mingle_participants{nodes{id,url,name,friends.find(USER_ID)}}}}}

The query walks from the target user node into mingle_suggestions, then into the nodes of that connection, and for each suggestion pulls id, plus the mingle_participants connection with each participant's id, url and name. Finally, for each participant it calls friends.find(USER_ID).

Step 2: Read the response

The researcher shows a partial response:

{
"USER_ID": {
"mingle_suggestions": {
"nodes": [
{
"id": "FRIEND_ID",
"url": "https://www.facebook.com/wesleysnipesss",
"name": "Wesley Snipes",
"friends": {
"nodes": [
{
"id": "USER_ID",
"url": "https://www.facebook.com/USER_ID",
"name": "USER ID"
}]}}

The response returns a mingle suggestion node whose id is a friend of the target, with that friend's profile URL and display name. The nested friends connection, filtered with friends.find(USER_ID), comes back containing the target user. In other words, the query confirms that the suggested participant is indeed a friend of USER_ID, and it does so through data returned by the API.

Step 3: Understand the query structure

The researcher breaks the query down into its three logical parts:

{
    mingle_suggestions {
        nodes {
            id, mingle_participants {
                nodes {
                    id, url, name, friends.find(USER_ID)
}}}}}
  1. It requests all suggestions for the targeted user to mingle with.
  2. Then it requests the participants of a selected mingle.
  3. Finally, to check that the participants are indeed friends of USER_ID, it checks the connection through the friend list of any lists that are publicly available, using friends.find(USER_ID). This step is optional: it is mainly there to show that the friend list privacy has been violated.

Root cause

The Mingle suggestion list is built from the target user's friends, and the GraphQL path that exposes mingle_suggestions and mingle_participants returns those friends' id, url and name. The optional friends.find(USER_ID) step demonstrates the gap: the same friend relationship that the privacy setting is meant to hide is reachable through the Mingle connection.

Impact

The researcher states plainly that, because the feature was not enabled on their account, they do not know the full impact of a mingle and its privacy. What they do know is that partial friends lists are being leaked via mingle suggestions. The researcher states that partial friends lists are being leaked via mingle suggestions.

Fix

The report does not describe any fix or remediation. The timeline records only the report being sent on 2 February 2017, additional data sent on 3 February 2017, escalation by Facebook on 7 February 2017, and a bounty awarded on 21 February 2017.

Variants to test

  • Query mingle_suggestions for a user whose friend list is locked down and check whether mingle_participants still returns id, url and name for friends. A positive result is any participant data returned for a user whose friend list should be private.
  • Drop the optional friends.find(USER_ID) clause and see whether the participant list alone still leaks friend identities. A positive result is participant records that match the target's friends without needing the friend list connection.
  • Walk other GraphQL connections that are derived from the friend graph (suggestions, invitations, shared-event or group membership style connections) and test whether they apply the same privacy check as the friend list. A positive result is any such connection returning friend identifiers for a user with a restricted friend list.
  • Compare the response for a user with a public friend list against one with a private friend list. A positive result is identical participant data in both cases, which shows the privacy setting is not being consulted.

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

What happened, in plain words

Facebook has a feature called Mingle. At the time of this report it was still in limited testing, meaning only some people could use it. Mingle describes itself as a way to "make plans with friends, but only if everyone says yes".

To help you make plans, Mingle shows you a list of suggestions: people you could mingle with. Those suggestions are taken from your friends. That is the important part. If the suggestion list is made of your friends, then anyone who can read your Mingle suggestions can also learn who your friends are, even if you have set your friend list to private.

This report shows that the data behind Mingle could be requested through Facebook's Graph API and that partial friends lists were leaked. The researcher could not turn Mingle on for their own account, so they could not watch the feature work normally. Instead they sent a query directly to the API and read the answer.

Background ideas you need first

Before the steps, a few plain definitions. They come up again and again below.

  • API: an API is a way for one piece of software to ask another piece of software for data or actions, without a human clicking buttons. Think of a restaurant: the menu and the waiter are the API. You do not walk into the kitchen; you ask through the waiter, in a format the kitchen understands. Facebook's Graph API is the waiter for Facebook data.
  • GraphQL: a query language for APIs. Instead of calling many fixed addresses, you send one request that describes exactly which fields you want, and the server sends back a matching shape of data. It is like filling in a form that says "give me this, and inside it give me that", rather than ordering separate dishes one by one.
  • Graph API: Facebook's API. Data is arranged as objects (a user, a post, a page) connected to other objects. You start at one object and walk along its connections.
  • Node: one object in that graph, usually identified by an ID. A user is a node; a mingle suggestion is a node.
  • Connection: a named link from one node to a list of related nodes. mingle_suggestions is a connection from a user to a list of suggestions. friends is a connection from a user to their friends.
  • Field: a single piece of data you ask for, such as id, url or name.
  • User ID: the number Facebook uses internally to identify an account. In the examples it is written as USER_ID, a placeholder for a real number.
  • Privacy setting: a control on your account that says who may see something, for example your friend list. When it is locked down, other people should not be able to read that list.
  • Access control / authorisation check: the server-side rule that decides whether a request is allowed to see a piece of data. A privacy setting is only real if the server actually checks it on every path that can reach the data.
  • Bypass: getting to data through a different route that skips the check. The check still exists on the front door, but another door was left open.
  • Proof of concept (PoC): a small, concrete demonstration that a problem is real, usually the shortest request that produces the unwanted result.

The setup

The researcher did not have Mingle enabled on their own account. That matters because it means they could not simply open the feature in a browser and watch what it sends. Instead they worked directly against the GraphQL endpoint of the Facebook Graph API, sending a query that targets a user by ID. The report does not describe any special tools, software versions or account roles beyond that.

Finding it

The starting thought was simple: Mingle builds its suggestions out of your friends, so the suggestion data is effectively another view of your friend list. If that view can be reached through an API path that does not apply the friend list privacy setting, then the privacy setting is bypassed. The researcher framed the question as: can I see the Mingle data for a user? If yes, I can see that user's friends even when their friend list is locked down.

Exploitation

Step 1: Ask for the mingle suggestions of a target user

The proof of concept is one GraphQL query sent to the Graph API. The target user's real ID goes where USER_ID is written:

HTTP
https://graph.facebook.com/graphql?q=node(USER_ID){mingle_suggestions{nodes{id,mingle_participants{nodes{id,url,name,friends.find(USER_ID)}}}}}

Line by line, in plain words:

  1. https://graph.facebook.com/graphql is the address of the GraphQL endpoint. This is the waiter you hand your order to.
  2. ?q= means the query itself is passed as a parameter in the URL, rather than in a request body.
  3. node(USER_ID) says: start at the object (node) belonging to this user. Everything after it is read relative to that user.
  4. {mingle_suggestions{...}} says: from that user, follow the mingle_suggestions connection, which is the list of people Mingle suggests.
  5. nodes{...} says: for each suggestion in that list, give me the following fields.
  6. id asks for the suggestion's identifier.
  7. mingle_participants{nodes{...}} says: inside each suggestion, follow the mingle_participants connection, the people taking part in that mingle, and for each participant give me the fields in the inner braces.
  8. id,url,name asks for each participant's identifier, profile address and display name.
  9. friends.find(USER_ID) is a filter on the participant's friends connection: return only the friend entry that matches USER_ID. In other words: "among this participant's friends, is the target user there?"

Why this step: the researcher wanted one request that both lists the suggested people and checks whether those people are friends of the target. If the answer comes back with real names and profile links, the privacy setting did not stop the request.

Step 2: Read the answer

The researcher shows a partial response:

{
"USER_ID": {
"mingle_suggestions": {
"nodes": [
{
"id": "FRIEND_ID",
"url": "https://www.facebook.com/wesleysnipesss",
"name": "Wesley Snipes",
"friends": {
"nodes": [
{
"id": "USER_ID",
"url": "https://www.facebook.com/USER_ID",
"name": "USER ID"
}]}}

What this says, piece by piece:

  1. The top level is keyed by USER_ID, the user we asked about.
  2. Under it, mingle_suggestions contains a list of nodes, the suggestions.
  3. The first suggestion has an id of FRIEND_ID, a profile url and a display name. So the API has handed back a person connected to the target user, with identifying details.
  4. Inside that suggestion, the friends connection, which we filtered with friends.find(USER_ID), comes back containing the target user.

That last part is the confirmation. The suggested participant is indeed a friend of USER_ID, and the API itself returned the evidence. The researcher did not need to guess the relationship; the response proved it.

Step 3: Understand the query structure

The researcher then breaks the query into its three logical parts:

{
    mingle_suggestions {
        nodes {
            id, mingle_participants {
                nodes {
                    id, url, name, friends.find(USER_ID)
}}}}}
  1. It requests all suggestions for the targeted user to mingle with.
  2. Then it requests the participants of a selected mingle.
  3. Finally, to check that the participants are indeed friends of USER_ID, it checks the connection through the friend list of any lists that are publicly available, using friends.find(USER_ID). This step is optional: it is mainly there to show that the friend list privacy has been violated.

Why the breakdown matters: it separates the leak from the proof. The first two parts are the leak itself, the suggestion and participant data. The third part is the receipt, showing that the people in that data are the target's friends. The researcher notes this step is optional and is mainly there to show that the friend list privacy has been violated.

Root cause

The Mingle suggestion list is built from the target user's friends. The GraphQL path that exposes mingle_suggestions and mingle_participants returns those friends' id, url and name. The optional friends.find(USER_ID) step demonstrates the gap: the same friend relationship that the privacy setting is meant to hide is reachable through the Mingle connection.

A useful comparison: a building can have a locked front door and an unlocked side door that leads to the same room. Locking one door does not protect the room if another entrance to it is left open. Here the friend list was the locked front door, and the Mingle connection was the side door.

Impact

The researcher states plainly that, because the feature was not enabled on their account, they do not know the full impact of a mingle and its privacy. What they do know is that partial friends lists are being leaked via mingle suggestions. The researcher states that partial friends lists are being leaked via mingle suggestions. It is limited to whatever the mingle suggestion data exposes.

Fix

The report does not describe any fix or remediation. The timeline records only the report being sent on 2 February 2017, additional data sent on 3 February 2017, escalation by Facebook on 7 February 2017, and a bounty awarded on 21 February 2017.

Variants to test

These are follow-up checks in the same spirit, each with a clear sign that something is wrong:

  • Query mingle_suggestions for a user whose friend list is locked down and check whether mingle_participants still returns id, url and name for friends. A positive result is any participant data returned for a user whose friend list should be private.
  • Drop the optional friends.find(USER_ID) clause and see whether the participant list alone still leaks friend identities. A positive result is participant records that match the target's friends without needing the friend list connection.
  • Walk other GraphQL connections that are derived from the friend graph, such as suggestions, invitations, shared-event or group membership style connections, and test whether they apply the same privacy check as the friend list. A positive result is any such connection returning friend identifiers for a user with a restricted friend list.
  • Compare the response for a user with a public friend list against one with a private friend list. A positive result is identical participant data in both cases, which shows the privacy setting is not being consulted.

Glossary

  • API: a way for software to ask another service for data or actions in a defined format, like a waiter taking your order to the kitchen.
  • Access control: the server-side rule that decides whether a request is allowed to see a piece of data.
  • Authorisation check: the specific test a server performs to confirm a request has permission for what it is asking.
  • Bypass: reaching data through a different route that skips a check which exists elsewhere.
  • Connection: in GraphQL, a named link from one object to a list of related objects, such as friends or mingle_suggestions.
  • Endpoint: the address a request is sent to, here https://graph.facebook.com/graphql.
  • Field: a single piece of data requested in a query, such as id, url or name.
  • Graph API: Facebook's API, where data is arranged as objects connected to other objects.
  • GraphQL: a query language for APIs where the request describes exactly which fields and nested fields to return.
  • Mingle: a Facebook product, in limited testing at the time, for making plans with friends only if everyone agrees; it suggests friends to mingle with.
  • Node: one object in a graph, usually identified by an ID, such as a user or a suggestion.
  • Partial response: an excerpt of a full API response, showing only the part relevant to the point being made.
  • Privacy setting: an account control that says who may see something, such as a friend list.
  • Query: the request text sent to a GraphQL API describing the data wanted.
  • User ID: the number Facebook uses internally to identify an account; shown as USER_ID in the examples.
  • friends.find(USER_ID): a filter on a participant's friends connection that returns only the entry matching USER_ID, used here to confirm the friend relationship.

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.