Facebook Invitees Email Address Disclosure
Facebook's invitation system used a predictable invitation ID (ent_cp_id) that remained accessible after the invitation was sent, and any user could retrieve the email address associated with that ID. An attacker could guess these IDs to disclose the email addresses of anyone who had ever been invited to Facebook.
Published on medium.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.
Context
Facebook's early growth depended on members inviting their friends. When a user joined in those days there was, as the author puts it, literally nothing to see, so Facebook asked members to invite friends through an email invitation created by the registered user. The user supplied their friends' email addresses, and those friends received an email from Facebook saying that a given person was now on Facebook and should be joined there.
The feature analysed here is that invitation flow. Each invitation sent to a specific email address carried an invitation identifier, ent_cp_id. The report is about what that identifier exposed and how long it lived.
Setup
The report describes no special tooling, accounts or versions. The researcher simply came across the invitation feature and started to analyse it. The invitation interface shows the invitee's full email address in a small pop-up when the Invite to Facebook action is used.
Finding it
The researcher's starting idea was not disclosure at all: it was to try to fool people into believing that a user Y had invited them, when the invitation had actually come from a user X. While working through the invitation flow with that in mind, and inviting people over and over again, a detail stood out: each invitation to a specific email address contained an invitation ID, ent_cp_id.

Clicking Invite to Facebook opens a small window that shows the full email address of the invitee.

