Play a game, get Subscribed to my channel - YouTube Clickjacking Bug \| #GoogleVRP
The embedded YouTube player allowed a user to subscribe or unsubscribe from a channel by hovering over the channel image and clicking, without visiting the channel page to confirm. An attacker could frame the player and overlay a fake game to trick a victim into subscribing or unsubscribing.
Published on sriram-offcl.medium.com
Well, it was a amazing Sunday ( We are a Startup ). I reached my office approximately at 10:30AM and had my colleague with me in office.
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
This is a Google Vulnerability Reward Program (VRP) report about the YouTube embed player. YouTube lets a creator embed a video on any site with a small HTML snippet that renders the player inside an iframe. Before playback, the embedded player shows the channel image, and hovering over that image exposes Subscribe and Unsubscribe controls directly in the player, without sending the viewer to the channel page to confirm.
The researcher, Sriram Kesavan (@sriramoffcl), turned that behaviour into a clickjacking proof of concept: a page that tricks a victim into subscribing to (or unsubscribing from) a channel, and also into adding a video to the victim's Watch Later list.
Setup
The report describes no special accounts, roles, tooling or versions. The researcher was reviewing previously reported bugs in Google VRP while listening to a song on YouTube, and built the proof of concept in Sublime Text. The only precondition is that a victim visits an attacker-controlled page that embeds a YouTube video in an iframe.
Finding it
While listening to a song, the researcher noticed the Share function, which he had not used before.

The Share menu offers options such as "Share to Facebook", "Share to Twitter" and "Share to Email". The Embed option caught his attention.

The Embed option lets a user embed a YouTube video in their own site in an iframe with a small HTML snippet.

He copied the embed code into his own site and refreshed the page. The video was embedded. Before playing it, he noticed the player showed the channel image, and hovering the mouse over that image let a user directly Subscribe or Unsubscribe to the channel, without going to the main channel page to confirm the subscription.

That raised the question of whether it could be turned into a clickjacking attack that tricks a victim into subscribing or unsubscribing to a channel.

Exploitation
Step 1: Build a convincing page around the embed
He opened Sublime Text and wrote a small HTML page designed to be convincing enough that a victim would interact with it. Within about five minutes he had a proof of concept.

The page presents a simple game (the researcher notes it is not really a game). The victim has to hover the mouse over the red colour, follow the path, and click when it turns green. The victim follows the path and clicks when it turns green. He acknowledges the script is not polished, but it was built in five to ten minutes.
Step 2: The same trick against Watch Later
The embedded player also has a function to add a video to Watch Later. By creating another fake button, an attacker can add a video to the victim's Watch Later list in the same way.
Step 3: Report and triage
Before reporting, he expected one of the usual outcomes: Duplicate, Intended Behaviour, Won't Fix and more. He also wondered why other top researchers had not spotted something that was, in his words, literally there.

He reported the issue to Google VRP. Two days later he received a reply:
At first glace, this might not severe enough to qualify for a reward
The report was still accepted and the panel was to take a look.


After around two weeks he received another mail.

The panel decided to reward him $100. He had not expected any reward at all.
Step 4: Asking for the reasoning
He asked the GVRP team for an explanation. The team replied that the reward was issued based on the impact, and that they found unusual user interaction in this scenario, which he agrees with. They added that if he could decrease the user interaction, they would reconsider the issue.
On 2 February 2021 he started working on reducing the interaction. After almost two months he gave up, but remained happy with the panel decision.

