Skip to content
Access control Write-up Intermediate

Trim private live videos and access them

An attacker could trim any private live video by knowing its ID and then access the trimmed video via a second GraphQL request. This allowed unauthorised access to private live video content.

abdellah yaala Follow

Published on medium.com

Bounty$7,500 View original

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

abdellah yaala, 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.

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

What the report shows

The requests go to business.facebook.com and act on live videos. The researcher, Abdellah Yaala, reported that a private live video could be trimmed and then accessed by anyone who knew its ID, using two GraphQL operations on the business endpoint.

The steps are short. Starting from a known video ID, the first request trims the video and produces a new video ID:

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

variables={"input":{"client_mutation_id":"1","actor_id":"[page_id]","video_id":"[live_victim_video_id]","trimming_params":{"trim_before_start":0,"trim_after_end":15}}}&doc_id=3859231820860792

According to the report, this request trims 15 seconds from any private live video and regenerates a new video ID. The second request takes that new ID and returns a direct CDN link:

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

variables={"video_id":"[new_video]"}&doc_id=3561288230642336

The screenshot shows the second GraphQL call returning the CDN link for the trimmed video.

From the original on medium.com

The report was sent on 20 November 2021 and a bounty of 7,500 USD was rewarded on 19 January 2022. The report does not describe a fix, a severity rating or a CVSS score.

Root cause

The report does not explain why the trimming call accepts a video the caller does not own. The video ID is treated as sufficient proof of access. The second operation takes the new video ID and returns a CDN link.

Impact

An attacker who knows the ID of a private live video can trim it and obtain a CDN link to the result. In the researcher's words, this allows private live videos to be trimmed and accessed. The report does not discuss how video IDs are obtained or what else the CDN link exposes.

How this kind of bug works

This is a broken object-level authorisation problem, sometimes called IDOR, in a GraphQL API. GraphQL exposes a small number of endpoints, usually a single POST path, and the operation is selected by a doc_id or by the query document itself. Authorisation therefore has to be enforced inside each resolver, per object, rather than by the route. When a mutation accepts several identifiers, such as an actor, a page and a target object, it is easy to validate one and trust the rest.

A second, related failure appears when a mutation creates a derived object, here a trimmed copy with a new ID. If the derived object is created without inheriting the privacy settings of its source, or if the read path that turns an ID into a CDN link does not consult those settings, the copy becomes a bypass around the original's access control. Media delivery through signed or unsigned CDN URLs adds another layer: once a URL is issued, the access check has already happened, so the check at issuance time is the only one that matters.

How to test for it

  1. Map the GraphQL surface. Capture traffic from the web and mobile clients and collect operation names, doc_id values and variables for mutations that act on user content: trimming, editing, copying, exporting, sharing and downloading.
  2. Create two accounts. With account A, create a private object (a live video, a draft, a story, a private post) and note its ID. With account B, which has no relationship to A, replay A's mutation using B's session and A's object ID.
  3. Watch for a positive result: a successful response, a new object ID, or a URL that resolves to the content. Then request the derived object through the read path and confirm the content is actually returned, not just that the mutation returned 200.
  4. Test the read path separately. Take an ID belonging to another account and call the resolver that returns a CDN or download link. A link that serves the bytes is the proof; a link that returns an error page is not.
  5. Vary the identifiers. Swap only the target object ID while keeping your own actor and page IDs, and also try the reverse, to see which field is actually being checked.

Common false positives: the mutation succeeds but the derived object is still private; the CDN URL expires immediately or returns 403 when fetched without the session; the object was already public or shared with the attacker's account; and cached responses that reflect the victim's own session rather than the attacker's.

How it is fixed

Hunting notes

These bugs cluster around features that combine several identifiers in one call: page-scoped mutations acting on user content, bulk operations, and anything that produces a copy, export or share link. GraphQL APIs are a good place to look because the schema documents the arguments, and persisted queries can be replayed with modified variables.

Recon signals include operations whose variables contain both an owner-style ID and an object-style ID, mutations that return a new ID, and resolvers that return media URLs. Mobile clients often expose operations the web client does not.

To make a report accepted, show the full chain: the unauthorised mutation, the derived object, and the fetched content, with the two accounts clearly separated and the victim's object private at the time of testing. Keep the proof minimal and reproducible, and state the privacy setting of the source object explicitly.

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

What happened, in plain words

The requests in this report go to business.facebook.com and act on live videos. A live video can be set to private, meaning only the people allowed to see it should be able to watch it. The researcher, Abdellah Yaala, found that anyone who knew the ID of a private live video could trim it and then get a link to the trimmed copy.

A few words first, because they come up constantly. A request is the message your browser sends to a server asking it to do something, a bit like handing a form to a clerk at a counter. The server is the computer that holds the data and answers. An ID is a unique label for one item, like a ticket number: it identifies the video but is not supposed to be a password. GraphQL is a way for an app to ask a server for exactly the data it needs; instead of many different addresses, the app sends a request to one address and names the operation it wants. CDN stands for content delivery network, a network of servers built to hand out large files such as videos quickly.

The whole attack is two requests. The first trims the video and creates a new video ID:

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

variables={"input":{"client_mutation_id":"1","actor_id":"[page_id]","video_id":"[live_victim_video_id]","trimming_params":{"trim_before_start":0,"trim_after_end":15}}}&doc_id=3859231820860792

