Contact Point Deanonymization Vulnerability
The password reset flow on the main Facebook domain returned a masked email for a given mobile number, but the Workplace recovery endpoint on a different subdomain disclosed the same email unmasked. An attacker could use this to link a mobile number to its account's email address and automate bulk collection.
Published on lokeshdlk77.medium.com
This post is about an bug that I found on Meta (aka Facebook) which used to find a linked Primary email address of a account using mobile number
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
Meta runs a set of payout guidelines for Contact Point Deanonymization reports, and this bug was found while hunting against those guidelines. The feature at the centre of it is the password reset flow: the account recovery pages that take an email address, username or mobile number and then send a code to a contact point on the account.
During reconnaissance the researcher found a Workplace page on work.facebook.com. Meta had migrated work accounts to www.workplace.com, but the older subdomain was still live and still served the recovery flow. The main Facebook domain and the Workplace domain share the same underlying Meta account cookies, and that shared session is what made the two flows interesting to compare.
On www.facebook.com, a password can be reset using either an email address or a mobile number. On work.facebook.com, the recovery form only accepted an email address or username, so there was no mobile number reset option advertised for work accounts. The bug is that the second flow picked up state created by a mobile number on the first flow and returned the linked email address in clear text.
Setup
The report does not describe a special lab setup. The preconditions that matter are:
- A valid Meta account with a mobile number and an email address linked to it, used as the victim account.
- The ability to reach both
www.facebook.comandwork.facebook.comfrom the same browser, because the two flows share the Meta account cookies. - No active session on the victim account is required for the final step. The password reset endpoint requires no active session, which is what makes the attack automatable.
The report links a separate post on rotating IP addresses for each request in Burp Suite. No specific tool versions are given.
Finding it
After Meta published the Contact Point Deanonymization payout guidelines, the researcher started testing the password reset flow. Submitting a victim's mobile number as the input returned the plain mobile number together with a masked email address for that account.

The interesting part is that the response ties a mobile number to an account that has an email address on it, which is exactly the deanonymization surface the guidelines cover. The next question was whether the mask could be removed.
Meta had migrated all work accounts to www.workplace.com, so the older subdomain was worth a closer look. Comparing the two recovery forms showed a difference in accepted input:
www.facebook.compassword reset accepts an email address or a mobile number.work.facebook.comrequires an email address or username, so no mobile number reset option is supported for work accounts.

Passing a valid Meta account mobile number into the work domain was rejected. But inspecting the request headers showed that the work domain was using the same Meta (Facebook) account cookies. The request headers showed the work domain was using the same Meta (Facebook) account cookies.
Exploitation
Step 1: start the reset on the main domain with a mobile number
The researcher submitted the victim's mobile number to the main Facebook password reset flow. This is the flow that accepts a mobile number and returns the plain number with a masked email address.
Step 2: move to the Workplace OTP endpoint
With that state in place, the researcher opened the Workplace OTP entering endpoint to check whether it supported mobile number password reset. The report gives the endpoint as:
https://work.facebook.com/recover/code
Unexpectedly, the page showed only the email address to reset the account, and the email address was in an unmasked state.

