Delete any Video or Reel on Facebook (11,250$)
A GraphQL endpoint for cropping and trimming videos accepted any video ID and allowed manipulation of aspect ratio parameters, causing the video to be reframed into a broken, unloadable state that appeared deleted. An attacker could delete any video, live video, or reel on Facebook.
Published on bugreader.com
While I was attempting to discover more vulnerabilities as part of Facebook's bug bounty program, I spent about two weeks without success. I began to feel like there were no more bugs on Facebook, but I continued to try and eventually realized that the issue was with my approach and not necessarily the lack of…
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
Meta's business suite lets a page owner upload a "Reel" to their page. When uploading a video, the interface offers two editing options: Crop and Trim. The crop action is implemented as a GraphQL request that references a video by its videoID and passes an aspect ratio for cropping.
The researcher's target was the IDOR class of bugs on Facebook endpoints, with a specific focus on actions that could delete photos or videos, or disclose sensitive information.
Setup
The reproduction uses three accounts:
- UserAttacker: the account that sends the malicious request.
- PageAttacker: a page controlled by the attacker.
- UserVictim: the account that owns the target video.
Tooling mentioned in the report is Burp Suite, used to inspect and manipulate the crop and trim requests, and a Facebook Android app access token for UserAttacker, obtained so it can be used in the GraphQL request.
Finding it
The researcher spent about two weeks without success before changing approach: testing every endpoint, not underestimating any of them, and staying focused on critical bugs. The crop and trim feature in the Meta business suite stood out because it acts on a video identified by an ID supplied in the request.
The first idea was to abuse trimming: if a victim uploaded a 10 minute video, trimming it from the start to the 1 second mark would make it appear as though the video had been deleted because of its shortened length.

The trim attempt did not work. The second idea was cropping: cropping another user's video down to 1x1 pixel would make it appear deleted or distorted. The report includes an image explaining the aspect ratio of the cropping option.

That attempt also failed. After hours on the feature the researcher moved on. The next day, while looking for a new feature to test in the business suite, the crop and trim actions were given a second try on the theory that daily updates might have changed the behaviour. Back in Burp Suite, the requests were manipulated again, this time trying to delete videos belonging to the researcher's own test account. One test account video, 54 minutes long, disappeared.
Looking back at the Burp history, the focus went to the crop and trim request. Manipulating the crop parameters again and sending a request against a video uploaded to the test account deleted it. The deletion took about 5 minutes to complete, which is why the vulnerability had not been noticed the previous day. That delay pointed at the crop parameters as the cause.

Exploitation
Step 1: upload a victim video
From UserVictim, upload any video to the Facebook profile. This video is the target of the attack.
Step 2: obtain an access token
From UserAttacker, get a Facebook Android app access token to use in the next step.
Step 3: send the manipulated GraphQL request
Perform the GraphQL POST request below using the UserAttacker access token, and change videoID to the ID of the video from step 1:
{
"variables": {
"videoClipsTimestamps": {
"start_time_in_sec": 0.706,
"end_time_in_sec": 7.721354166666667
},
"videoID": "VIDEO_ID_HERE",
"reframeAspectRatios": [
{
"aspect_ratio_denominator": 11,
"aspect_ratio_numerator": 1
}
],
"aggressiveness": 0
},
"doc_id": "8426940007331645"
}
The important parts are:
videoID: the identifier of the victim's video. The request accepts any video ID, not only videos owned by the caller.reframeAspectRatios: the aspect ratio used for reframing, expressed asaspect_ratio_denominatorandaspect_ratio_numerator. These are the parameters that get manipulated to unexpected values.videoClipsTimestamps: the start and end of the clip window, in seconds.doc_id: identifies the GraphQL operation.

