Skip to content
UI spoofing Write-up Advanced

Using YouTube to steal your files

A path traversal in the video ID used by Google Slides' YouTube embed let the author navigate the embed iframe to other YouTube pages, and chaining open redirects on YouTube and accounts.youtube.com with a Docs file preview page allowed a clickjacking attack. An attacker could trick a victim into one click that shared a Drive file or folder with the attacker's e-mail address with editor permissions.

Lyra Rebane Follow

Published on lyra.horse

Bounty$4,134 View original

In my security research I often come across weird quirks and behaviours that aren’t particularly useful beyond a neat party trick. It’s always a good idea to keep track of them though, perhaps one day they’ll be just the missing piece you need.

Lyra Rebane, on lyra.horse

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

Likely the video ID was concatenated into the embed URL without validation, and the redirect endpoints on YouTube and accounts.youtube.com accepted arbitrary same-site destinations, letting a cross-origin iframe reach a same-origin Docs page that then honoured a query parameter to pre-fill a share dialog.

Impact

A victim who clicked the disguised button would grant the attacker editor access to the targeted Drive file or folder; the attack needed the victim to be logged in and to make that single click, and Docs' Sec-Fetch-Dest/Sec-Fetch-Site check initially blocked the chain until a same-origin redirect was added.

What the attacker needed

Victim logged into a Google account; victim clicks one disguised button; attacker knows the target file or folder ID

The fix

The report says Google triaged and rewarded the chain and was aware of and working on the topics, but does not state a specific fix.

How it was found

  1. Change the video ID in a Slides YouTube embed to a path traversal sequence so the iframe navigates to the YouTube sign-in endpoint.
  2. Use the sign-in endpoint's next parameter to redirect to the accounts.youtube.com SetSID endpoint.
  3. Use the continue parameter there to redirect to a Docs file preview URL carrying a userstoinvite parameter.
  4. Insert a legacy /a/a/ path segment so the redirect from accounts.youtube.com to docs.google.com is same-origin and passes the Sec-Fetch checks.
  5. Embed the resulting chain as the video ID in a slide and cover the share dialog with a fake form so the Send button is the only visible target.
  6. Send the presentation link so the victim's single click shares the file with the chosen e-mail address.

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.

A presentation tool let you embed a YouTube video, and the video identifier was placed into a web address without being checked, so the author could make the embedded frame visit other pages instead. By chaining redirects on YouTube's own sites, the frame ended up showing a Google Docs page that normally refuses to be shown inside other sites. The attacker then covered that page with a fake form so a single click on a button silently shared the victim's file with the attacker.

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 by Lyra Rebane

View all

1 more disclosed report, 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.

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.