Responsible disclosure: retrieving a user’s private Facebook friends.
Instagram allowed new users to access features, including friend suggestions based on a linked Facebook account, before confirming their email address. An attacker who knew a victim's email could sign up with that email and view the victim's private Facebook friends list.
Published on rpadovani.com
Data access control isn’t easy. While it can sound quite simple, it is very difficult, both on a theoretical side and on a practical side.
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 acquired Instagram in 2012, and the two products were integrated in several ways. One of those integrations is the "people to follow" suggestion: when you sign up to Instagram, it suggests accounts to follow based on your Facebook friends. To do that, Instagram has to know which Facebook account belongs to you, so the two accounts end up linked.
The link is created when you sign up to Instagram with your Facebook account, but also when you create a fresh Instagram account using the same email address you use on Facebook. The report notes there are other ways Instagram links a new account to an existing Facebook account, but they are not relevant here.
The practical consequence, as the author puts it, is that if you want a secret Instagram account you should create a new email address for it.
The feature at the centre of the report is email address confirmation. Confirming your email proves you are signing up with your own address and not somebody else's. At the time, Instagram enabled all of its features for new users before the email address had been confirmed, so that sign-up would not be interrupted and users could confirm later. One of those pre-confirmation features was the suggestion of who to follow based on the Facebook friends of the automatically linked account.
Setup
The precondition is knowledge of the target's email address, which the author describes as all but secret. The attacker does not need a Facebook account, does not need to be a friend of the victim, and is not affected by the victim's Facebook privacy settings. The victim does not need an Instagram account: the whole point is that the victim's Facebook friends can be read even though the victim never signed up to Instagram.
No special tooling is described. The steps are performed through the normal Instagram sign-up flow and the normal suggestions screen.
Finding it
The author frames the issue as a data access control problem that arises as an unwanted side effect of a useful feature. Two useful features combine badly:
- Suggestions of people to follow based on a linked Facebook account.
- The ability to use a new Instagram account immediately, before confirming the email address.
Because the link between the new Instagram account and the existing Facebook account is made through the shared email address, and because the suggestions are available before that email address is proven to belong to the person signing up, anyone who knows a victim's email address can create an Instagram account with it and immediately see the victim's Facebook friends. The author estimates that, with more than 2 billion Facebook accounts and just 800 million Instagram accounts, at least 1.5 billion accounts were vulnerable.
Exploitation
Step 1: obtain the target's email address
The only input the attack needs is the email address of the target. The author notes that an email address is all but secret.
Step 2: sign up to Instagram with that email address
The attacker signs up to Instagram using the victim's email address. Instagram links the new account to the existing Facebook account that uses the same address. The attacker does not confirm the email address, and does not need to: the features are available before confirmation.
Step 3: open the suggestions of people to follow
With the new account, the attacker goes to the suggestions of people to follow. Those suggestions are derived from the Facebook friends of the linked account, so they expose the victim's friend list.

