XSS vulnerability in video player page
The video player page built an image element by concatenating the image_src URL parameter directly into HTML, so a crafted value could break out of the attribute and inject script. In browsers that do not enforce the Content Security Policy header, an attacker could run script in the page context when a victim opens the crafted link.
- Triaged in under an hour
- Fixed in 29 days
- Disclosed after 59 days
Hello,
I found a XSS vulnerability in your site. Try this:
In browsers which do not adequately support the Content Security Policy header, this will execute alert(1000).
According to this page not all browsers are supporting this yet: http://caniuse.com/contentsecuritypolicy, for instance my own Android phone seems to be vulnerable as I receive the alert when opening that URL.
It happens because of this in amplify-web-player.min.js:
this._$poster = $("<div class='poster-image-container'><img class='poster-image' src='" + h + "'><span class='glyphicon glyphicon-media-play' style='display:none'></span></div>"), this._$allControls = $("<div class='all-controls'></div>"), g.impression && g.impression(), e.container ? (this._$container = $(e.container), this._$container.addClass("amplify-container")) : (this._$container = $("<div id='container' class='amplify-container'></div>"), $("body").append(this._$container)), this.resize(e.width, e.height), this._$allControls.append(l), this._$allControls.append(f), this._$allControls.append(c), this._$allControls.show();
(The variable 'h' is loaded with the value of the image_src parameter in the URL).
I hope this was helpful to you.
Guido
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
The image_src parameter was concatenated unescaped into an HTML string used to build the poster image element.
Impact
Script could run in the player page for victims on browsers that do not enforce the CSP header; browsers with working CSP support would block it.
What the attacker needed
Victim opens a crafted link; browser lacks CSP support
The fix
The image_src value should be escaped or set via the DOM rather than concatenated into HTML.
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.
The page takes a value from the web address and pastes it straight into the HTML it builds for an image. By adding a quote and some extra text, an attacker can escape the image tag and add their own code, which the browser then runs. This is called cross-site scripting (XSS): running someone else's script inside a trusted site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.