Line by line: POST /api/graphql/ HTTP/2 says this is a POST request (a request that sends data to the server) to the GraphQL address, using version 2 of the HTTP protocol. Host: business.facebook.com names the site being talked to. The long variables= line carries the details: client_mutation_id is a label for this particular action, actor_id is the page acting, video_id is the target video, and trimming_params says where to cut, here from the start to 15 seconds. doc_id tells the server which stored operation to run, so the client does not have to send the whole query text.

According to the report, this request trims 15 seconds from any private live video and regenerates a new video ID. The report says the request regenerates a new video ID.

The second request takes the new ID and returns a direct CDN link:

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

variables={"video_id":"[new_video]"}&doc_id=3561288230642336

Here the only variable is video_id, set to the new ID, with a different doc_id selecting a different stored operation. The report says this second GraphQL call can directly access the CDN link. The screenshot shows that call returning the CDN link for the trimmed video.

From the original on medium.com

The report was sent on 20 November 2021 and a bounty of 7,500 USD was rewarded on 19 January 2022. It does not describe a fix, a severity rating or a CVSS score.

In general, how this kind of bug works

This is a broken object-level authorisation problem, often called IDOR (insecure direct object reference), inside a GraphQL API. The everyday comparison: a hotel receptionist checks that you are a guest, then hands you a key to any room number you say out loud. The check happened, but it was the wrong check.

GraphQL usually exposes one address, so the server cannot rely on the address to decide who may do what. Authorisation has to happen inside each operation, per object. When one operation accepts several identifiers, such as an actor, a page and a target object, it is easy to validate one and trust the rest. The report does not explain why the trimming call accepts a video the caller does not own. The video ID is treated as proof of access.

A second, related failure appears when an operation creates a derived object, here a trimmed copy with a new ID. If the copy does not inherit the privacy settings of its source, or if the read path that turns an ID into a CDN link does not consult those settings, the copy becomes a way around the original's access control. Media delivery adds another layer: once a CDN URL is issued, the access check has already happened, so the check at issuance time is the only one that matters.

How to test for it

  1. Map the GraphQL surface. Capture traffic from the web and mobile clients and collect operation names, doc_id values and variables for operations that act on user content: trimming, editing, copying, exporting, sharing and downloading.
  2. Create two accounts. With account A, create a private object (a live video, a draft, a story, a private post) and note its ID. With account B, which has no relationship to A, replay A's operation using B's session and A's object ID.
  3. Watch for a positive result: a successful response, a new object ID, or a URL that resolves to the content. Then request the derived object through the read path and confirm the content is actually returned, not just that the operation returned 200.
  4. Test the read path separately. Take an ID belonging to another account and call the operation that returns a CDN or download link. A link that serves the bytes is the proof; a link that returns an error page is not.
  5. Vary the identifiers. Swap only the target object ID while keeping your own actor and page IDs, and also try the reverse, to see which field is actually being checked.

Common false positives: the operation succeeds but the derived object is still private; the CDN URL expires immediately or returns 403 when fetched without the session; the object was already public or shared with the attacker's account; and cached responses that reflect the victim's own session rather than the attacker's.

How it is fixed

Hunting notes

These bugs cluster around features that combine several identifiers in one call: page-scoped operations acting on user content, bulk operations, and anything that produces a copy, export or share link. GraphQL APIs are a good place to look because the schema documents the arguments, and stored operations can be replayed with modified variables.

Recon signals include operations whose variables contain both an owner-style ID and an object-style ID, operations that return a new ID, and operations that return media URLs. Mobile clients often expose operations the web client does not.

To make a report accepted, show the full chain: the unauthorised edit, the derived object, and the fetched content, with the two accounts clearly separated and the victim's object private at the time of testing. Keep the proof minimal and reproducible, and state the privacy setting of the source object explicitly.

Glossary

  • Request: a message a browser or app sends to a server asking it to do something.
  • Server: the computer that stores data and answers requests.
  • HTTP/2: a version of the protocol browsers and servers use to exchange requests and responses.
  • POST: a request type that sends data to the server, often to create or change something.
  • Host: the part of a request that names which site is being contacted.
  • GraphQL: an API style where one address accepts named operations and returns exactly the requested data.
  • API: the interface a program uses to talk to another program.
  • Endpoint: a specific address on a server that accepts requests.
  • doc_id: an identifier for a stored operation on the server, so the client need not send the full query text.
  • Variable: a named value passed with a GraphQL operation, such as an ID or a setting.
  • Mutation: a GraphQL operation that changes data rather than only reading it.
  • Resolver: the piece of server code that handles one field or operation and decides what to return.
  • ID: a unique label for an item, such as a video; it identifies but should not grant access.
  • IDOR: insecure direct object reference, where an app accepts an object ID without checking the caller may access that object.
  • Broken object-level authorisation: a flaw where access is not checked for the specific object being acted on.
  • Authorisation: the decision about what a given user is allowed to do.
  • Session: the server's record of who you are across requests, usually tied to a cookie.
  • Cookie: a small piece of data the browser stores and sends back to the site to identify the session.
  • CDN: content delivery network, servers built to deliver large files such as videos quickly.
  • Signed URL: a link with a built-in signature and often an expiry, so the server can trust it without another check.
  • 403: the HTTP status meaning the server understood the request but refused it.
  • 200: the HTTP status meaning the request succeeded.
  • False positive: a result that looks like a bug but is not one.
  • Recon: the early stage of looking for interesting features and behaviours to test.
  • CVSS: a standard scoring system for the severity of a vulnerability.

More by abdellah yaala

View all

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