Skip to content
IDOR Write-up Beginner

Disclose latest stream video asset earnings for any gaming streamer page

The Facebook Gaming dashboard's stream report feature had an IDOR vulnerability in the delegate_page_id parameter, allowing an attacker to view the earnings of the latest stream video asset for any gaming streamer page. This exposed private financial information that should only be accessible to page administrators.

Sarmad Hassan Follow

Published on blog.flawminers.com

Within the Facebook gaming dashboard, streamers have access to a valuable feature known as the “Viewing Stream Report.” This option provides essential information about their stream, including details such as the title, description, and tagged game. Streamers can leverage this tool to gain insights into the…

Sarmad Hassan, on blog.flawminers.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.

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. 4 min read.

Context

Facebook Gaming gives streamers a dashboard with a feature called the "Viewing Stream Report". The report shows information about a stream: its title, its description and the tagged game. Streamers use it to understand how their streams performed and which attributes they had. The report links to the official guide at https://www.facebook.com/business/help/423354648152123?id=648321075955172 for more detail.

The request that loads this report is a GraphQL POST to business.facebook.com. The researcher found that the request is vulnerable to an IDOR in the delegate_page_id parameter, which makes it possible to read the report of a page the caller does not own.

Setup

The researcher needed two things: a Facebook page they controlled (referred to as the attacker page) and a session in the Facebook Creator Studio / Live dashboard. The tool used to intercept and modify the request was Burp Suite. The report does not give browser or Burp versions.

The entry point is the Creator Studio home:

Text
https://business.facebook.com/creatorstudio/home

From there: Creative tools, then Live dashboard.

Finding it

In the Live dashboard there is a "Latest stream" box. Clicking "View Stream Report" in that box sends the POST request that fetches the report. Intercepting it shows that the page whose report is being requested is carried in a parameter called delegate_page_id. That is the classic shape of an IDOR: an object reference (here a page ID) is accepted from the client and used to look up data without an ownership check.

Exploitation

Step 1: open the Live dashboard and intercept the report request

  1. Navigate to https://business.facebook.com/creatorstudio/home, then Creative tools, then Live dashboard.
  2. In the "Latest stream" box, click "View Stream Report" with Burp Suite intercepting.

The intercepted request looks like this:

HTTP
POST /api/graphql/ HTTP/1.1
Host: business.facebook.com

av=attacker_page_id&__user=attacker_user_id&__a=1&__dyn=xxx&__csr=&__req=1l&__beoa=0&__pc=PHASED%3Amedia_manager_pkg&dpr=1&__ccg=EXCELLENT&__rev=1003338073&__s=1go6yt%3A1dmt22%3Amrohob&__hsi=6931897176295571644-0&__comet_req=0&fb_dtsg=xxxxxx&jazoest=22015&__jssesw=1&fb_api_caller_class=RelayModern&fb_api_req_friendly_name=GamesVideoStreamerDashboardProfilePlusVideoQuery&variables={"delegate_page_id":"attacker_page_ID"}&server_timestamps=true&doc_id=5005787666128910

The parts that matter:

  • fb_api_req_friendly_name=GamesVideoStreamerDashboardProfilePlusVideoQuery names the GraphQL operation that builds the streamer dashboard profile plus video data.
  • doc_id=5005787666128910 selects the persisted GraphQL document on the server.
  • variables={"delegate_page_id":"attacker_page_ID"} is the object reference. It carries the page ID whose report is being requested, and it is fully client controlled.
  • av=attacker_page_id and __user=attacker_user_id identify the caller's own page and user, and fb_dtsg is the usual Facebook anti-CSRF token for the session. These are present and valid, but they do not bind the request to the page named in delegate_page_id.

Step 2: change the page ID

Replace the value of delegate_page_id with the ID of any gaming streamer's page and forward the request. The session, the fb_dtsg token and the caller's own page ID stay as they are; only the object reference changes.

Step 3: read the response

The server returns the dashboard data for the targeted page. Among it is the earnings figure for the latest stream video asset:

Text
"latest_stream_video_asset_earnings":"500.00"

That value is private financial information and should only be visible to administrators of the page it belongs to. With the modified request, the attacker obtains it for any gaming streamer page whose ID they know.

Root cause

The request takes delegate_page_id from the variables and returns the page's stream data, including latest_stream_video_asset_earnings, for a page the caller does not administer. The request is otherwise well formed and authenticated, with a session and an fb_dtsg token sent. What is missing is an authorisation check on the object itself, which is exactly the gap an IDOR exploits. The report does not describe the server-side code, so the precise location of the missing check is not stated.

Impact

