Stored XSS Bypass using unicode encoding in template builder via
A stored cross-site scripting vulnerability existed in the email template builder, where a button's link could be set to a JavaScript URI using HTML entity encoding to bypass filtering. An attacker with template editing rights could execute script in the context of other users who viewed and clicked the button, including admins and users from other accounts.
The original lives on medium.com
We do not hold its text, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application failed to properly sanitise or validate the URL scheme in button links, allowing a javascript: URI disguised with HTML entity encoding to be stored and executed.
Impact
An attacker with template editing rights could execute arbitrary JavaScript in the browsers of other users, including admins and users from other accounts, potentially leading to account compromise or data theft.
What the attacker needed
Access to template builder; victim clicks the malicious button
How it was found
- Go to the templates page and create a new template.
- Add a button and set its link to a JavaScript URI payload, then save.
- Navigate to the stored template URL and click the button to trigger the XSS.
- Other users who view the template and click the button are exploited.
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 write-up has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) is when an attacker sneaks JavaScript code into a website so it runs in other people's browsers. Here, the template builder let a user put a special link on a button that, when clicked, ran code. Because templates are shared, other users who clicked the button would run the attacker's code.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.