Step 4: wait
Wait for 5 minutes. The video is then deleted. The report notes the deletion is not instant, which is why the vulnerability had not been noticed the previous day.
Root cause
The request accepted any video ID, not only videos owned by the caller. On top of that, when the aspect ratio parameters (aspect_ratio_denominator and aspect_ratio_numerator) were manipulated to unexpected values, the library responsible for reframing the videos reframed the submitted video ID and returned a broken video that was no longer loadable or accessible on the user's profile. In other words, the destructive effect came from the reframing pipeline being fed unexpected aspect ratio values, combined with the request accepting any video ID.
Impact
The researcher was able to delete any video, live video and reel uploaded on Facebook. As an illustration, the report notes that videos belonging to Leo Messi with millions of views after the World Cup could potentially have been deleted. The report stresses that exploiting a bug on a real user's account is never acceptable and that ethical hackers should always use a test account.

Fix
The report does not describe the code change. The timeline records that the bug was fixed on November 30, 2022, and that the issue was actually fixed the day after the report was sent, with the confirmation message arriving on that later date.
Timeline
| Date | Event |
|---|---|
| October 24, 2022 | Report sent |
| October 25, 2022 | Triaged |
| November 30, 2022 | Bug fixed (fixed the day after the report; confirmation message sent on this date) |
| December 13, 2022 | Bounty rewarded: 11,250 USD (10,000 USD + 750 USD Hacker Plus program bonus + 500 USD bonus for delay) |


Variants to test
- Other media editing operations. Look for GraphQL mutations that take a media ID plus transformation parameters (crop, trim, reframe, rotate, filter). A positive result is that a request sent with your token against another account's media ID changes or breaks that media.
- Aspect ratio and dimension fields. Send extreme or zero values in numerator and denominator fields, and in width and height fields. A positive result is a media object that no longer loads on the owner's profile.
- Time window fields. Send start and end timestamps outside the media's duration, or inverted ranges. A positive result is truncation or corruption of another user's media.
- Delayed effects. After sending a candidate request, wait several minutes before concluding it failed, since the processing pipeline may complete asynchronously.
- Token scope differences. Repeat the same request with tokens from different clients (for example the Android app token used here) to see whether authorisation checks differ between them. A positive result is a request that succeeds with one client token and is rejected with another.
What happened, in plain words
A security researcher was hunting for bugs in Facebook's bug bounty programme. A bug bounty programme is a deal where a company pays people to find security problems in its products and report them privately instead of abusing them. After about two weeks without finding anything, he changed his approach: he decided to test every part of Facebook he could reach, and to focus on one specific class of bug, called IDOR.
IDOR stands for Insecure Direct Object Reference. In everyday terms: imagine a hotel where every room key is just the room number written on a card. If the reception only checks that you have a card, and not that the card matches your room, you can write "214" on your own card and open someone else's door. In software, the "room number" is an identifier such as a video ID, and the bug is that the server accepts an identifier belonging to someone else without checking that you own it.
The researcher was specifically looking for IDORs that would let him delete other people's photos or videos, or read sensitive information. He found one in the Meta business suite, a web tool where page owners manage their Facebook pages. That tool lets you upload a "Reel" (a short vertical video) to a page, and while uploading you can Crop (cut the frame to a different shape) and Trim (cut the video to a shorter time range).
By sending a crafted request that named a video and gave strange cropping values, he could make Facebook's own video-processing system break that video so badly that it became unloadable, which in practice deleted it from the owner's profile. He reported it, Facebook fixed it, and he was paid 11,250 USD.

