Skip to content
Access control Write-up Intermediate

Create post on any Facebook page

A missing authorization check in Facebook Creative Hub allowed an attacker to create an invisible post on any Facebook Page without having a role on that Page. The attacker could also bypass the initial fix via the 'Send to Mobile' workflow.

Pouya Darabi Follow

Published on darabi.me

Bounty$30,000 View original

I discovered a vulnerability in Facebook Creative Hub that allowed an attacker to create an invisible (unlisted) post on an arbitrary Facebook Page without having a role on that Page.

Pouya Darabi, on darabi.me

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Facebook Creative Hub was a product that let advertisers create ad mockups and collaborate on them. To preview a mockup, Facebook generated an invisible (unlisted) post on the selected Page. The researcher, Pouya Darabi (@Pouyadarabi), found that this preview-generation workflow could be abused to create an invisible post on an arbitrary Facebook Page without holding any role on that Page.

The report describes two related issues: the original missing authorization check, and a second path that bypassed Facebook's first fix. The product, issue and impact are summarised in the original as follows:

Field Value
Product Facebook Creative Hub
Issue Missing authorization / access-control validation
Impact Create an invisible post on an arbitrary Facebook Page
Reported November 6, 2020
Final fix November 20, 2020
Bounty $30,000

Background: invisible posts

Facebook supports different types of posts. One of them is an invisible, or unlisted, post. Unlike a normal Page post, it does not appear on the Page timeline, but it still has its own post ID and direct URL.

Because the post is not visible on the normal Page timeline, a Page administrator may not discover it through the usual Page interface. The post can still be accessed directly and shared with other users.

Setup

The original report does not describe the accounts, roles, tools or versions used beyond the following:

  • The researcher used the Creative Hub workflow for creating and previewing ad mockups.
  • The normal preview-generation flow expected the user to have an advertiser role on the selected Page before Facebook would generate the preview.
  • The researcher intercepted the request responsible for saving the mockup, which implies the use of an intercepting proxy, though the report does not name one.

The report does not state which Page IDs were used, which account was used, or any browser or tool versions.

Finding it

While testing the Creative Hub preview workflow, the researcher intercepted the request responsible for saving the mockup and changed the page_id to the ID of another Page. The modified request was accepted and saved without an authorization error.

This was suspicious because the normal preview-generation flow did contain an authorization check: a user was expected to have an advertiser role on the selected Page before Facebook would generate the preview. The expected permission error appears when the user does not have the required role.

The report does not include the raw request or response for this first observation, only the description that the page_id could be modified and that the request was accepted.

Exploitation

Step 1: Modify the Page identifier when saving the mockup

The researcher changed the page_id in the request that saves the mockup to the ID of a Page they did not control.

The original report does not reproduce the exact request body or headers for this step. What it does state is that the parameter of interest is page_id, and that the normal flow would have rejected the request because the user lacked an advertiser role on the target Page.

Step 2: Use the sharing feature to generate the preview

Creative Hub also had a sharing feature for ad previews. After clicking Share, the API returned a shareable preview URL in this format:

Text
https://www.facebook.com/ads/previewer/__PREVIEW_KEY__

The important difference was that the authorization check was missing when a preview post was generated through the share page. By changing the page_id in the GraphQL request before saving the mockup, then obtaining the shareable preview URL, it was possible to make Facebook generate a preview post associated with an arbitrary Page.

The report refers to the request as a GraphQL request but does not reproduce its body.

Step 3: Obtain the resulting post ID

The remaining step was to obtain the resulting post_id, which was exposed through the ad-preview endpoints. This completed the chain and produced an invisible post on the target Page without the Page owner's knowledge.

The report does not list the specific ad-preview endpoints or the response bodies that contained the post_id.

Bypassing the initial fix

Facebook fixed the original vulnerability after the report. During verification, however, the researcher found another Creative Hub workflow that could still generate the preview without performing the required Page permission check.

The Send to Mobile functionality called the following endpoint:

