Skip to content
CSRF Write-up Intermediate

CSRF in YouTube Leanback API

The YouTube Leanback API endpoint lacks CSRF protection, allowing a malicious website to send a POST request that plays a video or playlist on a victim's YouTube TV. By playing the victim's private playlists (such as uploads, liked videos, watch later) on an attacker-controlled fake TV, the attacker can obtain the video IDs and then retrieve the private videos' details.

David Schütz Follow

Published on feed.bugs.xdavidhu.me

All private/unlisted videos of a victim can be stolen if the victim visits a malicious link. Using the same technique, the victim’s liked videos, watch later and any private playlist’s content can be stolen.

David Schütz, on feed.bugs.xdavidhu.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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The Leanback API endpoint accepts POST requests without any CSRF token or origin validation, so any website can make a logged-in user's browser send commands to it.

Impact

An attacker could steal all of a victim's private and unlisted videos, as well as their liked videos, watch later, and private playlists, if the victim visits a malicious link.

What the attacker needed

Victim logged into YouTube; victim visits malicious page; attacker knows victim's channel ID

How it was found

  1. The attacker sets up a malicious webpage and a backend that acts as a fake YouTube TV.
  2. The victim visits the malicious webpage while logged into YouTube.
  3. The backend determines the playlist ID for the victim's uploads by modifying the channel ID.
  4. The frontend sends a CSRF request to play that playlist on the attacker's fake TV.
  5. The backend receives the play event containing all video IDs, including private ones.
  6. The backend queries the YouTube Data API to identify private/unlisted videos and then plays each private video to obtain its details via a special parameter.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you visit a website, your browser can automatically send requests to other sites you are logged into, like YouTube. This is called CSRF (Cross-Site Request Forgery). Here, YouTube's TV remote-control feature did not check that the request actually came from YouTube, so a malicious site could tell your TV to play your private videos, and the attacker could then learn their IDs and watch them.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by David Schütz

View all

6 more disclosed reports, best first.

More from Google

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.