So the work domain, which does not offer mobile number recovery at all, still consumed the mobile-number-initiated state from the main domain and rendered the linked email without the mask.
Step 3: reproduction
The report gives the reproduction as two steps:
- Go to
https://www.facebook.com/login/identify/and search any valid mobile number which has an email linked to that account. - Open a new tab and go to
https://work.facebook.com/recover/code. The linked email address of the account was disclosed.
The two URLs involved are:
https://www.facebook.com/login/identify/
https://work.facebook.com/recover/code
The second endpoint is the Workplace code entry step, which showed the linked email address unmasked. Because the second request needs no active session, the whole sequence can be scripted.
Root cause
The report describes the fix as two changes: only masked email addresses are returned in the password reset page on all Facebook and Workplace domains, and only work account OTPs are validated on work.facebook.com. That points at two separate mistakes.
First, the Workplace recovery page rendered the linked email address without applying the masking that the main domain applies.
Second, work.facebook.com accepted and acted on recovery state that had been created for a main Facebook account by a mobile number, even though the work flow does not support mobile number recovery and should only validate OTPs for work accounts. The shared Meta account cookies meant the work domain could see the state set up on the main domain, and it did not check that the account and the recovery method belonged to the work product.
Impact
An attacker can map a mobile number to the email address linked to that account, which is a direct deanonymization primitive: OSINT from a phone number to an email address. The password reset endpoint requires no active session, so the workflow can be automated and run at scale by rotating random mobile numbers, using IP rotation to spread the requests. The report does not put a bound on how many numbers could be checked.
Meta awarded a $12,000 bounty, with bonus, for the report.
Fix
Meta made two changes, confirmed fixed on 25 January 2022:
- Only masked email addresses are returned in the password reset page on all Facebook and Workplace domains.
- Only work account OTPs are validated on
work.facebook.com.
The first closes the clear-text disclosure on the Workplace page. The second restricts validation on work.facebook.com to work account OTPs.
Timeline
| Date | Event |
|---|---|
| 03 Jan 2022 | Bug found and reported |
| 04 Jan 2022 | Further investigation by Meta |
| 25 Jan 2022 | Fix confirmed by Meta and the researcher |
| 21 Feb 2022 | $12,000 bounty awarded by Facebook (with bonus) |

Variants to test
- Compare recovery and identify pages across every domain that shares the same account cookies (main site, Workplace, and any legacy subdomains). A positive result is one domain returning a contact point unmasked while another masks it.
- Start a recovery flow on one domain with one identifier type (mobile number, email, username) and finish it on another domain. A positive result is the second domain accepting the state and showing account data it should not offer for that identifier type.
- Check whether the OTP entry endpoint validates that the account is of the expected product type. A positive result is a code entry page for a consumer account being served on a business or work domain.
- Test whether the identify step leaks more than the masked value, for example the full email, a partial number, or account metadata, when the request is replayed with different headers or on a different host.
- Automate the identify step with rotating mobile numbers and rotating source IPs, and measure whether responses differ between existing and non-existing numbers. A positive result is a reliable oracle that confirms account existence and linked contact points at scale.
What happened, in plain words
Meta (the company behind Facebook) runs a programme that pays people for finding certain kinds of privacy bugs. One category it pays for is called Contact Point Deanonymization: a contact point is something like a phone number or an email address attached to an account, and deanonymization means working out who is behind something that was meant to stay hidden. In this case the hidden thing was the email address linked to a phone number.
When Meta published the payout guidelines for that bug class, the researcher started hunting for bugs that matched them. The feature they tested is the password reset flow: the pages you use when you have forgotten your password and need to get back into your account. You type in something that identifies the account, such as an email address, a username or a mobile number, and the site sends a code to a contact point on that account so you can prove it is yours.
The researcher found that if you typed a victim's mobile number into the reset flow, the response showed the mobile number in plain text together with a masked email address for that account. A masked email looks something like j***@example.com: enough to hint at the address, not enough to read it. The interesting part was that the page had just confirmed a link between a phone number and an account that has an email address on it, which is exactly the kind of link the payout guidelines are about. The next question was whether the mask could be removed.
While looking around, the researcher found a Workplace page on work.facebook.com. Workplace is Meta's product for businesses, a bit like a private Facebook for colleagues. Meta had moved all work accounts to www.workplace.com, so the older subdomain was worth a closer look. A subdomain is a section of a domain: work.facebook.com is a subdomain of facebook.com, just as a department is a section of a company.
Comparing the two recovery forms showed a difference in what they accept. On www.facebook.com you can reset a password using an email address or a mobile number. On work.facebook.com the form only accepted an email address or a username, so there was no mobile number reset option offered for work accounts.

Passing a valid Meta account mobile number into the work domain was rejected. But when the researcher looked at the request headers, they saw that the work domain was using the same Meta (Facebook) account cookies. A cookie is a small piece of data a website stores in your browser so it can recognise you on later requests; a session cookie in particular is like a cloakroom ticket: you show it and the site knows which coat is yours. Request headers are the extra lines of information your browser sends along with every request, and cookies travel in them. The request headers showed the work domain was using the same Meta (Facebook) account cookies.
So the researcher submitted the victim's mobile number to the main Facebook reset flow, then went back to the Workplace code entry page to see whether it would accept a mobile number reset. Unexpectedly, the page showed only the email address to reset the account, and that email address was not masked at all.