JavaScript
AsyncRequest.post('/ads/previewer/notify_mobile/__PREVIEW_KEY__', {})

Calling this functionality caused Facebook to generate the preview again and send a notification to the mobile device. The preview-generation step in this path did not enforce the expected Page authorization check, which allowed the original issue to be reproduced through a different workflow.

The report does not include the response to this request, nor the exact conditions under which the notification was delivered.

Root cause

The report describes the root cause as a missing authorization check when Creative Hub generated preview posts through its sharing workflow. In the normal preview-generation flow, the user was expected to have an advertiser role on the selected Page. In the share-based path, that check was absent, so a preview post could be generated for a Page the user did not control.

The first fix addressed the original path, but the Send to Mobile workflow still generated the preview without enforcing the Page permission check.

Impact

An attacker could create an invisible (unlisted) post on an arbitrary Facebook Page without having a role on that Page. Because the post does not appear on the Page timeline, a Page administrator may not discover it through the usual Page interface. The post still has its own post ID and direct URL, and can be accessed directly and shared with other users.

The bounty awarded was $30,000.

Fix

Facebook fixed the original vulnerability after the report, and later fixed the bypass.

Disclosure timeline

Date Event
November 6, 2020 Initial vulnerability reported to Facebook.
November 6, 2020 Report triaged.
November 11, 2020 Initial vulnerability fixed.
November 12, 2020 Fix bypass reported.
November 12, 2020 Bypass triaged.
November 20, 2020 Bypass fixed.
December 16, 2020 $30,000 bounty awarded.

Variants to test

  1. Change the Page identifier in any mockup or preview save request. Look for a page_id (or similarly named) parameter in GraphQL or REST requests that create previews, and substitute the ID of a Page you do not control. A positive result is a successful save with no authorization error, followed by a preview post associated with the target Page.
  2. Compare authorization across workflows that generate the same object. If one workflow (for example, the normal preview flow) returns a permission error, try other workflows that produce the same preview, such as sharing, sending to mobile, exporting or duplicating. A positive result is a workflow that generates the preview without the permission error.
  3. Re-test after a fix. When a vendor fixes one path, enumerate sibling endpoints that call the same preview-generation logic. A positive result is a second path that still generates the preview for a Page you do not control.
  4. Follow the object identifier through preview endpoints. After generating a preview, check whether the resulting post_id is exposed through ad-preview endpoints. A positive result is a post ID that resolves to a direct URL for the target Page.
  5. Check whether the resulting object is discoverable by the Page owner. If the object is unlisted, confirm whether it appears in the Page timeline or admin interface. A positive result is an object that exists and is reachable by URL but is not visible to the Page administrator through normal interfaces.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

A security researcher found a way to create a hidden post on any Facebook Page, even if they had no permission to post there. The post would not appear on the Page's normal timeline, so the Page owner might never notice it. The researcher reported the problem to Facebook, which fixed it. But the researcher then found a second way to do the same thing, which bypassed the first fix. Facebook fixed that too and paid a $30,000 reward.

Background: what is an invisible post?

Facebook Pages can have different kinds of posts. Most posts appear on the Page's timeline, the list of recent posts that visitors see. But Facebook also supports invisible (or unlisted) posts. These posts do not appear on the timeline. However, they still have a unique post ID and a direct web address (URL). Anyone who knows the URL can open the post and share it with others.

Because the post is not on the timeline, a Page administrator might not discover it by looking at the Page. They would only find it if they knew the direct link.

Example of the resulting Facebook Page post.

An unlisted post can still be shared using its direct URL.

What is Creative Hub?

Facebook Creative Hub was a tool for advertisers. It let them design mockups (draft versions) of ads and work on them together. To preview a mockup, Facebook would generate an invisible post on a Facebook Page that the advertiser selected. That way, the advertiser could see how the ad would look on that Page.

The normal preview flow and its permission check