Root cause
The embedded YouTube player renders the channel image with Subscribe and Unsubscribe controls that act on a single hover and click, without a confirmation step on the channel page. Because the player is designed to be framed on third-party sites, an attacker can place it under their own page elements and capture clicks meant for a fake interface. The report does not describe any frame-busting or clickjacking defence on the embed, and the panel's comment about "unusual user interaction" suggests the interaction pattern itself was the limiting factor rather than a missing technical control.
Impact
An attacker who convinces a victim to visit a crafted page can make the victim subscribe to or unsubscribe from a channel, and can add a video to the victim's Watch Later list, through clicks the victim believes are part of a game or other interface. The attack requires the victim to hover and click in the right place, and the panel described the user interaction as unusual. The panel rewarded the report at $100. The report does not describe any other actions reachable through the same technique.
Fix
The GVRP reply indicates that reducing the required user interaction would be the condition for reconsidering the issue.
Variants to test
- Other embedded widgets that expose state-changing controls on hover or single click, such as follow, like or save buttons in third-party embeds. A positive result is a click on an attacker page element that changes state in the victim's account.
- Other actions in the YouTube embed beyond Subscribe, Unsubscribe and Watch Later. A positive result is any further account change reachable without leaving the iframe.
- Interaction-reduction ideas, since the panel said it would reconsider a version with less user interaction. A positive result is a working proof of concept that needs fewer hover and click steps than the original game.
What happened, in plain words
YouTube lets anyone put a video on their own website. You copy a small piece of code from YouTube and paste it into your page, and the video appears there, playable, inside a little window. That window is called an iframe: a page inside another page, like a picture frame hanging on a wall. The video inside the frame is still served by YouTube, not by the site you are visiting.
Before you press play, the embedded player shows the channel's picture. If you move your mouse over that picture, small Subscribe and Unsubscribe buttons appear right there in the player. You can subscribe to a channel without ever visiting the channel's page to confirm.
Sriram Kesavan (@sriramoffcl) noticed this and asked a simple question: could someone build a page that makes a visitor click those buttons without realising it? He built a small fake game and showed that a click meant for the game could reach the embedded player. The same trick worked for adding a video to the visitor's Watch Later list.
He reported it to Google's bug bounty programme, the Google Vulnerability Reward Program (VRP), which pays people for finding security problems in Google products. Google accepted the report and paid $100. This article walks through what he did, step by step, and explains every term along the way.
Background: the pieces involved
Before the story, a few ideas that come up again and again.
- Bug bounty programme: a scheme where a company invites outside people to look for security problems and pays them for good reports. Google's is the VRP.
- Clickjacking: a trick where an attacker hides a real button under something the visitor wants to click. The visitor thinks they are clicking a game, a prize or a video, but the click actually lands on the hidden button. Imagine a shop where someone tapes a "Win a prize" sticker over the real "Pay here" button on a card machine. You press what you think is the sticker, and you pay.
- iframe: a way to show one web page inside another. The outer page controls where the frame sits and how big it is. The inner page is loaded from its own address, so it can be a YouTube player on a blog that has nothing to do with YouTube.
- Embed: the feature that produces the iframe code. YouTube gives you a snippet of HTML, you paste it into your site, and the video shows up there.
- HTML: the language web pages are written in. Tags like
<iframe>tell the browser what to display. - Hover: resting the mouse pointer over something without clicking. Many interfaces show extra controls only while you hover.
- Watch Later: a personal YouTube list where you save videos to watch another time. It belongs to your account, so changing it is a change to your account.
Setting the scene
The report opens with a note that the author is not going to publish some of his best bugs. That is a normal thing for researchers to say: some findings stay private, either because the company asked, or because publishing them would put users at risk.
He describes a Sunday at his startup. He reached the office around 10:30 in the morning. A colleague who had travelled through the night was asleep in the office. The researcher was going through bugs he had already reported to Google VRP, with a song playing on YouTube in the background.
That ordinary moment is where the finding starts. He noticed the Share function on YouTube, something he had never used before.

The Share menu offers options such as "Share to Facebook", "Share to Twitter" and "Share to Email". One of the options caught his attention: Embed.

The Embed option lets a user put a YouTube video on their own site inside an iframe, using a small piece of HTML.

Why does this matter for security? Because the embed is designed to live on other people's websites. YouTube has to allow its player to sit inside a frame on a page it does not control. That is exactly the situation clickjacking needs: an attacker's page wrapping a real, trusted interface.
Finding the behaviour
He copied the embed code and pasted it into his own site. He refreshed the page and the video appeared, embedded in his site.
Before playing the video, he noticed the player showed the channel image. Hovering the mouse over that image let a user Subscribe or Unsubscribe to the channel directly, without being sent to the main channel page to confirm the subscription.

Think about what that means. Here, the button appears on hover inside a frame that any website can place anywhere on its page, without sending the user to the channel page to confirm.
That led to the question at the heart of the report: could this be turned into a clickjacking attack that tricks a victim into subscribing or unsubscribing to a channel?

Building the proof of concept
A proof of concept (PoC) is a small demonstration that shows a security problem is real, without doing harm. It is the difference between saying "this could probably be abused" and showing a working example.
He opened Sublime Text, a text editor for writing code, and started building a small HTML page designed to be convincing enough that a visitor would interact with it. Within about five minutes he had a working PoC.