In other words, the work domain, which does not offer mobile number recovery at all, showed the linked email in clear text.
Setting up
The report does not describe a special lab or test environment. What mattered was:
- A valid Meta account with a mobile number and an email address linked to it, used as the victim account.
- Being able to reach both
www.facebook.comandwork.facebook.comfrom the same browser, because the two flows share the Meta account cookies. - No active session on the victim account being needed for the final step. The recovery pages can be reached without being logged in, which is what makes the attack easy to automate.
The report links a separate post on rotating IP addresses for each request in Burp Suite. An IP address is the number that identifies a device on the internet, roughly like a return address on an envelope; rotating IPs means sending requests from many different addresses so they do not all look like they come from one place. No specific tool versions are given.
Finding it
After Meta published the Contact Point Deanonymization payout guidelines, the researcher started testing the password reset flow. Submitting a victim's mobile number as the input returned the plain mobile number together with a masked email address for that account.

The notable part is that the response ties a mobile number to an account that has an email address on it, which is the deanonymization surface the guidelines cover.
During reconnaissance the researcher found a Workplace page on work.facebook.com. Reconnaissance, or recon, means looking around a target before attacking it, the way a burglar might walk past a house to note the doors and windows. Meta had migrated all work accounts to www.workplace.com, so the older subdomain was worth a closer look. Comparing the two recovery forms showed a difference in accepted input:
www.facebook.compassword reset accepts an email address or a mobile number.work.facebook.comrequires an email address or username, so no mobile number reset option is supported for work accounts.
But inspecting the request headers showed that the work domain was using the same Meta (Facebook) account cookies. A pivot here means using a foothold in one place to reach another, like using a key to one room to get into the room next door.
Exploitation
Exploitation means actually carrying out the attack, step by step, rather than just suspecting it is possible.
Step 1: start the reset on the main domain with a mobile number
The researcher submitted the victim's mobile number to the main Facebook password reset flow. This is the flow that accepts a mobile number and returns the plain number with a masked email address.
Step 2: move to the Workplace OTP endpoint
With that state in place, the researcher opened the Workplace OTP entering endpoint to check whether it supported mobile number password reset. OTP stands for one-time password: the short code sent to your phone or email that you type in to prove the account is yours. An endpoint is simply a specific address on a server that does a particular job, like a counter in a large office: you go to the right counter for the service you want. The report gives the endpoint as:
https://work.facebook.com/recover/code
Line by line: https is the secure version of the protocol browsers use to talk to websites; work.facebook.com is the Workplace subdomain; /recover/code is the path that identifies the page where you enter the recovery code. Nothing else is in the URL: no parameters, no query string.
Unexpectedly, the page showed only the email address to reset the account, and the email address was in an unmasked state. So the work domain, which does not offer mobile number recovery at all, showed the linked email without the mask.
Step 3: reproduction
The report gives the reproduction as two steps:
- Go to
https://www.facebook.com/login/identify/and search any valid mobile number which has an email linked to that account. - Open a new tab and go to
https://work.facebook.com/recover/code. The linked email address of the account was disclosed.
The two URLs involved are:
https://www.facebook.com/login/identify/
https://work.facebook.com/recover/code
Line by line: the first URL is on the main Facebook domain, and its path /login/identify/ is the identify step of the reset flow, the page where you tell Facebook which account you are trying to recover. The second URL is on the Workplace subdomain, and its path /recover/code is the code entry step. Because the second request needs no active session, the whole sequence can be scripted: a script is just a list of instructions a computer follows automatically, so a person does not have to click through it by hand each time.
Why it worked
The report describes the fix as two changes: only masked email addresses are returned in the password reset page on all Facebook and Workplace domains, and only work account OTPs are validated on work.facebook.com. That points at two separate mistakes.
First, the Workplace recovery page rendered the linked email address without applying the masking that the main domain applies. Think of two shop assistants following the same privacy policy, except one of them never read the part about hiding customer details.
Second, work.facebook.com accepted and acted on recovery state that had been created for a main Facebook account by a mobile number, even though the work flow does not support mobile number recovery and should only validate OTPs for work accounts. The shared Meta account cookies meant the work domain could see the state set up on the main domain, and it did not check that the account and the recovery method belonged to the work product. A boundary here means the line between two systems that should each check what crosses it, like a border post that should check passports rather than wave everyone through.
Impact
Impact means what an attacker could actually do with the bug. An attacker can map a mobile number to the email address linked to that account, which is a direct deanonymization primitive: OSINT from a phone number to an email address. OSINT stands for open-source intelligence, finding information about someone from publicly available sources, and a primitive here means a basic building block an attacker can reuse. The password reset endpoint requires no active session, so the workflow can be automated and run at scale by rotating random mobile numbers, using IP rotation to spread the requests. The report does not put a bound on how many numbers could be checked.
Meta awarded a $12,000 bounty, with bonus, for the report. A bounty is a reward paid for a valid security report.
Fix
Meta made two changes, confirmed fixed on 25 January 2022:
- Only masked email addresses are returned in the password reset page on all Facebook and Workplace domains.
- Only work account OTPs are validated on
work.facebook.com.
The first closes the clear-text disclosure on the Workplace page. The second restricts validation on work.facebook.com to work account OTPs.
Timeline
| Date | Event |
|---|---|
| 03 Jan 2022 | Bug found and reported |
| 04 Jan 2022 | Further investigation by Meta |
| 25 Jan 2022 | Fix confirmed by Meta and the researcher |
| 21 Feb 2022 | $12,000 bounty awarded by Facebook (with bonus) |