The identifier is interesting because it is tied to an email address, and the interface that consumes it displays that address back to the caller. That combination is what turned an invitation feature into a disclosure issue.
Exploitation
Step 1: Record an invitation ID
The researcher wrote down the ent_cp_id of an email address they wanted to invite, and invited that person once. The expectation was that after the invitation had been sent, the ent_cp_id for that invitee should no longer be accessible.
Step 2: Re-transmit the invitation request
That expectation was wrong. The ent_cp_id was still there after the invitation had been used. By simply re-transmitting the HTTP request, the same user could be invited again. The report does not reproduce the raw request, so the exact method, path, parameters and headers are not shown here.
Step 3: Resolve an ID to an email address
Because the invitation window displays the full email address behind an invitation, any user could see the email address that was behind an ent_cp_id. The identifier was never deleted after the invitation was sent, and it remained accessible to any user. An attacker therefore did not need to have sent the invitation, or to know the address in advance: they only had to guess ent_cp_id values. Since old identifiers are not deleted, the report notes that the success rate of guessing is very high.
Root cause
The design kept a stable, guessable identifier linked to a sensitive value (the invitee's email address) and left it in place after the invitation had served its purpose. Two properties combine here:
- The identifier is not invalidated once the invitation is sent, so it can be replayed and is never deleted.
- The interface that consumes the identifier shows the email address to any user who presents it.
The report's own framing of the lesson points the same way: when handling sensitive information such as an email address, limit how many times an action can be performed, and wipe any ID that might be linked to that sensitive information, or at least hash-protect it. Whether the identifier was sequential or otherwise enumerable is not stated; the report only says that guessing it worked with a high success rate because old IDs were never removed.
Impact
Anyone who was ever invited to Facebook by email was exposed to email address disclosure, because the invitation was never deleted and was accessible to any user. An attacker could guess ent_cp_id values and read back the email addresses behind them. The report does not quantify how many addresses were reachable or whether the identifiers could be enumerated exhaustively; it only states that the success rate of random guessing was very high.
Fix
Facebook quickly solved the issue and awarded a kind bounty. The report does not describe the change that was made. The recommendations it gives are: limit the number of times an action involving sensitive information can be performed, and wipe any ID linked to that sensitive information, or at least hash-protect it.
Variants to test
- Replay after use. Send an invitation, then re-transmit the same request unchanged. A positive result is that the invitation is accepted again and the identifier still resolves.
- Identifier resolution by a second account. Take an
ent_cp_idfrom one account's invitation and present it from a different account. A positive result is that the second account is shown the invitee's email address. - Guessing around a known ID. Take a valid
ent_cp_idand try nearby or structurally similar values. A positive result is that other identifiers resolve to other email addresses. - Stale identifiers. Reuse an identifier from an invitation sent long ago. A positive result is that it still returns the address.
- Other invite or referral flows. Apply the same checks to referral links, team invitations, share tokens and password-reset style identifiers that are displayed back to the caller. A positive result is any flow where a guessable or replayable identifier returns personal data to a party that was never meant to see it.
What happened, in plain words
Facebook, in its early days, needed members. When someone joined there was almost nothing to see on the site, so the company asked its members to bring their friends in by email. You typed your friends' email addresses into a form, Facebook sent each of them an email saying that you were now on Facebook and that they should join too, and that was the growth engine.
This report is about that invitation feature. Every invitation sent to a particular email address carried an internal label, an invitation ID called ent_cp_id. The researcher found two things about that label. First, it was not thrown away after the invitation had been sent: it stayed valid, and the same invitation request could simply be sent again. Second, and more seriously, the invitation screen would show the full email address behind an ent_cp_id to anyone who presented that ID. So if you could guess an ID, you could read the email address it belonged to. Because old IDs were never deleted, guessing worked very often.
That means anyone who had ever been invited to Facebook by email could have had their email address read by a stranger with a Facebook account. Facebook fixed it quickly and paid a bounty.
A few words before we start, because they come up constantly:
- An email address here is personal data. It identifies a real person, and people generally do not expect a website to hand it out to strangers.
- An ID (identifier) is a short label a website uses to refer to something internally, the way a cloakroom ticket refers to your coat. You do not need to know what the coat looks like; you hand over the ticket and the attendant fetches the coat.
- Disclosure means information that should have stayed private is shown to someone who should not see it. It is one of the classic categories of security bug, and it is what this report is about.
The invitation system, and why it is worth a look
The report opens with a bit of history. When Facebook was a tiny company with only a few members, it needed a way to get more members. Today, if you want visitors to your site, you advertise on Facebook, because everybody is there. Back then, the main advertising options were to post advertisements manually on popular websites (using Google, for instance), or to get your members to invite their friends using their email account.
So the feature worked like this: when a user joined Facebook in its early days, there was literally nothing to see, so Facebook asked members to invite their friends using an email invitation created by the registered user. The user supplied their friends' email addresses, and those friends received an email from Facebook saying that a given person was now on Facebook and should be joined there.
Think of it like a party where the host asks every guest to bring a friend: you give the host your friend's contact details, the host sends the invitation, and the friend turns up. The interesting part for a security researcher is the paperwork behind each invitation, because that paperwork has to remember which address the invitation went to.
Setting up
The report describes no special tooling, accounts or versions. The researcher simply came across the invitation feature and started to analyse it.
Two ideas in that paragraph deserve a plain explanation.
An HTTP request is the message your browser sends to a website when you do something: open a page, click a button, submit a form. The website answers with an HTTP response, which is the page or the data you see. Every click in a web app is really one or more of these request-and-response pairs travelling over the network.
To observe and re-transmit a request means to watch that message go out and then send the very same message again, unchanged, as if you had pressed the button a second time. Browsers have developer tools built in that let you see the requests a page makes, and there are separate tools that let you capture a request and replay it. You do not need to write any code to do this; you need to be able to see the traffic and copy it.
The invitation interface itself shows the invitee's full email address in a small pop-up when the Invite to Facebook action is used. Keep that in mind: the screen already knows how to display an email address, and that display is the piece that later turns out to be the problem.
Finding it
The researcher's starting idea was not disclosure at all. It was to try to fool people into believing that a user Y had invited them, when the invitation had actually come from a user X. In other words, the first goal was to see whether the invitation could be made to look like it came from someone else, a kind of impersonation trick.
While working through the invitation flow with that in mind, and inviting people over and over again, a detail stood out: each invitation to a specific email address contained an invitation ID, ent_cp_id.

Clicking Invite to Facebook opens a small window that shows the full email address of the invitee.

The identifier is interesting because it is tied to an email address, and the interface that consumes it displays that address back to the caller. That combination is what turned an invitation feature into a disclosure issue.
Why does that combination matter so much? Because it means the ID works like a claim ticket for a piece of private information. If the ticket is easy to guess, and the counter hands over the coat to anyone holding a ticket, then the coat is not really protected. The report does not say whether the ID was a long random string or a short number; it only says that guessing it worked well, for a reason we will get to.
Exploitation
Step 1: Record an invitation ID
The researcher wrote down the ent_cp_id of an email address they wanted to invite, and invited that person once. The expectation was that after the invitation had been sent, the ent_cp_id for that invitee should no longer be accessible.
This is a reasonable expectation, and it is worth spelling out why. An invitation is a one-time thing: once the email has gone out, the label that pointed at that address has done its job. A well-built system would throw the label away, the way a shop destroys a gift card once it has been redeemed. The researcher was testing exactly that assumption.
Step 2: Re-transmit the invitation request
That expectation was wrong. The ent_cp_id was still there after the invitation had been used. By simply re-transmitting the HTTP request, the same user could be invited again.
The report does not reproduce the raw request, so the exact method, path, parameters and headers are not shown here. What matters is the behaviour: the same message, sent a second time, was accepted again. In security language this is called a replay: taking a valid request and sending it again to see whether the server treats it as new. A system that accepts replays has no memory of what it has already done, and that is usually a sign that other checks are missing too.
Step 3: Resolve an ID to an email address
Because the invitation window displays the full email address behind an invitation, any user could see the email address that was behind an ent_cp_id. The identifier was never deleted after the invitation was sent, and it remained accessible to any user. An attacker therefore did not need to have sent the invitation, or to know the address in advance: they only had to guess ent_cp_id values. Since old identifiers are not deleted, the report notes that the success rate of guessing is very high.
This is the heart of the bug, so let us take it slowly.
- The invitation screen takes an
ent_cp_idand shows the email address it belongs to. That is the "resolve" step: turn a label into the private value behind it. - Any user who presents an ID is shown the address.
- The IDs are never cleaned up, so the pool of valid IDs only grows. Every invitation ever sent leaves a working ticket behind.
- Because old IDs stay valid, a person trying IDs at random hits a real one very often.
Guessing IDs like this is called enumeration when you walk through values in some order, and brute force when you simply try many. The report does not say whether the IDs were sequential or otherwise predictable; it only says that random guessing succeeded with a high rate because old IDs were never removed. Either way, the practical result is the same: a stranger can harvest email addresses that were never meant for them.
Root cause
The design kept a stable, guessable identifier linked to a sensitive value (the invitee's email address) and left it in place after the invitation had served its purpose. Two properties combine here:
- The identifier is not invalidated once the invitation is sent, so it can be replayed and remains resolvable indefinitely.
- The endpoint that consumes the identifier returns the email address to whoever presents it, with no check that the caller is entitled to see that address.
An endpoint is simply a specific address on a server that does a specific job, like a particular counter in a large office. You send your request to that counter, and it performs that one task. Here the endpoint's task is "given an invitation ID, show the invitation details", and it performs that task for anyone who asks.
The report's own framing of the lesson points the same way: when handling sensitive information such as an email address, limit how many times an action can be performed, and wipe any ID that might be linked to that sensitive information, or at least hash-protect it.
Hashing means running a value through a one-way mathematical function so that the result cannot practically be turned back into the original. It is like putting a document through a shredder that produces a unique pattern: you can check whether two documents are the same by comparing patterns, but you cannot rebuild the document from the pattern. If the stored ID had been a hash of the email address rather than something that maps straight back to it, a guessed ID would not have handed over the address.
Impact
Anyone who was ever invited to Facebook by email was exposed to email address disclosure, because the invitation was never deleted and was accessible to any user. An attacker could guess ent_cp_id values and read back the email addresses behind them. The report does not quantify how many addresses were reachable or whether the identifiers could be enumerated exhaustively; it only states that the success rate of random guessing was very high.
It is worth being clear about why a leaked email address matters, even though it is not a password. An email address is the key to a person's online life: it is the login name for most services, the place password resets arrive, and the starting point for phishing. A list of confirmed addresses tied to real Facebook users is valuable to spammers and attackers, and the people on it never agreed to have it shared.
Fix
Facebook quickly solved the issue and awarded a kind bounty. The recommendations it gives are: limit the number of times an action involving sensitive information can be performed, and wipe any ID linked to that sensitive information, or at least hash-protect it.
In everyday terms: a ticket should work once, and then be destroyed. If a ticket must exist for a while, it should not be possible to work backwards from the ticket to the private thing it points at.
Variants to test
These are the same checks applied more widely. They are written for someone who can use a browser and a request-replay tool, nothing more.
- Replay after use. Send an invitation, then re-transmit the same request unchanged. A positive result is that the invitation is accepted again and the identifier still resolves.
- Identifier resolution by a second account. Take an
ent_cp_idfrom one account's invitation and present it from a different account. A positive result is that the second account is shown the invitee's email address. - Guessing around a known ID. Take a valid
ent_cp_idand try nearby or structurally similar values. A positive result is that other identifiers resolve to other email addresses. - Stale identifiers. Reuse an identifier from an invitation sent long ago. A positive result is that it still returns the address.
- Other invite or referral flows. Apply the same checks to referral links, team invitations, share tokens and password-reset style identifiers that are displayed back to the caller. A positive result is any flow where a guessable or replayable identifier returns personal data to a party that was never meant to see it.
The pattern to remember is simple: whenever a website hands you a label and then shows you private information when you give the label back, ask two questions. Does the label stop working after it has been used? And does the website check that you are allowed to see what the label points to? If the answer to either is no, you are probably looking at a disclosure bug.
Glossary
- Bounty: a reward a company pays to someone who reports a security problem to it responsibly.
- Brute force: trying many possible values in the hope that one is correct.
- Disclosure (information disclosure): private information being shown to someone who should not be allowed to see it.
- Email address: a person's email identity, used here as the sensitive data that leaked.
- Endpoint: a specific address on a server that performs one particular job when it receives a request.
- Enumeration: walking through possible identifiers in some order to find valid ones.
ent_cp_id: the invitation identifier used by Facebook's invitation flow, tied to a specific invitee's email address.- Hashing: a one-way transformation of a value so the original cannot practically be recovered from the result.
- HTTP request: the message a browser or tool sends to a website to ask it to do something.
- HTTP response: the message the website sends back, containing the page or data.
- ID (identifier): a short internal label a website uses to refer to a record, like a cloakroom ticket.
- Invitee: the person whose email address receives an invitation.
- Pop-up: a small window that appears over the page, here used to show the invitee's email address.
- Replay: sending a valid request again, unchanged, to see whether the server accepts it a second time.
- Resolve: turning an identifier into the information it refers to.
- Root cause: the underlying design or coding mistake that makes a bug possible, as opposed to its visible symptom.
- Token: a value that stands in for something else, such as permission or a record; an invitation ID is a kind of token.
- Vulnerability: a weakness in a system that an attacker can use to do something harmful.