Skip to content
Access control Write-up Intermediate

Add users to roles on Facebook pages without an invitation consent

The Facebook page role invitation process could be bypassed by sending a crafted request that added a user to a page role without their consent. An attacker could add arbitrary users to page roles without the victim accepting an invitation.

Philippe Harewood Follow

Published on philippeharewood.com

Normally for Facebook page role invites, the receiving user must accept the invite before being granted a role on the page. It is possible to skip this consent step and add users to pages.

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.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 3 min read.

What the report shows

Facebook pages support roles: a page admin can grant another user a role such as a task permission on the page. The normal flow requires the receiving user to accept an invitation before the role is granted. The researcher found that this consent step could be skipped, and a user could be added to a page role directly.

The whole technique is a single call made from the browser console while a Facebook.com window is open:

JavaScript
new AsyncRequest('/media/manager/page_task_permissions/').setData({action_type:'ADD_PERSON',page_id:page,user_id:user,tasks:['task']}).send()

The call posts to the page task permissions endpoint with an ADD_PERSON action, a page_id, a user_id and a list of tasks. The report states that this adds user B under the role specified by the task without explicit consent from user B. In other words, the server accepted the role assignment without checking that the invited user had agreed to it.

The timeline given is:

Date Event
Sep 12, 2019 Report sent
Sep 12, 2019 Confirmation of submission by Facebook
Sep 21, 2019 Bounty awarded by Facebook
Oct 8, 2019 Confirmation of patch by Facebook

The report does not give a severity rating or a bounty amount, and it does not describe the patch itself beyond confirming that one was made.

Root cause

The report does not state a root cause; the behaviour is consistent with the server not enforcing the consent step. The normal flow requires the receiving user to accept the invite before a role is granted.

Impact

The call adds another user to a page role without that user's agreement. The report frames the impact in terms of consent: the receiving user is granted a role they never accepted. Those details are not stated.

How this kind of bug works

Many features involve a two-party flow: one user invites or assigns, the other accepts. The UI usually models this as a pending invitation that becomes an active membership only after the second party confirms. The bug class appears when the server exposes the final state transition (grant the role, join the group, become a member) as a separate callable action that does not check the pending-invitation state.

The client is not a security boundary. If the accept step only exists in the front-end, anyone who can replay or craft the underlying request can skip it. The correct design keeps the invitation record server-side and only allows the transition from pending to active when the accepting party makes the request, or when the accepting party's identity is otherwise proven.

How to test for it

  1. Map the two-party flow. Create a page, group or team, invite a second account, and record every request the inviter and the invitee make, including the accept call.
  2. Identify the final state transition. Look for endpoints whose names suggest assignment or membership, and note the parameters that identify the target user and the role.
  3. Replay the transition as the inviter, before the invitee accepts. If the server accepts it and the role appears on the invitee's account, you have a candidate.
  4. Confirm from the invitee's side: check that the role or membership is actually active, not merely listed as pending.
  5. Check the reverse direction too: whether an uninvited user can add themselves, and whether the target user can be added to a role the inviter is not allowed to grant.

A positive result is a state change on the second account that the second account never approved. Common false positives are UI-only changes that do not persist, invitations that remain pending on the server, and cases where the second account had already accepted earlier. Always verify server state with a fresh session for the second account.

How it is fixed

The report confirms a patch was made but does not describe it. The transition to an active role should only happen through the accept path, tied to the accepting user's session.

Hunting notes

This bug class tends to hide in features with invitations, memberships, shared resources and delegated permissions: page and group roles, team and organisation membership, shared document access, and any product where one user can grant another user rights. Recon signals include endpoints with names like permissions, members, roles or invites, and parameters that carry both a resource identifier and a user identifier. When you find one, demonstrate impact by showing the state change on the second account and explaining what the granted role allows.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 6 min read.

What happened, in plain words

Facebook pages are public profiles for businesses, brands and public figures. A page can have several people working on it, each with a different role: some can write posts, some can reply to messages, some can manage settings. To give someone a role, a page admin normally sends an invitation, and the other person has to accept it before the role becomes active. That accept step is the consent: the person agrees to take on the role.

The researcher found that this consent step could be skipped. By sending one request from the browser console, a user could add another user to a role directly, without that user ever accepting anything. The report refers to the person being added as user B.

This matters because the receiving user is granted a role they never accepted. The report itself only frames the impact as the missing consent; it does not describe what the added user could then do with the role.

The request, line by line

The whole technique is a single call typed into the browser console while a Facebook.com window is open. The browser console is a panel built into every browser (usually opened with F12 or a right-click on the page and "Inspect") where you can type JavaScript and run it in the context of the page you are viewing.