An attacker can read the earnings of the latest stream video asset for any gaming streamer page by changing the delegate_page_id value. The response includes extensive information about the streamer page, among it sensitive financial information that should only be accessible to page administrators. The report frames this as a breach of the streamers' privacy and financial security.

Fix

The report was fixed on 16 March 2021, and the researcher confirmed the fix the same day. The fix that addresses this class of bug is to derive the page from the authenticated session, or to verify that the caller administers the page named in delegate_page_id before returning any of its data, and to reject the request otherwise.

Variants to test

  • Other GraphQL operations with a page or object ID in variables. Look for parameters such as delegate_page_id, page_id, asset_id or video_id in persisted queries (doc_id) and swap them for IDs belonging to another account. A positive result is a response containing data that belongs to the other object.
  • The same operation with the caller's own page ID removed or altered. If the response still resolves to a page, check whether the server is falling back to a client-supplied value rather than the session.
  • Batch or aliased GraphQL requests. Send several IDs in one request to see whether the authorisation check is applied per object or only once per request.
  • Related dashboard queries. The stream report is one view; earnings, payouts and audience data often live in sibling operations. Test each one for the same missing ownership check.
  • Numeric ID enumeration. Where IDs are sequential or otherwise guessable, confirm whether a valid but unauthorised ID returns data or an authorisation error; the latter is the expected behaviour after a fix.

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. 12 min read.

What happened, in plain words

Facebook Gaming is a part of Facebook where people broadcast themselves playing games. Those people are called streamers, and each streamer has a page on Facebook. Facebook gives streamers a dashboard: a private control panel where they can see how their streams did. One of the tools in that dashboard is called the "Viewing Stream Report". It shows things like the title of a stream, its description and which game was tagged. Streamers use it to understand how their broadcasts performed. The report links to the official guide at https://www.facebook.com/business/help/423354648152123?id=648321075955172 for more detail.

The dashboard is not a set of ordinary web pages that are simply displayed. When you click something in it, your browser quietly sends a request to a Facebook server and asks for data, and the server sends the data back. That kind of request-and-answer interface is what people call an API. The request that loads the stream report is one of these API calls, and it goes to business.facebook.com.

The researcher found that this request carries the identity of the page whose report is wanted in a parameter called delegate_page_id, and that the parameter is vulnerable to an IDOR. Nothing checks that the person asking actually owns that page. So by changing one value in the request, the researcher could ask for the report of somebody else's page and receive it, including a private number: the earnings of that streamer's latest stream video.

A bug where a program accepts a reference to an object (here, a page ID) from the user and hands back that object's data without checking whether the user is allowed to see it is called an Insecure Direct Object Reference, or IDOR. A simple comparison: imagine a hotel where you tell the receptionist your room number and they hand you the key, without ever checking that the room is booked in your name. The room number is the "direct object reference", and the missing check is the insecurity.

Setup

The researcher needed two things to test this: a Facebook page they controlled (the report calls it the attacker page) and a normal logged-in session in the Facebook Creator Studio and Live dashboard. A session is simply the state of being logged in: your browser holds a cookie, a small piece of data that the site gave it when you signed in, and it sends that cookie with every request so the server knows who you are. Think of it as a wristband you get at an event: you show it at the door and you are let in without showing your ticket again.

The tool used to intercept and modify the request was Burp Suite. Burp Suite is a program that sits between your browser and the website and lets you pause a request, look at it, change it and then send it on. The report does not give browser or Burp versions.

The entry point is the Creator Studio home:

Text
https://business.facebook.com/creatorstudio/home

This is just the address you type into the browser to reach the Creator Studio, the place where page owners manage their content. From there you go to Creative tools, then to the Live dashboard.

Finding it

In the Live dashboard there is a box called "Latest stream". Clicking "View Stream Report" in that box is what sends the POST request that fetches the report. A POST request is one of the ways a browser talks to a server: roughly, "here is some data, please do something with it", as opposed to a GET request, which is more like "please give me this page".

When the researcher paused that request with Burp Suite, they could see that the page whose report is being requested is carried in a parameter called delegate_page_id. Instead, the browser sends it, in a parameter called delegate_page_id. A parameter is simply a named value inside a request, like a field on a form: a name and the value filled in next to it. That is the classic shape of an IDOR: an object reference (here a page ID) is accepted from the client and used to look up data without an ownership check. The client, in this context, means the browser, the side the user controls, as opposed to the server, the side the company controls.

Exploitation

Step 1: open the Live dashboard and intercept the report request

  1. Navigate to https://business.facebook.com/creatorstudio/home, then Creative tools, then Live dashboard.
  2. In the "Latest stream" box, click "View Stream Report" with Burp Suite intercepting.