Normally, before Facebook generates a preview post on a Page, it checks whether the user has the right permission. Specifically, the user needed to have an advertiser role on that Page. A role is a set of permissions: for example, an admin can manage the Page, and an advertiser can create ads for it. If the user did not have the advertiser role, Facebook would show a permission error and not generate the preview.

The expected permission error when the user does not have the required role.

How the researcher found the problem

The researcher was testing the Creative Hub preview workflow. They used a tool to intercept the request, meaning they captured the network message that the browser sends to Facebook's servers when saving a mockup. They then modified one parameter in that request: the page_id. The page_id is the identifier of the Facebook Page where the preview should be created. They changed it to the ID of a different Page, one they did not control.

The modified request was accepted and saved without any authorization error. This was suspicious because the normal preview flow would have rejected it: the researcher did not have an advertiser role on the target Page.

The Creative Hub request where the Page identifier could be modified.

The original report does not include the raw request or response for this first observation. It only says that the page_id could be modified and that the request was accepted.

Exploitation: step by step

Step 1: Modify the Page identifier when saving the mockup

The researcher changed the page_id in the request that saves the mockup to the ID of a Page they did not control. The modified request was accepted and saved without an authorization error.

The original report does not reproduce the exact request body or headers for this step. It states that the parameter of interest is page_id, and that the normal flow would have rejected the request because the user lacked an advertiser role on the target Page.

Step 2: Use the sharing feature to generate the preview

Creative Hub also had a sharing feature for ad previews. After clicking Share, the API returned a shareable preview URL in this format:

Text
https://www.facebook.com/ads/previewer/__PREVIEW_KEY__

What this code means: This is a URL template. The part __PREVIEW_KEY__ is a placeholder for a unique key that Facebook generates. When you click Share, Facebook gives you a URL with a real key in place of the placeholder. That URL lets anyone view the preview.

The important difference was that the authorization check was missing when a preview post was generated through the share page. By changing the page_id in the GraphQL request before saving the mockup, then obtaining the shareable preview URL, it was possible to make Facebook generate a preview post associated with an arbitrary Page.

The report refers to the request as a GraphQL request but does not reproduce its body. GraphQL is a way for a browser to ask a server for specific data, using a query language. It is often used in web APIs.

Creative Hub's shareable preview workflow.

Step 3: Obtain the resulting post ID

The remaining step was to obtain the resulting post_id, which was exposed through the ad-preview endpoints. This completed the chain and produced an invisible post on the target Page without the Page owner's knowledge.

The report does not list the specific ad-preview endpoints or the response bodies that contained the post_id.

Bypassing the initial fix

Facebook fixed the original vulnerability after the report. During verification, however, the researcher found another Creative Hub workflow that could still generate the preview without performing the required Page permission check.

The Send to Mobile functionality called the following endpoint:

JavaScript
AsyncRequest.post('/ads/previewer/notify_mobile/__PREVIEW_KEY__', {})

What this code means: This is a line of JavaScript code that sends a request to Facebook's servers. AsyncRequest.post is a function that makes an HTTP POST request (a way to send data to a server). The first argument is the URL path: /ads/previewer/notify_mobile/__PREVIEW_KEY__. The __PREVIEW_KEY__ is again a placeholder for the unique preview key. The second argument, {}, is an empty object, meaning no extra data is sent. So this code tells Facebook to send a notification to a mobile device about the preview.

Calling this functionality caused Facebook to generate the preview again and send a notification to the mobile device. The preview-generation step in this path did not enforce the expected Page authorization check, which allowed the original issue to be reproduced through a different workflow.

The report does not include the response to this request, nor the exact conditions under which the notification was delivered.

Facebook awarded a $30,000 bounty for the vulnerability.

Root cause

The report describes the root cause as a missing authorization check when Creative Hub generated preview posts through its sharing workflow. In the normal preview-generation flow, the user was expected to have an advertiser role on the selected Page. In the share-based path, that check was absent, so a preview post could be generated for a Page the user did not control.