The screenshot shows the list of the victim's friends.
Root cause
The design mistake is that a sensitive, cross-product data flow (Facebook friends surfaced as Instagram follow suggestions) was gated on nothing more than an email address typed into a sign-up form. The link between the new Instagram account and the existing Facebook account is established through the shared email address, but the email address is not verified before the linked data is exposed. Email confirmation exists precisely to prove that the person signing up owns the address; enabling the suggestions before confirmation removed that check from the path.
Existing defences did not help. The victim's Facebook privacy settings were irrelevant, friendship between attacker and victim was irrelevant, and the attacker needed no Facebook account at all. The only thing standing between an attacker and the friend list was ownership of the email address, and that ownership was never tested before the data was shown.
Impact
An attacker who knows a target's email address can retrieve the Facebook friend list of anyone who does not have an Instagram account. The author's estimate is that at least 1.5 billion accounts were exposed, based on the gap between the number of Facebook accounts (more than 2 billion) and Instagram accounts (800 million). The exposure does not depend on the attacker being a Facebook friend of the victim, on the victim's Facebook privacy settings, or on the attacker having a Facebook account.
Fix
Facebook deployed a fix on 30 August 2018 and asked the author to test it. The report does not describe the change itself.
Timeline
| Date | Event |
|---|---|
| 20 August 2018 | First disclosure to Facebook |
| 20 August 2018 | Facebook requests more information |
| 20 August 2018 | More information provided to Facebook |
| 21 August 2018 | Facebook closes the issue, saying it was not a security issue |
| 21 August 2018 | Author submits a new demo with more information |
| 23 August 2018 | Facebook confirms the issue |
| 30 August 2018 | Facebook deploys a fix and asks for a test |
| 12 September 2018 | Facebook awards the bounty |
Facebook awarded a $3000 bounty for the disclosure.
Variants to test
- Unverified-email feature gating on other sign-up flows. Create an account with an email address you control but do not confirm, and check whether features that surface data belonging to the address's real owner (contact suggestions, "people you may know", imported contacts, linked social accounts) are available. A positive result is seeing another account's data before confirmation.
- Account linking by shared email. Sign up with an email address already used on a linked product and see whether the new account inherits any of the existing account's social graph or suggestions. A positive result is suggestions that match the existing account's connections.
- Cross-product suggestion endpoints. Where a product suggests follows based on another product's graph, test whether the suggestions can be triggered for an account whose email has not been verified. A positive result is a populated suggestion list for an unverified address.
- Privacy-setting bypass. For any suggestion feature, compare results for a target with restrictive privacy settings against a target with open settings. A positive result is the same data returned in both cases, showing the setting is not consulted.
What happened, in plain words
Facebook bought Instagram in 2012, and the two services were connected in several ways. One of those connections is the "people to follow" suggestion: when you sign up to Instagram, it suggests accounts to follow based on your Facebook friends. To do that, Instagram has to know which Facebook account belongs to you, so the two accounts end up linked.
The link is created when you sign up to Instagram with your Facebook account, but also when you create a fresh Instagram account using the same email address you use on Facebook. The report notes there are other ways Instagram links a new account to an existing Facebook account, but they are not relevant here.
The practical consequence, as the author puts it, is that if you want a secret Instagram account you should create a new email address for it.
The feature at the centre of the report is email address confirmation. Confirming your email proves you are signing up with your own address and not somebody else's. At the time, Instagram enabled all of its features for new users before the email address had been confirmed, so that sign-up would not be interrupted and users could confirm later. One of those pre-confirmation features was the suggestion of who to follow based on the Facebook friends of the automatically linked account.
Setup
The precondition is knowledge of the target's email address, which the author describes as all but secret. The attacker does not need a Facebook account, does not need to be a friend of the victim, and is not affected by the victim's Facebook privacy settings. The victim does not need an Instagram account: the whole point is that the victim's Facebook friends can be read even though the victim never signed up to Instagram.
No special tooling is described. The steps are performed through the normal Instagram sign-up flow and the normal suggestions screen.
Finding it
The author frames the issue as a data access control problem that arises as an unwanted side effect of a useful feature. Two useful features combine badly:
- Suggestions of people to follow based on a linked Facebook account.
- The ability to use a new Instagram account immediately, before confirming the email address.
Because the link between the new Instagram account and the existing Facebook account is made through the shared email address, and because the suggestions are available before that email address is proven to belong to the person signing up, anyone who knows a victim's email address can create an Instagram account with it and immediately see the victim's Facebook friends. The author estimates that, with more than 2 billion Facebook accounts and just 800 million Instagram accounts, at least 1.5 billion accounts were vulnerable.
Exploitation
Step 1: obtain the target's email address
The only input the attack needs is the email address of the target. The author notes that an email address is all but secret.
Step 2: sign up to Instagram with that email address
The attacker signs up to Instagram using the victim's email address. Instagram links the new account to the existing Facebook account that uses the same address. The attacker does not confirm the email address, and does not need to: the features are available before confirmation.
Step 3: open the suggestions of people to follow
With the new account, the attacker goes to the suggestions of people to follow. Those suggestions are derived from the Facebook friends of the linked account, so they expose the victim's friend list.