The reason for each step: the first step gets you into the part of Facebook where the feature lives, logged in as yourself. The second step triggers the exact request you want to study, while Burp Suite is set to pause it, so you can read it before it reaches Facebook.

The intercepted request looks like this:

HTTP
POST /api/graphql/ HTTP/1.1
Host: business.facebook.com

av=attacker_page_id&__user=attacker_user_id&__a=1&__dyn=xxx&__csr=&__req=1l&__beoa=0&__pc=PHASED%3Amedia_manager_pkg&dpr=1&__ccg=EXCELLENT&__rev=1003338073&__s=1go6yt%3A1dmt22%3Amrohob&__hsi=6931897176295571644-0&__comet_req=0&fb_dtsg=xxxxxx&jazoest=22015&__jssesw=1&fb_api_caller_class=RelayModern&fb_api_req_friendly_name=GamesVideoStreamerDashboardProfilePlusVideoQuery&variables={"delegate_page_id":"attacker_page_ID"}&server_timestamps=true&doc_id=5005787666128910

Line by line, in plain words:

  • POST /api/graphql/ HTTP/1.1 is the first line of the request. POST is the method, the verb telling the server this request carries data. /api/graphql/ is the address on the server being asked. HTTP/1.1 is the version of the language the browser and server use to talk. GraphQL is a way of asking a server for exactly the data you want, by naming an operation and giving it some values, rather than fetching a whole page.
  • Host: business.facebook.com says which website the request is for. One server can host many sites, so the request names the one it wants.
  • The blank line separates the headers (the labels at the top) from the body (the data itself). Everything after it is the body.
  • av=attacker_page_id is a parameter carrying the ID of the researcher's own page. av is just a short name Facebook uses for it.
  • __user=attacker_user_id carries the ID of the logged-in user, again the researcher's own.
  • __a=1, __dyn=xxx, __csr=, __req=1l, __beoa=0, __pc=PHASED%3Amedia_manager_pkg, dpr=1, __ccg=EXCELLENT, __rev=1003338073, __s=1go6yt%3A1dmt22%3Amrohob, __hsi=6931897176295571644-0, __comet_req=0, jazoest=22015, __jssesw=1 and server_timestamps=true are assorted bookkeeping values that Facebook's web pages attach to their requests. They are not the point of the bug; they are part of the normal furniture of the request.
  • fb_dtsg=xxxxxx is Facebook's anti-CSRF token for the session. CSRF stands for Cross-Site Request Forgery: a trick where another website makes your browser send a request to a site you are logged into, without you meaning to. The token is a secret value that the real page knows and another site does not, so the server can tell a genuine request from a forged one. Here it is shown as xxxxxx because the real value is a secret.
  • fb_api_caller_class=RelayModern names the piece of Facebook's front-end code that made the call. Relay is a library for talking to GraphQL servers.
  • fb_api_req_friendly_name=GamesVideoStreamerDashboardProfilePlusVideoQuery names the GraphQL operation that builds the streamer dashboard profile plus video data. It is a human-readable label for "which question am I asking".
  • variables={"delegate_page_id":"attacker_page_ID"} is the object reference. It is written in JSON, a simple text format for structured data: curly braces hold a set of name-and-value pairs, and here the name is delegate_page_id and the value is the researcher's own page ID. This is the value that decides whose report is fetched, and it is fully controlled by the browser.
  • doc_id=5005787666128910 selects the persisted GraphQL document on the server. A persisted document is a saved query: instead of sending the whole question in text every time, the browser sends a number that points to a copy the server already has. It is like ordering dish number 12 from a menu instead of describing the recipe.

The important observation is that av, __user and fb_dtsg are all present and valid, but they do not tie the request to the page named in delegate_page_id. In other words, the request proves who is asking, but nothing in it proves that the asker is allowed to see the page being asked about.

Step 2: change the page ID

Replace the value of delegate_page_id with the ID of any gaming streamer's page and forward the request. Forwarding means letting Burp Suite send the modified request on to Facebook. The session, the fb_dtsg token and the caller's own page ID stay as they are; only the object reference changes. That is deliberate: the researcher wanted to show that a completely normal, properly authenticated request could be pointed at somebody else's data just by editing one value.

Step 3: read the response

The server returns the dashboard data for the targeted page. Among it is the earnings figure for the latest stream video asset:

Text
"latest_stream_video_asset_earnings":"500.00"

