Discourse · Report #197443
XSS in topics because of bandcamp preview engine vulnerability
Validstatus
highseverity
15upvotes
20 Jan 2017disclosed
How it was found
- Load http://try.discourse.org
- Click "New topic"
- Enter this payload https://89.223.28.48/bandcamp.com/album/index.html?XSSa2 to field with placeholder "Type title or paste a link here"
- Wait for the preview engine to parse the link
- XSS will fire
{F151439}
You should sanitize external data in this engine and replace matches_regexp from
^https?:\/\/.*bandcamp\.com\/album\/
to
^https?:\/\/.*\.bandcamp\.com\/album\/
to fix the issue.