Stored XSS in [https://streamlabs.com/dashboard#/*goal] pages
sudi Follow with hackforgood
Originally disclosed on HackerOne
- Triaged in 13 hours
- Fixed in 2 days
- Paid in 24 hours
- Disclosed after 24 days
Heyy there, I have found a stored xss vulnerability in the following goals setting pages.
https://streamlabs.com/dashboard#/followergoal
https://streamlabs.com/dashboard#/bitgoal
https://streamlabs.com/dashboard#/subgoal
https://streamlabs.com/dashboard#/tiltifydonationgoal
https://streamlabs.com/dashboard#/streamlabs-charity-donation-goal
This vulnerability is actually a self stored xss but as the site allows us to invite other users to our account dashboard, so here the xss could be used to exploit other users also.
Steps to reproduce:
We need to two accounts, one will be the victim other will be the attacker. Login to the victim's account in for eg: chrome and login to attacker's account in firefox
From Victim's acc
- Goto https://streamlabs.com/dashboard#/settings/shared-access and click on
Create Invitationoption - From the menu choose Administrator as the role and click on the Create button
- An invitation link will be generated copy it and open it in the browser where you are log in the attacker's acc.
From the Attacker's acc 4. The page will ask you to confirm the invitation, accept it 5. Then goto https://streamlabs.com/dashboard#/settings/shared-access 6. Under My Access, click on the hyperlink username. Clicking on the hyperlink should lead you to this page https://streamlabs.com/dashboard/act-as/{userId} 7. Now you have access to the victim's dashboard,then visit this page, https://streamlabs.com/dashboard#/followergoal 8. Under Manage Goal , in the Title field . Enter the xss payload "><img src=x onerror=alert()> 9. Save it and reload the page you should get the xss popup
Now access the same page from vitim's account, https://streamlabs.com/dashboard#/followergoal You should see a popup there too
Instead of just popping a simple alert box we can do more things as I mentioned in report #1048655, like Deleting User's site completely. Suppose the victim removes the attacker acc after some time but the attacker has added this payload (taken from that mentioned report)
<script>eval(atob("dmFyIHhodHRwPW5ldyBYTUxIdHRwUmVxdWVzdDt4aHR0cC5vbnJlYWR5c3RhdGVjaGFuZ2U9ZnVuY3Rpb24oKXs0PT10aGlzLnJlYWR5U3RhdGUmJihkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiZGVtbyIpLmlubmVySFRNTD1hbGVydCh0aGlzLnJlc3BvbnNlVGV4dCkpfSx4aHR0cC5vcGVuKCJERUxFVEUiLCJodHRwczovL3N0cmVhbWxhYnMuY29tL2FwaS92Ni9zaXRlL2V2ZXJ5dGhpbmciKSx4aHR0cC53aXRoQ3JlZGVudGlhbHM9ITAseGh0dHAuc2V0UmVxdWVzdEhlYWRlcigiQ29udGVudC1UeXBlIiwiYXBwbGljYXRpb24vanNvbjsiKSx4aHR0cC5zZW5kKCk7"))</script>As soon as the victim visits the set goal page settings this payload will execute and will delete the victim's site completely.
Video POC:
Impact
As I have already mentioned the impact in the above that how an attacker can make requests to endpoints like deleting site with the help of some js code and this actions will be performed when the victim visit's the page where we have inputted our payload.
Thankyou Regards Sudhanshu
Context
Streamlabs exposes a dashboard at https://streamlabs.com/dashboard with a set of goal configuration pages. The report covers five of them:
https://streamlabs.com/dashboard#/followergoal
https://streamlabs.com/dashboard#/bitgoal
https://streamlabs.com/dashboard#/subgoal
https://streamlabs.com/dashboard#/tiltifydonationgoal
https://streamlabs.com/dashboard#/streamlabs-charity-donation-goal
Each page lets the account owner configure a goal, including a Title field under Manage Goal. The dashboard also has a shared access feature at https://streamlabs.com/dashboard#/settings/shared-access, which lets an account owner invite other users into their dashboard with a role such as Administrator. That sharing feature is what turns a self-XSS into something that reaches other people.
Setup
Two accounts are needed: one victim and one attacker. The researcher logged into the victim account in Chrome and the attacker account in Firefox, so both sessions stay live side by side. The attacker account must be able to accept an invitation created by the victim, and the victim must grant the Administrator role.
Finding it
The researcher describes the bug as a self stored XSS on its own: the payload is stored in the goal Title and rendered back on the same account's page. What makes it interesting is the shared access feature. Because the site allows inviting other users to your account dashboard, a payload planted by one user executes in the context of the other users who later load the same page. The report states this explicitly: the XSS could be used to exploit other users also.
Exploitation
Step 1: create an invitation as the victim
From the victim's account, go to https://streamlabs.com/dashboard#/settings/shared-access and click Create Invitation.
Step 2: choose the Administrator role
From the menu choose Administrator as the role and click the Create button.
Step 3: hand the invitation link to the attacker
An invitation link is generated. Copy it and open it in the browser where the attacker account is logged in.
Step 4: accept the invitation
The page asks the attacker to confirm the invitation. Accept it.
Step 5: open the shared access page as the attacker
Go to https://streamlabs.com/dashboard#/settings/shared-access.
Step 6: act as the victim
Under My Access, click the hyperlink username. Clicking it leads to https://streamlabs.com/dashboard/act-as/{userId}, where {userId} is the victim's identifier. The attacker now has access to the victim's dashboard.
Step 7: open the goal page
Visit https://streamlabs.com/dashboard#/followergoal.
Step 8: plant the payload in the Title field
Under Manage Goal, in the Title field, enter:
"><img src=x onerror=alert()>
The payload breaks out of the surrounding markup and the img element with a broken src fires onerror, which calls alert().
Step 9: save and reload
Save the title and reload the page. The popup appears.
Step 10: confirm it fires for the victim
Access the same page from the victim's account, https://streamlabs.com/dashboard#/followergoal. The popup appears there too, which is the stored XSS reaching a second user.
Beyond an alert
The researcher notes that the popup is only a demonstration. Referring to report #1048655, the same injection point can be used for more damaging actions, such as deleting the user's site completely. The payload given for that, taken from the referenced report, is:
<script>eval(atob("[redacted]"))</script>
The base64 blob decodes to JavaScript that builds an XMLHttpRequest, waits for readyState 4, and writes the response into an element with id demo. It then opens a DELETE request to https://streamlabs.com/api/v6/site/everything, sets withCredentials to true so the victim's session cookies are sent, sets the Content-Type header to application/json;, and sends it. The researcher's point is that the payload persists: even if the victim later removes the attacker's account, the stored script remains in the goal title, and the next time the victim visits the goal settings page it executes and deletes the victim's site.
Video proof of concept
The report includes a video proof of concept.
Root cause
The goal Title value is stored and later rendered into the page without being encoded for the HTML context it lands in. The payload's leading "> shows the title is written into markup rather than as text. Because the value is persisted server-side and re-rendered on every load of the goal page, the script runs for any user who views that page, including users brought in through shared access. The report does not describe the server-side or client-side code, so the exact escaping that is missing is not stated; likely the title is interpolated into a template or built into DOM markup without context-aware encoding.
Impact
The report rates this as low severity (CVSS 3.4). The direct effect is script execution in the dashboard of a user who loads the affected goal page. In the demonstrated scenario the attacker first needs the victim to invite them with the Administrator role and to accept the invitation, after which the attacker can act as the victim and plant the payload. Once stored, the payload runs in the victim's session, and the researcher shows that it can issue authenticated requests such as the DELETE to the site endpoint, which would delete the victim's site. The persistence matters: removing the attacker's access does not remove the payload, so the victim triggers it again on their next visit to the goal settings page. The report lists all five goal pages as affected.
Fix
The report does not describe a fix or a change made by the vendor. The appropriate fix is to encode the goal title for the context in which it is rendered, so that characters such as ", < and > are escaped and the value is treated as text rather than markup, and to apply the same treatment consistently across all five goal pages.
Variants to test
- Test the other goal pages listed in the report (
bitgoal,subgoal,tiltifydonationgoal,streamlabs-charity-donation-goal) with the same title payload. A positive result is the popup appearing on save and reload, and again from a second account viewing the same page. - Try payloads that do not rely on breaking out of an attribute, in case the title is rendered in a different context on some pages, for example a plain
<script>or an event handler on an element that is already present. A positive result is execution without the">prefix. - Test other user-supplied fields on the goal pages (for example any description or label fields) with the same payload. A positive result is the value being stored and executed on reload.
- Test the shared access flow with a lower role than Administrator to see whether a non-administrator can still reach a page that renders the stored title. A positive result is execution for a role that should not be able to edit goals.
- After planting a payload, remove the attacker's access and reload the goal page as the victim. A positive result is the payload still executing, which confirms persistence survives revocation.
What happened, in plain words
Streamlabs is a service that streamers use to manage their live streams: alerts, donation goals, and so on. It has a web dashboard at https://streamlabs.com/dashboard where the account owner configures things. One of those things is a goal, a target such as a number of followers or a donation amount, and each goal has a Title that the owner types in.
The researcher found that the text typed into that Title is saved by Streamlabs and later shown back on the page without being made safe. If the Title contains HTML, the language web pages are written in, the browser treats that HTML as part of the page instead of as plain text. That means someone can put a small piece of code in the Title, and the browser will run it every time the page is opened. This kind of bug is called stored cross-site scripting, or stored XSS: "stored" because the bad input is saved on the server, and "scripting" because the browser ends up executing code the site did not intend.
On its own that would only affect the person who typed the code, which is not very interesting. What makes it serious here is a second feature: shared access. Streamlabs lets an account owner invite other people into their dashboard, with a role such as Administrator. So one person can plant the code, and another person who later opens the same goal page runs it. The report calls this out directly: the XSS could be used to exploit other users also.
The report covers five goal pages:
https://streamlabs.com/dashboard#/followergoal
https://streamlabs.com/dashboard#/bitgoal
https://streamlabs.com/dashboard#/subgoal
https://streamlabs.com/dashboard#/tiltifydonationgoal
https://streamlabs.com/dashboard#/streamlabs-charity-donation-goal
Each of these pages lets the owner configure a goal, including a Title field under Manage Goal. The shared access feature lives at https://streamlabs.com/dashboard#/settings/shared-access, and it is the piece that turns a bug that only hurts yourself into one that reaches other people.
Setting up the test
To show the bug you need two accounts: one playing the victim (the person whose dashboard gets attacked) and one playing the attacker. The researcher logged into the victim account in Chrome and the attacker account in Firefox. Using two different browsers is a simple trick: each browser keeps its own separate login, so both accounts stay signed in at the same time and you can switch between them without logging out.
The attacker account has to be able to accept an invitation created by the victim, and the victim has to grant the Administrator role, because that role is what gives the attacker enough access to reach the goal settings.
Finding the bug
The researcher describes the bug as a self stored XSS on its own: the payload, the piece of code you inject, is stored in the goal Title and rendered back on the same account's page. What makes it interesting is the shared access feature. Because the site allows inviting other users to your account dashboard, a payload planted by one user executes in the context of the other users who later load the same page. In plain terms: the code runs as if it were the victim's own browser doing it, with the victim's permissions.
Walking through the attack
Step 1: create an invitation as the victim
From the victim's account, go to https://streamlabs.com/dashboard#/settings/shared-access and click Create Invitation. This is the normal, intended feature: the owner of an account is allowed to bring other people in. The researcher uses it as the delivery route for the attack.
Step 2: choose the Administrator role
From the menu choose Administrator as the role and click the Create button. The role decides how much the invited person can do. The researcher chose Administrator.
Step 3: hand the invitation link to the attacker
An invitation link is generated. Copy it and open it in the browser where the attacker account is logged in. An invitation link is like a personalised key: whoever opens it while signed in can join the account it belongs to.
Step 4: accept the invitation
The page asks the attacker to confirm the invitation. Accept it. From this point the attacker's account is linked to the victim's dashboard.
Step 5: open the shared access page as the attacker
Go to https://streamlabs.com/dashboard#/settings/shared-access. This page lists the accounts the attacker now has access to.
Step 6: act as the victim
Under My Access, click the hyperlink username. Clicking it leads to https://streamlabs.com/dashboard/act-as/{userId}, where {userId} is the victim's identifier. The attacker now has access to the victim's dashboard. The act-as part of the address is the feature that lets one account operate inside another account's dashboard.
Step 7: open the goal page
Visit https://streamlabs.com/dashboard#/followergoal. This is the page where the goal Title is edited, and therefore the page where the unsafe text will be saved.
Step 8: plant the payload in the Title field
Under Manage Goal, in the Title field, enter:
"><img src=x onerror=alert()>
Line by line, in plain words:
">closes the HTML attribute the title is being written into. The quote ends the surrounding markup early, so everything after it is treated as new HTML rather than as part of the title.<img src=x onerror=alert()>inserts an image element.src=xpoints at an image that does not exist, so the browser fails to load it.onerror=alert()is an event handler: a piece of code the browser runs when something happens. Here it runs when the image fails to load, and it callsalert(), which shows a popup box. The popup is just proof that code ran; it is the simplest visible sign of success.
Step 9: save and reload
Save the title and reload the page. The popup appears. Reloading matters because it proves the value was stored on the server and is rendered again on a fresh page load, not just echoed back once.
Step 10: confirm it fires for the victim
Access the same page from the victim's account, https://streamlabs.com/dashboard#/followergoal. The popup appears there too, which is the stored XSS reaching a second user. This is the key moment: the code the attacker typed is now running in the victim's browser.
Beyond an alert
The researcher notes that the popup is only a demonstration. Referring to report #1048655, the same injection point can be used for more damaging actions, such as deleting the user's site completely. The payload given for that, taken from the referenced report, is:
<script>eval(atob("[redacted]"))</script>
What each part does:
<script>and</script>mark the start and end of a block of JavaScript, the programming language browsers run.atob(...)takes a long string of letters and numbers, called base64, and turns it back into readable text. Base64 is a way of writing data using only safe characters, a bit like spelling a word out letter by letter so nothing gets mangled on the way. The long blob is JavaScript that has been encoded this way.eval(...)takes that decoded text and runs it as code. So the whole line means: decode this hidden script and execute it.
The decoded script does the following:
var xhttp=new XMLHttpRequest;creates anXMLHttpRequest, a browser object used to send requests to a server from inside a page. Think of it as the page making a phone call to the site's API, the set of addresses the site exposes for programs to talk to.xhttp.onreadystatechange=function(){4==this.readyState&&(document.getElementById("demo").innerHTML=alert(this.responseText))}sets up a function that runs when the request's state changes.readyState4 means the request has finished. When it finishes, the code looks for an element with iddemoand puts the server's reply into it, wrapped in analert()so the reply is visible.xhttp.open("DELETE","https://streamlabs.com/api/v6/site/everything")prepares aDELETErequest to that address.DELETEis one of the standard request methods, and it means exactly what it sounds like: remove this thing. The address is an API endpoint that the payload uses in an attempt to delete the user's site.xhttp.withCredentials=!0setswithCredentialsto true. This tells the browser to attach the user's cookies to the request. Cookies are small pieces of data the browser stores for a site, and here they are what proves who is logged in. Sending them means the request is made as the victim.xhttp.setRequestHeader("Content-Type","application/json;")tells the server the body of the request is in JSON, a common text format for structured data.xhttp.send()actually sends the request.
The researcher's point is that the payload persists: even if the victim later removes the attacker's account, the stored script remains in the goal title, and the next time the victim visits the goal settings page it executes and deletes the victim's site. Removing the attacker's access does not clean the Title field, so the trap stays armed.
Video proof of concept
The report includes a video proof of concept.
Why it works
The goal Title value is stored and later rendered into the page without being encoded for the HTML context it lands in. Encoding means converting characters that have special meaning in HTML, such as <, > and ", into harmless equivalents so the browser shows them as text instead of treating them as markup. The payload's leading "> shows the title is written into markup rather than as text. Because the value is persisted server-side and re-rendered on every load of the goal page, the script runs for any user who views that page, including users brought in through shared access. The report does not describe the server-side or client-side code, so the exact escaping that is missing is not stated; likely the title is interpolated into a template or built into DOM markup without context-aware encoding.
What it means in practice
The report rates this as low severity (CVSS 3.4). CVSS is a scoring system that tries to put a number on how bad a vulnerability is, and 3.4 is on the low end. The direct effect is script execution in the dashboard of a user who loads the affected goal page. In the demonstrated scenario the attacker first needs the victim to invite them with the Administrator role and to accept the invitation, after which the attacker can act as the victim and plant the payload. Once stored, the payload runs in the victim's session, and the researcher shows that it can issue authenticated requests such as the DELETE to the site endpoint, which would delete the victim's site. The persistence matters: removing the attacker's access does not remove the payload, so the victim triggers it again on their next visit to the goal settings page. The report lists all five goal pages as affected.
How it should be fixed
The report does not describe a fix or a change made by the vendor. The appropriate fix is to encode the goal title for the context in which it is rendered, so that characters such as ", < and > are escaped and the value is treated as text rather than markup, and to apply the same treatment consistently across all five goal pages.
Other things worth testing
- Test the other goal pages listed in the report (
bitgoal,subgoal,tiltifydonationgoal,streamlabs-charity-donation-goal) with the same title payload. A positive result is the popup appearing on save and reload, and again from a second account viewing the same page. - Try payloads that do not rely on breaking out of an attribute, in case the title is rendered in a different context on some pages, for example a plain
<script>or an event handler on an element that is already present. A positive result is execution without the">prefix. - Test other user-supplied fields on the goal pages (for example any description or label fields) with the same payload. A positive result is the value being stored and executed on reload.
- Test the shared access flow with a lower role than Administrator to see whether a non-administrator can still reach a page that renders the stored title. A positive result is execution for a role that should not be able to edit goals.
- After planting a payload, remove the attacker's access and reload the goal page as the victim. A positive result is the payload still executing, which confirms persistence survives revocation.
Glossary
- XSS (cross-site scripting): a bug where a site lets someone else's code run in another user's browser, as if the site itself had written it.
- Stored XSS: XSS where the malicious input is saved on the server and shown to whoever opens the affected page later.
- Self XSS: XSS that only affects the person who typed the payload, because nobody else sees that input.
- Payload: the piece of text or code an attacker injects to trigger the bug.
- HTML: the language web pages are written in, made of tags such as
<img>and<script>. - Attribute: a setting written inside an HTML tag, such as
value="..."orsrc="...". - Encoding / escaping: converting special characters into harmless equivalents so the browser shows them as text instead of running them as markup.
- Event handler: code attached to an element that runs when something happens, such as an image failing to load (
onerror). alert(): a browser function that shows a popup box, often used as simple proof that code ran.- JavaScript: the programming language browsers execute to make pages interactive.
<script>: the HTML tag that marks a block of JavaScript to run.- Base64: a way of writing data using only safe characters, used here to hide a script inside a string.
atob(): a browser function that decodes a base64 string back into text.eval(): a JavaScript function that runs a string as code.- API: a set of addresses a site exposes so programs can talk to it, for example to read or delete data.
- Endpoint: one specific address in an API, such as
https://streamlabs.com/api/v6/site/everything. XMLHttpRequest: a browser object used to send requests to a server from inside a page.readyState: a number describing how far anXMLHttpRequesthas got; 4 means it has finished.DELETE: a request method meaning "remove this thing".- Cookie: a small piece of data the browser stores for a site, often used to prove who is logged in.
withCredentials: a setting that tells the browser to attach the user's cookies to a request.- JSON: a common text format for structured data.
Content-Typeheader: a label on a request saying what format the data is in.- Session: the state of being logged in, kept alive by cookies.
- Shared access: a Streamlabs feature that lets an account owner invite other users into their dashboard with a role.
- Role: the level of permission an invited user gets, such as Administrator.
act-as: the Streamlabs feature that lets one account operate inside another account's dashboard.{userId}: a placeholder for a user's identifier in a URL.- CVSS: a scoring system for rating the severity of a vulnerability; 3.4 is low.
- Persistence: the property of a stored payload staying in place, and still running, after the attacker's access is removed.
- Revocation: removing someone's access to an account.