Stored XSS at Module Name
A module name field accepted HTML markup and stored it without sanitisation, so the injected element was rendered when the module settings were viewed again. An attacker could run JavaScript in the browser of anyone who viewed that module name.
Originally disclosed on HackerOne
- Triaged in 16 hours
- Fixed in 16 days
- Disclosed after 28 days
Summary:
Hello, I found stored xss at module name with this payload "><div onmouseover="alert('XSS');">Hello :)
Steps To Reproduce:
- Add new container, it doesn't matter which is it
- Paste this payload in the module name
"><div onmouseover="alert('XSS');">Hello :) - Update it then check the module name again in setting
- Alert Popup
Stored XSS
Stored cross-site scripting (also known as second-order or persistent XSS) arises when an application receives data from an untrusted source and includes that data within its later HTTP responses in an unsafe way.
Impact
Execute Js in victims browser
Attachments
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
Likely the module name was written into the page without output encoding or HTML sanitisation, so markup typed into the field was treated as code.
Impact
JavaScript of the attacker's choosing could run in the browser of a victim who viewed the affected module name, though the report gives no detail on what could be done with it.
What the attacker needed
Ability to create or edit a module; victim views the module name
The fix
The module name should be encoded or sanitised so typed markup is shown as text.
How it was found
- Create a new container of any kind.
- Enter the crafted markup into the module name field.
- Save the change and reopen the module name in the settings.
- The script runs and an alert appears.
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 module name is just a label a user types in, and the site saved it and later showed it back as if it were part of the page's code. Because the label was not cleaned, a crafted label can carry a small piece of script that runs in the browser of whoever looks at it. That is called stored cross-site scripting: the harmful content is saved on the server and served to other people.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.