What the fake page did
The page presents a simple game, though the researcher notes it is not really a game. The visitor has to hover the mouse over the red colour, follow the path, and click when it turns green. The click lands on the embedded player's Subscribe control underneath. He admits the script is not polished, but it was built in five to ten minutes.
Why a game? Because a game gives the visitor a reason to move the mouse and click in a specific place. The attacker does not need to know anything about the victim. They only need the victim to follow simple instructions on a page that looks harmless. The YouTube player sits underneath and receives the click.
The same trick against Watch Later
The embedded player also has a function to add a video to Watch Later. By creating another fake button, an attacker can add a video to the victim's Watch Later list in the same way.
This is the same pattern: a real control inside the frame, a fake control on top, and a click that the victim believes belongs to the fake one. The only difference is which account setting changes.
Reporting it and what Google said
Before reporting, he expected one of the usual outcomes: Duplicate (someone already reported it), Intended Behaviour (the company says it works as designed), Won't Fix, and more. He also wondered why other top researchers had not spotted something that was, in his words, literally there.

He reported the issue to Google VRP. Two days later he received a reply:
At first glace, this might not severe enough to qualify for a reward
Line by line, this is a short triage message. "At first glace" is a typo for "at first glance". The team is saying that, on a quick look, the issue may not be serious enough to earn money. That is not a rejection: the report was still accepted, and a panel would take a look.


After around two weeks he received another mail.

The panel decided to reward him $100. He had not expected any reward at all.
Asking why
He asked the GVRP team for an explanation. The team replied that the reward was issued based on the impact, and that they found unusual user interaction in this scenario, which he agrees with. They added that if he could decrease the user interaction, they would reconsider the issue.
What does "unusual user interaction" mean here? The attack only works if the victim hovers over the right spot and clicks at the right moment. That is a lot to ask of a victim, and it makes the attack less reliable in the real world. The team was saying the technique works, but the amount of trickery needed limits how serious it is.
On 2 February 2021 he started working on reducing the interaction. After almost two months he gave up, but remained happy with the panel decision.

Why it worked
The embedded YouTube player shows the channel image with Subscribe and Unsubscribe controls that act on a single hover and click, with no confirmation step on the channel page. Because the player is designed to be framed on third-party sites, an attacker can place it under their own page elements and capture clicks meant for a fake interface.
The report does not describe any frame-busting or clickjacking defence on the embed. Frame-busting is code that stops a page from being loaded inside an iframe, usually by detecting the frame and breaking out of it. Without something like that, or a confirmation step, the player can be positioned and covered freely.
The panel's comment about unusual user interaction suggests the limiting factor was the interaction pattern itself, not a missing technical control.
What an attacker could do
Someone who convinces a victim to visit a crafted page can make the victim subscribe to or unsubscribe from a channel, and can add a video to the victim's Watch Later list, through clicks the victim believes are part of a game or other interface.
The attack requires the victim to hover and click in the right place, and the panel described the user interaction as unusual. The panel rewarded the report at $100. The report does not describe any other actions reachable through the same technique.
What the fix would look like
The GVRP reply indicates that reducing the required user interaction would be the condition for reconsidering the issue.
Other places to look
- Other embedded widgets that expose state-changing controls on hover or single click, such as follow, like or save buttons in third-party embeds. A positive result is a click on an attacker page element that changes state in the victim's account.
- Other actions in the YouTube embed beyond Subscribe, Unsubscribe and Watch Later. A positive result is any further account change reachable without leaving the iframe.
- Interaction-reduction ideas, since the panel said it would reconsider a version with less user interaction. A positive result is a working proof of concept that needs fewer hover and click steps than the original game.
Glossary
- Bug bounty programme: a scheme where a company pays outside researchers for reporting security problems.
- Clickjacking: hiding a real button under a fake one so a visitor's click lands on the real one.
- Embed: a feature that lets a video or other content appear inside another website.
- Frame-busting: code that prevents a page from being loaded inside an iframe.
- Google VRP: Google's Vulnerability Reward Program, the bug bounty programme for Google products.
- Hover: resting the mouse pointer over an element without clicking.
- HTML: the language used to write web pages.
- iframe: a window inside a web page that loads another page from a different address.
- Impact: how much harm a security problem could cause in the real world.
- Intended Behaviour: a triage outcome meaning the company considers the behaviour to be by design.
- Proof of concept (PoC): a small working demonstration that a security problem is real.
- Sublime Text: a text editor used for writing code.
- Triage: the first review of a report, where the team decides whether it is valid and how serious it is.
- Watch Later: a personal YouTube list where a user saves videos to watch another time.
- Won't Fix: a triage outcome meaning the company has decided not to change the behaviour.