The screenshot shows the list of the victim's friends.
Root cause
The design mistake is that a sensitive, cross-product data flow (Facebook friends surfaced as Instagram follow suggestions) was gated on nothing more than an email address typed into a sign-up form. The link between the new Instagram account and the existing Facebook account is established through the shared email address, but the email address is not verified before the linked data is exposed. Email confirmation exists precisely to prove that the person signing up owns the address; enabling the suggestions before confirmation removed that check from the path.
Existing defences did not help. The victim's Facebook privacy settings were irrelevant, friendship between attacker and victim was irrelevant, and the attacker needed no Facebook account at all. The only thing standing between an attacker and the friend list was ownership of the email address, and that ownership was never tested before the data was shown.
Impact
An attacker who knows a target's email address can retrieve the Facebook friend list of anyone who does not have an Instagram account. The author's estimate is that at least 1.5 billion accounts were exposed, based on the gap between the number of Facebook accounts (more than 2 billion) and Instagram accounts (800 million). The exposure does not depend on the attacker being a Facebook friend of the victim, on the victim's Facebook privacy settings, or on the attacker having a Facebook account.
Fix
Facebook deployed a fix on 30 August 2018 and asked the author to test it. The report does not describe the change itself.
Timeline
| Date | Event |
|---|---|
| 20 August 2018 | First disclosure to Facebook |
| 20 August 2018 | Facebook requests more information |
| 20 August 2018 | More information provided to Facebook |
| 21 August 2018 | Facebook closes the issue, saying it was not a security issue |
| 21 August 2018 | Author submits a new demo with more information |
| 23 August 2018 | Facebook confirms the issue |
| 30 August 2018 | Facebook deploys a fix and asks for a test |
| 12 September 2018 | Facebook awards the bounty |
Facebook awarded a $3000 bounty for the disclosure.
Variants to test
- Unverified-email feature gating on other sign-up flows. Create an account with an email address you control but do not confirm, and check whether features that surface data belonging to the address's real owner (contact suggestions, "people you may know", imported contacts, linked social accounts) are available. A positive result is seeing another account's data before confirmation.
- Account linking by shared email. Sign up with an email address already used on a linked product and see whether the new account inherits any of the existing account's social graph or suggestions. A positive result is suggestions that match the existing account's connections.
- Cross-product suggestion endpoints. Where a product suggests follows based on another product's graph, test whether the suggestions can be triggered for an account whose email has not been verified. A positive result is a populated suggestion list for an unverified address.
- Privacy-setting bypass. For any suggestion feature, compare results for a target with restrictive privacy settings against a target with open settings. A positive result is the same data returned in both cases, showing the setting is not consulted.
Glossary
- API: a way for one piece of software to ask another for data or actions, like a waiter taking your order to the kitchen.
- Account linking: connecting two accounts on different services so they share information, usually because they use the same email address or because you signed in with one to create the other.
- Bounty: a payment a company makes to someone who reports a security problem to it.
- Broken authorization: a flaw where a system lets someone do or see something they should not be allowed to, because it does not check permission properly.
- Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests, like a cloakroom ticket.
- Cross-product data flow: data moving from one service to another, for example Facebook friends appearing as Instagram suggestions.
- Data access control: the rules that decide who is allowed to see which data.
- Disclosure: making a security problem public, usually after the company has been told and has had time to fix it.
- Email address confirmation: proving you own an email address by clicking a link sent to it.
- Endpoint: a specific address on a server that a request can be sent to, like a particular counter in a large building.
- Exploitation: actually carrying out an attack to show that a weakness can be used.
- Feature gating: turning parts of a product on or off depending on some condition, such as whether an email has been confirmed.
- Fix: a change to the software that closes the weakness.
- Information disclosure: a flaw where data that should be private becomes visible to someone who should not see it.
- Logic flaw: a mistake in how a system is designed to behave, rather than a bug in a single line of code.
- Payload: the data or request an attacker sends to try to trigger a weakness.
- Privacy settings: the choices a user makes about who can see their information.
- Request: a message your browser sends to a server asking for a page or data.
- Root cause: the underlying reason a weakness exists, as opposed to its visible symptoms.
- Sign-up flow: the sequence of screens and steps you go through to create an account.
- Social graph: the network of connections between people, such as who is friends with whom.
- Suggestions screen: the part of an app that proposes accounts you might want to follow.
- Token: a short string that proves who you are or grants access, like a wristband at an event.
- Vulnerable: open to being attacked because of a weakness.