Hacking YouTube for #fun and #profit
The YouTube Studio bulk update feature did not verify that the videos being updated belonged to the requesting user, allowing an attacker to change settings on any video. Separately, the playlist listing endpoint did not check that the supplied channel ID belonged to the user, letting an attacker view any user's unlisted playlists.
Published on linkedin.com
While I was cleaning up some folders from my Desktop today, I accidentally found one of them called "PoCs", full of text files and images. They were from my previous reported security bugs, 99% of them for the Google Vulnerability Reward Program.
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
YouTube Studio (https://studio.youtube.com/) is the dashboard Google provides to content creators. It lets them edit and publish videos, view analytics, change community and channel settings, and update many videos at once through a feature called Update In Bulk. This article covers two vulnerabilities I found in that Studio platform, both reported through the Google Vulnerability Reward Program.

Setup
The work was done against the YouTube Studio web application. The two features involved are the Videos tab, where a creator selects videos and applies bulk changes, and the video edit page, which loads the creator's playlists.
Finding it
Bug #1: bulk update without ownership checks
On the Studio homepage, the left menu has a Videos tab. Clicking it opens a page listing all of your videos.
Selecting videos brings up a toolbar in the application context. From there you choose which parts of the videos to change (title, description, tags, visibility, comments and so on), and an update button appears.
Clicking that blue Update button triggers a POST request to the YouTube servers at https://studio.youtube.com/youtubei/v1/creator/enqueue_creator_bulk_action, with a JSON body. The body carries various attributes and configuration parameters, but one stood out: a parameter called videos, represented by a videoIds object holding an array with the ids of the videos selected for update.
After experimenting with it, I found there was no protection or access-right check verifying that the videos behind those id values were really owned by the user who initiated the update. Any video's settings could be changed just by putting its video ID in that array.
Bug #2: playlists of any channel
When a user opens the Studio dashboard and clicks a video to edit it, they are redirected to a new page.
Once that page opens, a POST request goes out in the background to https://studio.youtube.com/youtubei/v1/creator/list_creator_playlists. As the name suggests, it retrieves the playlists of the current logged-in user, and its role is to populate the Playlists section of the video edit page.
The body is JSON and contains an attribute called channelId, the value of the channel being edited. After several tests I found that the backend did not verify whether the value supplied for channelId was actually the caller's own channel ID.
The response contained all the playlists associated with that channelId, with one condition: the channel had to have only PUBLIC and UNLISTED playlists.
When that condition was met, an attacker could retrieve any unlisted playlist of any YouTube user. This is more of a privacy bug, since an unlisted playlist, like an unlisted video, cannot be found on the platform until the owner shares it.
Exploitation
Step 1: capture the bulk update request
As a creator, select videos in the Videos tab, choose the fields to change, and click Update. The application sends:
The JSON body contains the videos parameter, whose videoIds object holds the array of selected video IDs. That array holds the ids of the videos selected for update.
Step 2: substitute a foreign video ID
Replace the IDs in the videoIds array with the ID of a video you do not own, keeping the rest of the body as the application built it, and send the request. The server has no check confirming that the videos belong to the authenticated user. The chosen settings (title, description, tags, visibility, comments and so on) are applied to the target video.
Step 3: capture the playlist request
Open a video for editing in Studio. The page issues:
with a JSON body containing channelId, set to the channel currently being edited.
Step 4: change channelId
Replace the channelId value with another user's channel ID and send the request. The backend does not check that the value matches the authenticated user's channel. The response lists all playlists for that channel, provided the channel has only PUBLIC and UNLISTED playlists. Unlisted playlists that the owner never shared are exposed this way.
Root cause
Both bugs are the same class of mistake: the server trusts an identifier supplied by the client without checking that the authenticated user is authorised to act on the object behind it. In the bulk action endpoint, the videoIds array is taken at face value, so any video ID can be updated. In the playlist endpoint, channelId is taken at face value, so any channel's playlists can be listed. The application's own UI only ever sends the caller's own IDs; per-object authorisation on the server was absent.
Impact
For Bug #1, the impact was significant. Setting a channel's videos to private could shut down any YouTube channel: regular viewers would no longer find those videos and many views would be lost. Someone promoting a site or product could change the title and the video of some of the most popular YouTube videos, such as Despacito or Shape of you by Ed Sheeran. Someone after pocket money could add a "Donation" PayPal account to the description of high-ranked videos, as many YouTubers do.
For Bug #2, the impact is a privacy leak: unlisted playlists of any YouTube user could be read, but only for channels that have solely PUBLIC and UNLISTED playlists.
Timelines as reported:
| Bug #1 | Date |
|---|---|
| Reported | 11.11.2018 |
| Triaged, "Nice catch" | 12.11.2018 |
| Rewarded | 13.11.2018 |
| Fixed | 13.12.2018 |
| Bug #2 | Date |
|---|---|
| Reported | 12.11.2018 |
| Triaged | 13.11.2018 |
| "Nice catch" | 14.11.2018 |
| Rewarded | 30.11.2018 |
| Fixed | 12.12.2018 |
Fix
Both bugs were fixed by Google, on 13.12.2018 for Bug #1 and 12.12.2018 for Bug #2. The report does not describe the code change; the fix that addresses the root cause is server-side authorisation on both endpoints, confirming that every ID in videoIds and the supplied channelId belong to the authenticated user.
Variants to test
- Bulk or batch endpoints that accept arrays of object IDs: substitute IDs of objects you do not own and check whether the change is applied. A positive result is a successful response and a visible change on the foreign object.
- Endpoints that take a channelId, userId or similar owner identifier in a JSON body: swap in another account's identifier. A positive result is a response containing that account's private or unlisted resources.
- Listing endpoints whose UI only ever sends your own ID: replay with a foreign ID and compare the response to what the UI would show. A positive result is data the UI never exposes for your account.
- Visibility-based conditions: test accounts with mixed public, unlisted and private content to see whether the server filters by visibility or leaks everything. A positive result is unlisted or private items appearing in the response.
What happened, in plain words
YouTube Studio is the control panel that Google gives to people who upload videos to YouTube. Instead of the normal YouTube site that viewers see, creators log in to a separate dashboard at https://studio.youtube.com/ where they can edit their videos, look at statistics, change channel settings, and update lots of videos in one go using a feature called Update In Bulk.
I found two security bugs in that dashboard and reported both through the Google Vulnerability Reward Program, a scheme where Google pays people for finding and reporting security problems in its products. This article walks through both bugs from the beginning, assuming you have never done anything like this before.

Before we start, a few ideas that come up again and again.
A web application is a program that runs on a company's server and that you use through your browser. When you click a button, your browser quietly sends a message to the server and shows you the answer. YouTube Studio is a web application.
An API (Application Programming Interface) is the set of addresses on a server that accept those messages. Think of a restaurant: the menu is the API, the kitchen is the server, and the waiter carries your order. You never walk into the kitchen yourself; you ask through the menu. In a web application, the browser is the waiter and the API is the list of things you are allowed to ask for.
A request is one message your browser sends to the server. It has a method (the verb, such as GET to fetch something or POST to send something), a URL (the address), sometimes a body (the data you are sending), and headers (extra information such as who you are). A response is the server's reply.
JSON is a way of writing data as text so that both sides understand it. It looks like a shopping list with labels: {"name": "value"}. Curly braces hold an object, square brackets hold a list (an array), and each entry has a name and a value.
An endpoint is one specific URL on the API, for example the address that handles bulk updates. When people say "the endpoint", they mean "that particular door into the server".
An ID is a unique label for a thing. Your video has a video ID, your channel has a channel ID. They are long strings of letters and numbers, and they are not secret: anyone who looks at a video's page can see its ID.
Authentication means proving who you are, usually by logging in. Authorisation means the server checking whether you, once identified, are allowed to do the thing you are asking for. These are different: a hotel knows you are a guest (authentication) but that does not mean you may open every room (authorisation).
An IDOR (Insecure Direct Object Reference) is the bug that happens when a server takes an ID from the user and acts on whatever object that ID points to, without checking that the user owns or may access that object. It is like a cloakroom that hands out coats based on the ticket number you say, without checking the ticket is yours. Both bugs in this article are this kind of mistake.
Finally, replaying a request means capturing a request your browser made and sending it again, possibly with small changes. You do not need special software to understand this article; the point is that the browser's own developer tools can show you the requests a page makes, and you can resend them with different values.
Setup
All the work was done against the YouTube Studio web application. Two features are involved: the Videos tab, where a creator selects videos and applies bulk changes, and the video edit page, which loads the creator's playlists.
Finding it
Bug #1: bulk update without ownership checks
On the Studio homepage, the left menu has a Videos tab. Clicking it opens a page listing all of your videos.
Selecting videos brings up a toolbar in the application. From there you choose which parts of the videos to change (title, description, tags, visibility, comments and so on), and an update button appears.
Clicking that blue Update button triggers a POST request to the YouTube servers at https://studio.youtube.com/youtubei/v1/creator/enqueue_creator_bulk_action, with a JSON body. The body carries various attributes and configuration parameters, but one stood out: a parameter called videos, represented by a videoIds object holding an array with the ids of the videos selected for update.
After experimenting with it, I found there was no protection or access-right check verifying that the videos behind those id values were really owned by the user who initiated the update. Any video's settings could be changed just by putting its video ID in that array.
Bug #2: playlists of any channel
When a user opens the Studio dashboard and clicks a video to edit it, they are redirected to a new page.
Once that page opens, a POST request goes out in the background to https://studio.youtube.com/youtubei/v1/creator/list_creator_playlists. As the name suggests, it retrieves the playlists of the current logged-in user, and its role is to populate the Playlists section of the video edit page.
The body is JSON and contains an attribute called channelId, the value of the channel being edited. After several tests I found that the backend did not verify whether the value supplied for channelId was actually the caller's own channel ID.
The response contained all the playlists associated with that channelId, with one condition: the channel had to have only PUBLIC and UNLISTED playlists.
When that condition was met, an attacker could retrieve any unlisted playlist of any YouTube user. This is more of a privacy bug, since an unlisted playlist, like an unlisted video, cannot be found on the platform until the owner shares it.
Exploitation
Step 1: capture the bulk update request
As a creator, select videos in the Videos tab, choose the fields to change, and click Update. The application sends:
Line by line: POST is the method, the verb that says "I am sending you data to act on". The URL is the endpoint that handles bulk actions on a creator's videos. enqueue means "put in a queue", so the name tells you the server queues the job of updating the selected videos. Nothing in this line says which videos; that comes in the body.
The JSON body contains the videos parameter, whose videoIds object holds the array of selected video IDs. That array holds the ids of the videos selected for update. In other words, the server learns which videos to touch purely from the list of IDs the browser sends, and it never asks "do these belong to you?".
Step 2: substitute a foreign video ID
Replace the IDs in the videoIds array with the ID of a video you do not own, keeping the rest of the body as the application built it, and send the request. The server has no check confirming that the videos belong to the authenticated user. The chosen settings (title, description, tags, visibility, comments and so on) are applied to the target video.
Why this works: the server trusts the list. It is like a form that says "which of your files should I delete?" and then deletes whatever names you write, even files that belong to someone else. The only thing that would stop it is a check on the server comparing each ID against the logged-in user's own videos, and that check was missing.
Step 3: capture the playlist request
Open a video for editing in Studio. The page issues:
Line by line: again POST, because the browser is sending data (the channel to look up) rather than just asking for a page. The URL is the endpoint that lists a creator's playlists. The name says exactly what it does: list the playlists of a creator. The page calls it in the background so that the Playlists section can be filled in without reloading the whole page.
with a JSON body containing channelId, set to the channel currently being edited.
Step 4: change channelId
Replace the channelId value with another user's channel ID and send the request. The backend does not check that the value matches the authenticated user's channel. The response lists all playlists for that channel, provided the channel has only PUBLIC and UNLISTED playlists. Unlisted playlists that the owner never shared are exposed this way.
Why this works: same pattern as before. The server takes the channel ID from the request and looks up that channel, without asking whether the person making the request is the owner. The condition about PUBLIC and UNLISTED playlists is a quirk of how the endpoint behaved.
Root cause
Both bugs are the same class of mistake: the server trusts an identifier supplied by the client without checking that the authenticated user is authorised to act on the object behind it. In the bulk action endpoint, the videoIds array is taken at face value, so any video ID can be updated. In the playlist endpoint, channelId is taken at face value, so any channel's playlists can be listed. The application's own interface only ever sends the caller's own IDs; per-object authorisation on the server was absent.
"Per-object authorisation" simply means: for every single object the request mentions, check that this user may act on it. Not "is this user logged in?" but "is this user allowed to touch this particular video or channel?".
Impact
For Bug #1, the impact was significant. Setting a channel's videos to private could shut down any YouTube channel: regular viewers would no longer find those videos and many views would be lost. Someone promoting a site or product could change the title and the video of some of the most popular YouTube videos, such as Despacito or Shape of you by Ed Sheeran. Someone after pocket money could add a "Donation" PayPal account to the description of high-ranked videos, as many YouTubers do.
For Bug #2, the impact is a privacy leak: unlisted playlists of any YouTube user could be read, but only for channels that have solely PUBLIC and UNLISTED playlists.
Timelines as reported:
| Bug #1 | Date |
|---|---|
| Reported | 11.11.2018 |
| Triaged, "Nice catch" | 12.11.2018 |
| Rewarded | 13.11.2018 |
| Fixed | 13.12.2018 |
| Bug #2 | Date |
|---|---|
| Reported | 12.11.2018 |
| Triaged | 13.11.2018 |
| "Nice catch" | 14.11.2018 |
| Rewarded | 30.11.2018 |
| Fixed | 12.12.2018 |
"Triaged" means the security team looked at the report, confirmed it was real, and started handling it.
Fix
Both bugs were fixed by Google, on 13.12.2018 for Bug #1 and 12.12.2018 for Bug #2. The report does not describe the code change; the fix that addresses the root cause is server-side authorisation on both endpoints, confirming that every ID in videoIds and the supplied channelId belong to the authenticated user.
Variants to test
If you want to look for the same kind of mistake yourself, here are patterns worth trying. In each case, the idea is to send an identifier that is not yours and see whether the server acts on it anyway.
- Bulk or batch endpoints that accept arrays of object IDs: substitute IDs of objects you do not own and check whether the change is applied. A positive result is a successful response and a visible change on the foreign object.
- Endpoints that take a channelId, userId or similar owner identifier in a JSON body: swap in another account's identifier. A positive result is a response containing that account's private or unlisted resources.
- Listing endpoints whose interface only ever sends your own ID: replay with a foreign ID and compare the response to what the interface would show. A positive result is data the interface never exposes for your account.
- Visibility-based conditions: test accounts with mixed public, unlisted and private content to see whether the server filters by visibility or leaks everything. A positive result is unlisted or private items appearing in the response.
Glossary
- API: the set of addresses on a server that a program or browser can send requests to, like a menu of what you can ask for.
- Array: a list of values in JSON, written inside square brackets.
- Authentication: proving who you are, usually by logging in.
- Authorisation: the server checking whether you, once identified, are allowed to do what you are asking.
- Backend: the part of the application that runs on the server, as opposed to what you see in the browser.
- Body: the data part of a request or response, as opposed to the address and headers.
- Channel ID: the unique identifier of a YouTube channel.
- Endpoint: one specific URL on an API that handles one kind of action.
- GET: a request method used to fetch something.
- Header: extra information attached to a request or response, such as the type of data being sent.
- ID: a unique label for an object, such as a video or a channel.
- IDOR (Insecure Direct Object Reference): a bug where the server acts on whatever object ID the user supplies, without checking that the user owns or may access that object.
- JSON: a text format for structured data, using curly braces for objects and square brackets for lists.
- Method: the verb of a request, such as GET or POST.
- Object: in JSON, a set of name and value pairs inside curly braces; in general, a thing stored on the server, such as a video.
- Per-object authorisation: checking, for each object a request mentions, that this user is allowed to act on it.
- POST: a request method used to send data to the server so it can act on it.
- Private: visible only to the owner.
- Public: visible to everyone.
- Replay: sending a captured request again, possibly with changed values.
- Request: one message from the browser to the server.
- Response: the server's reply to a request.
- Triaged: reviewed and confirmed by the security team as a real issue.
- Unlisted: not findable by searching or browsing, but reachable by anyone who has the link.
- URL: the address of a resource on the web.
- Video ID: the unique identifier of a YouTube video.
- Vulnerability Reward Program: a scheme where a company pays researchers for reporting security bugs in its products.
- Web application: a program that runs on a server and is used through a browser.