Background you need first
A few ideas come up again and again below, so here they are from zero.
Endpoint. A URL on a server that does a particular job, like a counter in a shop. "Every endpoint" means every such URL the researcher could find.
API. An API (Application Programming Interface) is the set of doors a program uses to talk to a server, as opposed to the doors a human clicks in a browser. When you upload a video in a web page, the page itself is just the shop front; behind it, the browser sends requests to the API.
GraphQL. A way for a client to ask a server for exactly the data or action it wants, by sending a structured description rather than a fixed URL. A GraphQL request typically names an operation (here via a doc_id) and passes variables, which are the inputs for that operation. Think of it as a form with named fields: the server reads the field names and values and acts on them.
POST request. An HTTP request that sends data to the server, usually to create or change something. The GraphQL requests in this story are POST requests carrying a JSON body.
JSON. A text format for structured data, made of names and values in curly braces. It is what the request bodies below are written in.
Access token. A long string that proves who you are, a bit like a wristband at a festival: you show it with each request instead of typing your password again. Here the researcher used a token from the Facebook Android app, obtained for his own attacker account, so that his requests would be accepted as that account.
Burp Suite. A tool that sits between your browser and a website and lets you see and edit every request before it is sent. It is how the researcher inspected the crop and trim requests and changed their values.
Aspect ratio. The proportion between a video's width and its height, written as two numbers, for example 16:9. In the request below it appears as a numerator (top number) and a denominator (bottom number).
Asynchronous processing. Some jobs on a server do not finish instantly. You send a request, the server queues the work, and the result appears minutes later. This matters a lot here, because the deletion took about five minutes.
Setting the goal
The researcher's first problem was not technical. After roughly two weeks of failed attempts he concluded that his method was the problem, not the absence of bugs. He decided to test every endpoint he could find, to treat none of them as too boring to check, and to stay focused on critical bugs: deleting photos or videos, or exposing sensitive information. That focus is what led him to the crop and trim feature.
The full story
While exploring the Meta business suite he found that he could upload a Reel to his page, and that the upload screen offered Crop and Trim.

His first idea was to abuse trimming. If a victim had uploaded a ten-minute video, he would try to trim it from the start down to the one-second mark. The video would still exist, but it would look as though it had been deleted, because almost all of its content would be gone.

That attempt failed. He then turned to cropping. If he could crop another person's video down to a single pixel, the video would look deleted or badly distorted. The report includes an image explaining the aspect ratio used by the cropping option.

That failed too. After hours on the feature he moved on to something else. The next day he came back to it on a hunch: Facebook ships changes daily, so a feature that was safe yesterday might be vulnerable today. He reopened Burp Suite and started manipulating the crop and trim requests again, this time aiming at videos on his own test account. One video on that test account, 54 minutes long, simply disappeared.
He went back through his Burp history and looked again at the crop and trim request. He manipulated the crop parameters once more and sent a request against a video he had uploaded to the test account. It was deleted. The deletion took about five minutes to complete, which explained why he had not noticed the vulnerability the previous day. That delay pointed at the crop parameters as the cause.

He wrote the report straight away, expecting a 10,000 USD reward for the ability to delete any video on the platform.

Impact
He could delete any video, live video and reel uploaded to Facebook. As an illustration, the report notes that he could potentially have deleted videos belonging to Leo Messi that had millions of views after the World Cup.
The report is emphatic that exploiting a bug against a real user's account is never acceptable, and that ethical hackers should always use a test account. The point is that the skill is the same whether you use it to help or to harm, and the responsibility is to use it to help.

Reproduction steps
The setup uses three accounts:
- UserAttacker: the account that sends the malicious request.
- PageAttacker: a page controlled by the attacker.
- UserVictim: the account that owns the target video.
Step 1: upload a victim video
From UserVictim, upload any video to the Facebook profile. This is the video the attack will target.
Step 2: get an access token
From UserAttacker, obtain a Facebook Android app access token, to be used in the next step. The token is what makes the server treat the request as coming from UserAttacker.
Step 3: send the manipulated GraphQL request
Send the GraphQL POST request below using the UserAttacker access token, and change videoID to the ID of the video from step 1:
{
"variables": {
"videoClipsTimestamps": {
"start_time_in_sec": 0.706,
"end_time_in_sec": 7.721354166666667
},
"videoID": "VIDEO_ID_HERE",
"reframeAspectRatios": [
{
"aspect_ratio_denominator": 11,
"aspect_ratio_numerator": 1
}
],
"aggressiveness": 0
},
"doc_id": "8426940007331645"
}
Line by line, in plain words:
- The outer
{ ... }is the JSON body of the request, the form the server reads. "variables"holds the inputs for the operation. Everything the server needs to act is inside it."videoClipsTimestamps"describes the time window of the clip: which part of the video to keep."start_time_in_sec": 0.706is where the clip starts, in seconds from the beginning of the video."end_time_in_sec": 7.721354166666667is where the clip ends, also in seconds. Together these two numbers say "keep the piece between 0.7 and 7.7 seconds"."videoID": "VIDEO_ID_HERE"is the identifier of the video to act on. This is the field that should have been checked against the caller's ownership, and was not: any video ID was accepted, not only videos belonging to the caller. In the attack, this is replaced with the victim's video ID."reframeAspectRatios"is a list (the square brackets) of aspect ratios to use when reframing the video. A list is used because an operation can carry more than one ratio."aspect_ratio_denominator": 11and"aspect_ratio_numerator": 1are the two numbers that make up the ratio, here 1 over 11. These are the values that get pushed to unexpected extremes, and they are what breaks the video."aggressiveness": 0is another input to the reframing operation, set to zero here."doc_id": "8426940007331645"identifies which GraphQL operation on the server this request is for. Think of it as the form number: the server looks up the form by this number and fills in the variables.

