Skip to content
XSS Disclosed report Intermediate

XSS vulnerability on Audio and Video parsers

The Audio and Video onebox parsers in Discourse's onebox library mishandled single quotes in user-supplied URLs, so a malicious user could inject an event handler and execute JavaScript.

alberto__segura Follow

Originally disclosed on HackerOne

Bounty$256 High View original
  • Triaged in 8 hours
  • Fixed in 19 hours
  • Paid in 22 days
  • Disclosed after 23 days

Just like in the XSS vulnerability on Image parser, there is the same vulnerability on Audio (https://github.com/discourse/onebox/blob/394409ca319cc1a1cd31fefa50c9468c990531a3/lib/onebox/engine/audio_onebox.rb) and Video (https://github.com/discourse/onebox/blob/394409ca319cc1a1cd31fefa50c9468c990531a3/lib/onebox/engine/video_onebox.rb) parsers.

A malicious user can include a "fake" audio or video URL with a ' character, allowing him to execute Javascript code.

Audio URL example: http://host/path'onerror=alert(1);//k.mp3 Video URL example: http://host/path'onerror=alert(1);//k.mp4

Ask me if you need more info to reproduce the vulnerability.

Best regards, Alberto

The original report as published on HackerOne, by alberto__segura. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Impact

A malicious user could execute JavaScript via a crafted audio or video URL, though the report does not demonstrate the full exploit.

What the attacker needed

Ability to post a link that gets oneboxed

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.

A onebox turns a pasted link into a preview card. The audio and video parsers mishandled a single quote in the link, so a crafted link could let a malicious user execute JavaScript.

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 alberto__segura

View all

1 more disclosed report, best first.

More from Discourse

View all

The newest disclosed reports for this program.

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.