Disclose-Facebook-Page-Admins-Via-Facebook-Camera-Effects
Two endpoints in Facebook's Camera Effects Hub leaked information about page admins and frame creators. An attacker could learn which users administer a page that used a frame, and could also obtain the frame creator's identity and private event IDs.
Published on philippeharewood.com
Facebook Camera Effects Hub is the area for creating and managing custom picture frames for Facebook. There is data in the hub that allows one to see an admin of a page that used a frame.
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 Camera Effects Hub is the area where creators build and manage custom picture frames for Facebook. A creator publishes a media effect (a frame), and pages can then use that frame. The hub holds data about the effects and about the pages and users that interact with them.
Two separate issues are described here. The first is that data returned by the hub disclosed the admin of a page that had used a frame. The second is that an activation toggle call could be used as another user to disclose the frame creator (the user, not the page) along with private events belonging to that user and other metadata about the effect.
Setup
The write-up does not describe the accounts, roles or tools used. The only stated precondition is a page with a published media effect. For the first issue, the disclosure happens once a page has used the frame. For the second, the call is made against an effect ID and the results concern the user who created the frame.
Finding it
The starting observation is that the Camera Effects Hub contains data that lets one see an admin of a page that used a frame. Given a page with a published media effect, the hub's edit dialog returns data that includes the admin ID once the page has used the frame. That is unexpected: the creator of a frame should not learn which individual administers a page that adopted it.
The second observation is that the hub also lets a user toggle the activation of a frame, and that this call can be made as another user. Doing so discloses the frame creator (the user rather than the page) and private events for that user.
Exploitation
Step 1: Read the page admin from the edit dialog
With a page that has a published media effect, send a POST to the edit dialog for that effect:
POST /media_effect/create/dialog/?flow_type=basic_hub&step=edit&media_effect_id=MEDIA_ID
Once a page has used the frame, the admin ID is disclosed in the response.
Step 2: Toggle activation as another user
The hub also exposes an activation toggle. Using this call as another user discloses the frame creator (the user, not the page) and private events for that user:
POST /fbcameraeffects/effects/async/activation/?activate=true&effect_ids[0]=MEDIA_ID
The page owner is disclosed to the user making the call.
Root cause
The report does not describe the code or design mistake behind either issue. What it shows is that the hub's responses and the activation endpoint return ownership and metadata that the caller should not receive: the admin ID of a page that used a frame, and the user who created a frame together with private events and effect metadata. Why the existing checks did not prevent this is not stated;
Impact
The first issue could have disclosed the identity of a page admin to the creator of a camera effect.
The second issue leaked ownership and other metadata about Facebook effects from multiple endpoints. Specifically, it affects:
- any user who has used a page to create a frame;
- disclosing the frame creator, which also means knowing the user has a role on the page;
- disclosing IDs belonging to private events;
- disclosing the number of times the frame was used;
- frame impression counts available as insights to the creator;
- which frame location restrictions were set by the creator.
Fix
Facebook fixed the first issue on Mar 22, 2018, a week after the report was sent on Mar 15, 2018, and awarded a bounty on Mar 28, 2018. The second report was sent on Mar 29, 2018; Facebook investigated on Apr 2, requested confirmation of the fix on Apr 30, received further details on May 1, verified further on May 3, and fixed the issue and awarded a bounty on Jun 20, 2018.
Variants to test
- On other effect or frame management features, open the edit dialog for an object that a page has adopted and check whether the response includes the adopting page's admin identifiers.
- Take an activation or toggle endpoint for a shared object and call it as a different user, then check whether the response reveals the object's creator, their private events, usage counts, impression insights or location restrictions.
- For each such endpoint, compare the response for a caller who owns the object with the response for a caller who does not; a positive result is ownership or private metadata appearing in the latter.
What happened, in plain words
Facebook has a feature called Camera Effects Hub. It is a place where people who make picture frames (the decorative borders you can put around a photo or a video) can create and manage those frames for Facebook. A person who makes a frame is called a creator. Once a frame is published, a Facebook page can choose to use it.
The hub keeps information about these frames, and about the pages and people who use them. Two problems were found in that information handling.
- When a page used a frame, the hub's edit screen sent back the ID of an admin of that page. That meant the creator of the frame could learn which individual person runs a page that adopted the frame. That should not happen: a page choosing to use a frame should not reveal who administers it.
- The hub also has a switch to turn a frame on or off. That switch could be used while acting as another user, and it gave back information about the person who created the frame (the user, not the page), plus private events belonging to that user and other details about the frame.
Both issues were reported to Facebook, fixed, and rewarded with a bounty. The report does not say what code or design mistake caused them.
Background you need first
A few ideas come up again and again below, so here they are from zero.
- API: an API is the way one piece of software asks another for something, without a human clicking. Think of a restaurant: you do not walk into the kitchen, you tell the waiter what you want and the waiter brings it back. The waiter is the API. A web API is reached by sending a request to a web address (a URL), and it sends back a response, usually in a structured text format such as JSON.
- HTTP request and method: your browser talks to websites using HTTP. Each request has a method, which is a verb saying what you want to do.
GETmeans "give me something",POSTmeans "here is some data, do something with it". The reports below both usePOST. - Endpoint: an endpoint is one specific address on a server that does one specific job, for example the address that opens the edit screen for a frame. You can think of it as one counter in a large office: each counter handles one kind of request.
- Parameter: parameters are the labelled pieces of information attached to a request, like the fields on a paper form. In a URL they appear after a
?, separated by&, in the formname=value. For examplestep=editmeans the parameter namedstephas the valueedit. - ID: a short identifier, usually a number or a string of characters, that a system uses to refer to one particular thing: one user, one page, one frame. It is like a customer number. It is not the person's name, but it points at exactly one record.
- Media effect / frame: in this context, a media effect is a custom picture frame that a creator builds and publishes. Pages can then use it.
- Page admin: a Facebook page is run by one or more people. Each of those people is an admin of the page. The admin is a private individual behind a public page.
- Disclosure / information leak: a disclosure (or leak) is when a system hands back information to someone who should not have it. It is not about breaking in; the system answers a normal request, but the answer contains more than the asker is entitled to see. Compare it to a receptionist who, when you ask for the opening hours, also reads out the home address of the manager.
- Acting as another user: many web features behave differently depending on who is asking. If a request can be made "as" a different account than the one it should belong to, the server may answer with that other account's data. This is the heart of the second issue.
- Bounty: a bug bounty is a reward a company pays to someone who reports a security problem responsibly, instead of exploiting it.
The setup
The report does not describe which accounts, roles or tools were used to find these issues. The one stated precondition is simple: you need a page with a published media effect. For the first issue, the leak only appears once a page has actually used the frame. For the second, the request is aimed at a frame's ID, and the results concern the person who created that frame.
Finding it
The starting observation was that the Camera Effects Hub holds data that lets someone see an admin of a page that used a frame. Given a page with a published media effect, the hub's edit dialog returns data that includes the admin ID once the page has used the frame. That is unexpected: the creator of a frame should not learn which individual administers a page that adopted it.
The second observation was that the hub also lets a user turn a frame's activation on or off, and that this call can be made as another user. Doing so discloses the frame creator (the user rather than the page) and private events for that user.
Exploitation
Step 1: Read the page admin from the edit dialog
With a page that has a published media effect, send a POST to the edit dialog for that effect:
POST /media_effect/create/dialog/?flow_type=basic_hub&step=edit&media_effect_id=MEDIA_ID
Line by line:
POSTis the method. We are not just fetching a page; we are asking the server to run the edit-dialog action./media_effect/create/dialog/is the endpoint: the address of the edit dialog for media effects.?starts the list of parameters.
Why this step: the edit dialog is a screen a creator is legitimately allowed to open for their own frame. The question was whether the response to that normal request contains anything extra. Once a page has used the frame, the admin ID is disclosed in the response. In other words, the server answers the creator's ordinary request, but the answer includes the identifier of a person who administers the page that adopted the frame.
Step 2: Toggle activation as another user
The hub also exposes an activation toggle. Using this call as another user discloses the frame creator (the user, not the page) and private events for that user:
POST /fbcameraeffects/effects/async/activation/?activate=true&effect_ids[0]=MEDIA_ID
Line by line:
POSTagain means we are asking the server to perform an action, not just read a page./fbcameraeffects/effects/async/activation/is the endpoint that switches a frame's activation.&effect_ids[0]=MEDIA_IDnames the frame to act on.MEDIA_IDis again a placeholder for the real identifier.
Why this step: the toggle is a normal feature for managing a frame. The finding was that the call could be made as another user, and that the response then revealed the frame creator (the user, not the page) and private events belonging to that user. The page owner is disclosed to the user making the call.
Root cause
What it shows is that the hub's responses and the activation endpoint return ownership and metadata that the caller should not receive: the admin ID of a page that used a frame, and the user who created a frame together with private events and effect metadata. Why the existing checks did not prevent this is not stated.
Impact
The first issue could have disclosed the identity of a page admin to the creator of a camera effect.
The second issue leaked ownership and other metadata about Facebook effects from multiple endpoints. Specifically, it affects:
- any user who has used a page to create a frame;
- disclosing the frame creator, which also means knowing the user has a role on the page;
- disclosing IDs belonging to private events;
- disclosing the number of times the frame was used;
- frame impression counts available as insights to the creator;
- which frame location restrictions were set by the creator.
In plain terms: the first leak ties a public page to a private person. The second leak ties a frame back to its creator and spills several kinds of information that belong to that creator, including references to private events and usage statistics.
Fix
Facebook fixed the first issue on Mar 22, 2018, a week after the report was sent on Mar 15, 2018, and awarded a bounty on Mar 28, 2018.
The second report was sent on Mar 29, 2018. Facebook investigated on Apr 2, requested confirmation of the fix on Apr 30, received further details on May 1, verified further on May 3, and fixed the issue and awarded a bounty on Jun 20, 2018.
Variants to test
These are ideas for checking whether the same kind of mistake exists elsewhere:
- On other effect or frame management features, open the edit dialog for an object that a page has adopted and check whether the response includes the adopting page's admin identifiers.
- Take an activation or toggle endpoint for a shared object and call it as a different user, then check whether the response reveals the object's creator, their private events, usage counts, impression insights or location restrictions.
- For each such endpoint, compare the response for a caller who owns the object with the response for a caller who does not. A positive result is ownership or private metadata appearing in the latter.
Glossary
- API: the way one piece of software asks another for something, usually by sending a request to a web address and receiving a structured response.
- HTTP: the language browsers and web servers use to exchange requests and responses.
- HTTP method: the verb on a request, such as
GET(fetch something) orPOST(send data and perform an action). - Endpoint: one specific address on a server that performs one specific job.
- Parameter: a labelled value attached to a request, written as
name=valueand separated by&in a URL. - URL: the address of something on the web, including the endpoint and any parameters.
- POST: an HTTP method used to send data to the server and trigger an action.
- ID: an identifier that points at one particular record, such as one user, page or frame.
- Media effect / frame: a custom picture frame created and published through the Camera Effects Hub.
- Camera Effects Hub: the Facebook area where creators build and manage custom picture frames.
- Page admin: a person who administers a Facebook page.
- Disclosure / information leak: a system returning information to someone who should not be allowed to see it.
- Acting as another user: making a request in a way that the server treats as coming from a different account, so it may return that account's data.
- Activation toggle: the switch that turns a frame on or off.
- Metadata: data about data, such as who created something, how often it was used, or what restrictions apply to it.
- Insights: statistics shown to a creator about how their content performed, such as impression counts.
- Root cause: the underlying code or design mistake that makes a problem possible.
- Bug bounty: a reward a company pays to someone who reports a security problem responsibly.
- Variant: a different place where the same kind of mistake might exist and can be tested.