Step 4: wait
Wait five minutes. The video is then deleted. The deletion is not instant, which is exactly why the first day's tests had seemed to fail.
Why it worked
Two things had to be true at once.
First, the request accepted any video ID, not only videos belonging to the caller. That is the IDOR: the server trusted the identifier in the request without asking whether the caller was allowed to use it.
Second, when the aspect ratio numbers (aspect_ratio_denominator and aspect_ratio_numerator) were set to unexpected values, the library responsible for reframing videos took the submitted video ID and reframed it into a broken video that could no longer be loaded or accessed on the owner's profile. The destructive effect came from the reframing pipeline being fed unexpected aspect ratio values, combined with the request accepting any video ID.
The fix
The report does not describe the code change. The timeline records that the bug was fixed on November 30, 2022, and that it was actually fixed the day after the report was sent, with the confirmation message arriving on that later date.
Timeline
| Date | Event |
|---|---|
| October 24, 2022 | Report sent |
| October 25, 2022 | Triaged |
| November 30, 2022 | Bug fixed (fixed the day after the report; confirmation message sent on this date) |
| December 13, 2022 | Bounty rewarded: 11,250 USD (10,000 USD + 750 USD Hacker Plus program bonus + 500 USD bonus for delay) |


Variants to test
If you want to look for similar bugs yourself, these are some directions to try.
- Other media editing operations. Look for GraphQL operations that take a media ID plus transformation parameters (crop, trim, reframe, rotate, filter). A positive result is that a request sent with your token against another account's media ID changes or breaks that media.
- Aspect ratio and dimension fields. Send extreme or zero values in numerator and denominator fields, and in width and height fields. A positive result is a media object that no longer loads on the owner's profile.
- Time window fields. Send start and end timestamps outside the media's duration, or inverted ranges. A positive result is truncation or corruption of another user's media.
- Delayed effects. After sending a candidate request, wait several minutes before concluding it failed, since the processing pipeline may complete asynchronously.
- Token scope differences. Repeat the same request with tokens from different clients (for example the Android app token used here) to see whether authorisation checks differ between them. A positive result is a request that succeeds with one client token and is rejected with another.
Glossary
- API: the set of doors a program uses to talk to a server, as opposed to the pages a person clicks.
- Access token: a string that proves which account a request comes from, shown with each request instead of a password.
- Aspect ratio: the proportion between width and height, written as two numbers such as 1 over 11.
- Asynchronous processing: work a server queues and finishes later, so the result appears minutes after the request.
- Bug bounty programme: a scheme where a company pays people to find and privately report security problems.
- Burp Suite: a tool that sits between browser and website so you can see and edit requests.
- Crop: cutting a video's frame to a different shape or size.
- Endpoint: a URL on a server that performs a particular job.
- GraphQL: a way for a client to send a structured request naming an operation and its inputs.
- IDOR (Insecure Direct Object Reference): a bug where the server accepts an identifier belonging to someone else without checking that you own it.
- JSON: a text format for structured data made of names and values.
- Meta business suite: a web tool where page owners manage their Facebook pages.
- Reel: a short vertical video on Facebook.
- Reframing: re-rendering a video to a different frame shape or size.
- Token: see access token.
- Triaged: reviewed by the programme and confirmed as a real, valid report.
- Trim: cutting a video down to a shorter time range.