The first fix addressed the original path, but the Send to Mobile workflow still generated the preview without enforcing the Page permission check. The report does not describe the code-level cause beyond the missing check in the share-based path and the Send to Mobile path.

Impact

An attacker could create an invisible (unlisted) post on an arbitrary Facebook Page without having a role on that Page. Because the post does not appear on the Page timeline, a Page administrator may not discover it through the usual Page interface. The post still has its own post ID and direct URL, and can be accessed directly and shared with other users.

The report does not describe any further impact such as content injection into the Page timeline, interaction with Page followers, or persistence beyond the post itself. The bounty awarded was $30,000.

Fix

Facebook fixed the original vulnerability after the report, and later fixed the bypass.

Disclosure timeline

Date Event
November 6, 2020 Initial vulnerability reported to Facebook.
November 6, 2020 Report triaged.
November 11, 2020 Initial vulnerability fixed.
November 12, 2020 Fix bypass reported.
November 12, 2020 Bypass triaged.
November 20, 2020 Bypass fixed.
December 16, 2020 $30,000 bounty awarded.

Variants to test

  1. Change the Page identifier in any mockup or preview save request. Look for a page_id (or similarly named) parameter in GraphQL or REST requests that create previews, and substitute the ID of a Page you do not control. A positive result is a successful save with no authorization error, followed by a preview post associated with the target Page.
  2. Compare authorization across workflows that generate the same object. If one workflow (for example, the normal preview flow) returns a permission error, try other workflows that produce the same preview, such as sharing, sending to mobile, exporting or duplicating. A positive result is a workflow that generates the preview without the permission error.
  3. Re-test after a fix. When a vendor fixes one path, enumerate sibling endpoints that call the same preview-generation logic. A positive result is a second path that still generates the preview for a Page you do not control.
  4. Follow the object identifier through preview endpoints. After generating a preview, check whether the resulting post_id is exposed through ad-preview endpoints. A positive result is a post ID that resolves to a direct URL for the target Page.
  5. Check whether the resulting object is discoverable by the Page owner. If the object is unlisted, confirm whether it appears in the Page timeline or admin interface. A positive result is an object that exists and is reachable by URL but is not visible to the Page administrator through normal interfaces.

Glossary

  • API: Application Programming Interface; a set of rules that lets one program talk to another, like a waiter taking your order to the kitchen.
  • Authorization: The process of checking whether a user has permission to do something.
  • Advertiser role: A permission level on a Facebook Page that allows a user to create and manage ads for that Page.
  • Bounty: A reward paid by a company to a security researcher who reports a valid vulnerability.
  • Creative Hub: A Facebook tool for advertisers to create and preview ad mockups.
  • Endpoint: A specific URL or address where an API can be accessed.
  • GraphQL: A query language for APIs that lets clients request exactly the data they need.
  • IDOR: Insecure Direct Object Reference; a vulnerability where a user can access objects (like posts or pages) by changing an identifier in a request, without proper authorization checks.
  • Intercept: To capture and modify network traffic between a browser and a server, often using a proxy tool.
  • Invisible (unlisted) post: A Facebook post that does not appear on the Page timeline but has its own ID and direct URL.
  • Mockup: A draft or sample version of an ad design.
  • Parameter: A piece of data sent in a request, like page_id.
  • Permission error: An error message shown when a user tries to do something they are not allowed to do.
  • Post ID: A unique identifier for a Facebook post.
  • Preview key: A unique string that identifies a specific ad preview.
  • Proxy: A tool that sits between your browser and the internet, allowing you to view and modify requests.
  • Role: A set of permissions assigned to a user.
  • Timeline: The main feed on a Facebook Page where posts appear.
  • Triaged: The process where a security team reviews a report and confirms it is valid.
  • URL: Uniform Resource Locator; the address of a web page or resource.
  • Vulnerability: A weakness in a system that can be exploited to cause harm.

More by Pouya Darabi

View all

1 more disclosed report, 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.