This is a single line from the JSON the server sent back. latest_stream_video_asset_earnings is the name of the field, and "500.00" is its value: an amount of money, written as text. An asset here means a piece of content, in this case the video of the latest stream. That value is private financial information and should only be visible to administrators of the page it belongs to. With the modified request, the attacker obtains it for any gaming streamer page whose ID they know.

Root cause

The request takes delegate_page_id from the variables and returns the page's stream data, including latest_stream_video_asset_earnings, for a page the caller does not administer. A resolver is the piece of server code that answers one field of a GraphQL query: the query names what it wants, and the resolver goes and gets it.

The request is otherwise well formed and authenticated, with a session and an fb_dtsg token sent. Authentication is the question "who are you?", and it was answered correctly. Authorisation is the next question, "are you allowed to do this?", and that one was never asked. What is missing is an authorisation check on the object itself, which is exactly the gap an IDOR exploits. The report does not describe the server-side code, so the precise location of the missing check is not stated.

Impact

An attacker can read the earnings of the latest stream video asset for any gaming streamer page by changing the delegate_page_id value. The response includes extensive information about the streamer page, among it sensitive financial information that should only be accessible to page administrators. The report frames this as a breach of the streamers' privacy and financial security.

Fix

The report was fixed on 16 March 2021, and the researcher confirmed the fix the same day. The fix that addresses this class of bug is to derive the page from the authenticated session, or to verify that the caller administers the page named in delegate_page_id before returning any of its data, and to reject the request otherwise. In the hotel comparison: the receptionist should look up which room is booked in your name, rather than trusting the room number you say out loud.

Variants to test

  • Other GraphQL operations with a page or object ID in variables. Look for parameters such as delegate_page_id, page_id, asset_id or video_id in persisted queries (doc_id) and swap them for IDs belonging to another account. A positive result is a response containing data that belongs to the other object.
  • The same operation with the caller's own page ID removed or altered. If the response still resolves to a page, check whether the server is falling back to a client-supplied value rather than the session.
  • Batch or aliased GraphQL requests. Send several IDs in one request to see whether the authorisation check is applied per object or only once per request. Batching means putting several questions in one request; aliasing means giving each one its own label so the answers can be told apart.
  • Related dashboard queries. The stream report is one view; earnings, payouts and audience data often live in sibling operations. Test each one for the same missing ownership check.
  • Numeric ID enumeration. Where IDs are sequential or otherwise guessable, confirm whether a valid but unauthorised ID returns data or an authorisation error; the latter is the expected behaviour after a fix. Enumeration means trying IDs one after another, the way you might try door numbers along a corridor.

Glossary

  • API: a defined way for one program to ask another for data or actions, here the requests the dashboard sends to Facebook's servers.
  • Asset: a piece of content, such as a video, that a page owns.
  • Authentication: proving who you are, for example by logging in.
  • Authorisation: deciding whether an identified user is allowed to do or see a particular thing.
  • Burp Suite: a tool that sits between browser and server so you can pause, inspect and change requests.
  • Client: the side the user controls, normally the browser.
  • Cookie: a small piece of data a site stores in your browser, often used to keep you logged in.
  • CSRF (Cross-Site Request Forgery): tricking a logged-in browser into sending a request the user did not intend; anti-CSRF tokens are used to prevent it.
  • Dashboard: a private control panel showing data and tools for an account or page.
  • delegate_page_id: the parameter in this request that names the page whose report is wanted.
  • doc_id: a number identifying a saved (persisted) GraphQL query on the server.
  • Enumeration: trying values one by one, such as successive IDs, to find ones that work.
  • fb_dtsg: Facebook's anti-CSRF token attached to requests in a session.
  • GraphQL: a way of asking a server for specific data by naming an operation and supplying values.
  • IDOR (Insecure Direct Object Reference): a bug where a program takes an object reference from the user and returns that object's data without checking the user is allowed to see it.
  • JSON: a simple text format for structured data, using curly braces, names and values.
  • Parameter: a named value inside a request, like a field on a form.
  • Persisted query / document: a GraphQL query stored on the server and referred to by a number instead of being sent in full.
  • POST request: a request that carries data to the server and asks it to act on it.
  • Resolver: the server-side code that fetches the data for one field of a GraphQL query.
  • Server: the side the company controls, which stores data and answers requests.
  • Session: the state of being logged in, kept alive by a cookie sent with each request.
  • Streamer: a person who broadcasts live video, here on Facebook Gaming.
  • Token: a value, often secret, used to prove something about a request, such as that it came from the genuine page.
  • Variables: the section of a GraphQL request that carries the values the operation uses, here including delegate_page_id.

More by Sarmad Hassan

View all

17 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.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.