Skip to content
XSS Write-up Intermediate

Youtube - Stored XSS Strikes Back!

A stored cross-site scripting flaw existed in the YouTube API's track name parameter, where a direct payload was blocked but an edit request could be tampered to store malicious script. The stored script executed in Gmail, Google Docs/Presentation and Google Plus, and possibly on the main YouTube domain.

yappare Follow

Published on blog.yappare.com

The original lives on blog.yappare.com

We do not hold its text, 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 API validated the track name on the initial save but not on the edit request, allowing a tampered request to store script that was later rendered unsafely by Google's player.

Impact

An attacker could store script that executed when a victim played the affected video inside Gmail, Google Docs/Presentation or Google Plus, and possibly on the main YouTube domain, though the author notes the main-domain execution was not confirmed with a screenshot.

What the attacker needed

Ability to create or edit a video with a track; victim plays the video in an affected Google product

How it was found

  1. Try to set a track name with special characters directly and observe the error.
  2. Use the edit function to change the track name.
  3. Replay or tamper the edit request to set the track name to a script payload.
  4. Save the change so the payload is stored with the video.
  5. Play the video in Gmail, Google Docs/Presentation or Google Plus to trigger the script.

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.

Cross-site scripting (XSS) is when a website saves or shows text from a user in a way that lets that text run as code in someone else's browser. Here, a video's track name could be changed to contain such code, and when the video was played inside other Google products, the code ran. The site tried to block special characters, but an edit request could be altered to get around that check.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by yappare

View all

14 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.