Variants to test
These are the same kinds of checks, written so you can try them on a target you are allowed to test:
- Compare recovery and identify pages across every domain that shares the same account cookies (main site, Workplace, and any legacy subdomains). A positive result is one domain returning a contact point unmasked while another masks it.
- Start a recovery flow on one domain with one identifier type (mobile number, email, username) and finish it on another domain. A positive result is the second domain accepting the state and showing account data it should not offer for that identifier type.
- Check whether the OTP entry endpoint validates that the account is of the expected product type. A positive result is a code entry page for a consumer account being served on a business or work domain.
- Test whether the identify step leaks more than the masked value, for example the full email, a partial number, or account metadata, when the request is replayed with different headers or on a different host. Replaying a request means sending the same request again, possibly with small changes, to see how the server reacts.
- Automate the identify step with rotating mobile numbers and rotating source IPs, and measure whether responses differ between existing and non-existing numbers. A positive result is a reliable oracle that confirms account existence and linked contact points at scale. An oracle here means any response that reliably tells you a fact you are not supposed to know, such as whether an account exists.
Glossary
- API: a defined way for one piece of software to ask another for data or actions, like a waiter taking your order to the kitchen.
- Bounty: a reward paid by a company for a valid security report.
- Contact point: a phone number or email address attached to an account.
- Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests.
- Cross-domain: involving two different domains, here
facebook.comandwork.facebook.com. - Deanonymization: working out who is behind something that was meant to stay hidden, such as the email address behind a phone number.
- Endpoint: a specific address on a server that performs a particular job.
- Exploitation: actually carrying out an attack step by step.
- Header: an extra line of information sent with a web request or response, such as a cookie.
- IP address: the number that identifies a device on the internet.
- IP rotation: sending requests from many different IP addresses so they do not all appear to come from one place.
- Masked email: an email address shown partly hidden, such as
j***@example.com. - OSINT: open-source intelligence, finding information about someone from publicly available sources.
- OTP: one-time password, the short code sent to a phone or email to prove an account is yours.
- Password reset flow: the pages used to recover an account when you have forgotten the password.
- Pivot: using a foothold in one place to reach another.
- Primitive: a basic building block an attacker can reuse.
- Reconnaissance (recon): looking around a target before attacking it.
- Recovery state: information a site keeps about a reset in progress, such as which account and contact point it concerns.
- Request: the message your browser sends to a server asking for a page or an action.
- Script: a list of instructions a computer follows automatically.
- Session: the period during which a site remembers that you are logged in.
- Subdomain: a section of a domain, such as
work.facebook.comunderfacebook.com. - Username: the name that identifies an account on a site.
- Workplace: Meta's product for businesses, a private Facebook for colleagues.