Skip to content
UI spoofing Write-up Beginner

Vulnerability To Bypass Clickjacking Protection In Youtube

YouTube set an X-Frame-Options header to sameorigin to prevent framing, but the protection could be bypassed by supplying a Referer value pointing at a google.com URL. An attacker could then frame YouTube pages and trick a logged-in user into clicking hidden elements.

spidersec Follow

Published on spidersec.ninja

I found this vulnerability back in 2017, It was interesting as X-frame-options : response header was set to avoid clickjack but i was able to bypass and clickjack the youtube domain and its sub domains. Now let’s discuss the vulnerability in detail.

SPIDERSEC, on spidersec.ninja

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

Impact

An attacker could frame YouTube and its subdomains and use clickjacking to make a victim perform actions on the site, though the write-up does not demonstrate a concrete harmful action.

What the attacker needed

Victim visits attacker page; attacker can set Referer header

How it was found

  1. Create a basic clickjacking page containing an iframe pointing at YouTube.
  2. Turn on interception in the proxy tool.
  3. Open the local page in the browser.
  4. Change the Referer header on the request to a google.com URL.
  5. Observe that YouTube loads inside the iframe.

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.

Clickjacking is when a malicious page loads a real site invisibly on top of decoy buttons, so your clicks land on the real site without you realising. Sites defend against this by telling the browser not to allow their pages inside a frame. Here the defence could be sidestepped by making the request look like it came from a Google page.

What is UI spoofing?

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.

More from Google

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.