JavaScript
new AsyncRequest('/media/manager/page_task_permissions/').setData({action_type:'ADD_PERSON',page_id:page,user_id:user,tasks:['task']}).send()
  • new AsyncRequest(...) creates a request object. A request is simply a message the browser sends to a server asking it to do something or return something. AsyncRequest is Facebook's own helper for building such messages; it is not a standard browser feature, which is why the call only works inside a Facebook page.
  • '/media/manager/page_task_permissions/' is the address, or endpoint, the request goes to. The name suggests it handles the permissions (tasks) people hold on a page.
  • .setData({...}) attaches the data the server should act on. The object inside the braces has four fields:
    • action_type:'ADD_PERSON' tells the server what kind of action this is: add a person.
    • page_id:page identifies which page is involved. page is a placeholder for the real page identifier.
    • user_id:user identifies which user should be added. user is a placeholder for the real user identifier.
    • tasks:['task'] is a list of the tasks, meaning the role or permissions, to grant. task is a placeholder for the actual task name.
  • .send() actually dispatches the request to Facebook's servers.

The report states that this adds user B under the role specified by the task, without explicit consent from user B. In other words, the server accepted the role assignment without checking that the invited user had agreed to it. The normal flow requires the receiving user to accept the invite before a role is granted.

Timeline

Date Event
Sep 12, 2019 Report sent
Sep 12, 2019 Confirmation of submission by Facebook
Sep 21, 2019 Bounty awarded by Facebook
Oct 8, 2019 Confirmation of patch by Facebook

The report does not give a severity rating or a bounty amount, and it does not describe the patch itself beyond confirming that one was made.

In general, how this kind of bug works

Many features involve two people: one invites or assigns, the other accepts. Think of a shared document where the owner invites a colleague: the colleague gets a notification and clicks accept, and only then can they edit. The software usually keeps a record of a pending invitation, and the membership becomes active only after the second person confirms.

The bug appears when the server offers a separate action that jumps straight to the final state (grant the role, join the group, become a member) and does not check whether a pending invitation exists or whether the second person agreed. The consent step lives in the interface, but the interface is not a security boundary: anyone who can send the underlying request can skip it. The correct design keeps the invitation record on the server and only allows the change from pending to active when the accepting person makes the request, or when their identity is otherwise proven.

How to test for it

  1. Map the two-person flow. Create a page, group or team, invite a second account, and record every request both accounts make, including the accept call.
  2. Identify the final state change. Look for endpoints whose names suggest assignment or membership, and note the parameters that identify the target user and the role.
  3. Replay that change as the inviter, before the invitee accepts. If the server accepts it and the role appears on the invitee's account, you have a candidate.
  4. Confirm from the invitee's side that the role is actually active, not merely listed as pending.
  5. Check the reverse direction too: whether an uninvited user can add themselves, and whether the target can be added to a role the inviter is not allowed to grant.

A positive result is a change on the second account that the second account never approved. Common false positives are interface-only changes that do not persist, invitations that stay pending on the server, and cases where the second account had already accepted earlier. Always verify the server state with a fresh session for the second account.

How it is fixed

The report confirms a patch was made but does not describe it. The change to an active role should only happen through the accept path, tied to the accepting user's session.

Where to look

This bug class tends to hide in features with invitations, memberships, shared resources and delegated permissions: page and group roles, team and organisation membership, shared document access, and any product where one user can grant another user rights. Useful signals are endpoints with names like permissions, members, roles or invites, and parameters that carry both a resource identifier and a user identifier. When you find one, show the change on the second account and explain what the granted role allows;

Glossary

  • Page: a public profile on Facebook for a business, brand or public figure, managed by one or more people.
  • Role: a set of permissions on a page, such as writing posts or managing settings, given to a person.
  • Consent: the act of the receiving person agreeing to an invitation before it takes effect.
  • Request: a message the browser sends to a server asking it to do something or return something.
  • Endpoint: the address a request is sent to, often named after the feature it belongs to.
  • Parameter: a named value inside a request, such as a page identifier or a user identifier.
  • Browser console: a panel in the browser where you can type and run JavaScript in the context of the open page.
  • JavaScript: the programming language browsers run to make web pages interactive.
  • Server: the computer that stores data and answers requests from browsers.
  • Server-side check: a check performed by the server, which a user cannot bypass by changing what the browser sends.
  • Client: the browser and page running on the user's computer, as opposed to the server.
  • Security boundary: a line that must not be crossed without proper checks; the browser is not one, because its code can be changed.
  • State change: a lasting change to data on the server, such as a role becoming active.
  • Pending invitation: an invitation that has been sent but not yet accepted.
  • Session: the logged-in state of a user, represented by data the browser sends with each request.
  • False positive: a result that looks like a bug but is not, for example a change that does not persist.
  • Bounty: a reward a company pays for a valid security report.

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.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.