Stored XSS in Public Profile Reviews
A stored cross-site scripting vulnerability was found in the public profile review feature, where a user can add product details with a description containing a data URI link. When a victim views the public profile and clicks the link, the embedded script executes in their browser.
- Triaged in 14 days
- Fixed in 22 days
- Paid in 14 days
- Disclosed after 15 months
Summary: Stored XSS found in public profile review in which we can add product details in shop addition options. In description of shop product we can add data URI XSS in HTML format which is led to XSS once user click on HTML. In data URI XSS payload is encrypted in base64
Steps To Reproduce:
- Login with registered username and go to profile.
- After that click on add recommendation and add product details and in it's description add below payload:
<a href="data:text/html;charset=utf-7;base64,PHNjcmlwdD5hbGVydCgiWFNTIik8L3NjcmlwdD4=">Click Here</a> { Data URI XSS: data:text/html;charset=utf-7;base64,PHNjcmlwdD5hbGVydCgiWFNTIik8L3NjcmlwdD4= (PHNjcmlwdD5hbGVydCgiWFNTIik8L3NjcmlwdD4=) : <script>alert('XSS')</script> } 3. Now save the form by filling rest columns. 4. If any one views public profile and click on HTML tag, it will trigger XSS.
Proof Of Concept: Video POC attached
Impact
Attacker can execute XSS in the victim user using judge platform
Context
Judge.me is a reviews platform, and the asset in scope here is judge.me. The feature involved is the public profile: a registered user can add a recommendation to their profile, and that recommendation carries product details, including a description field. The description is shown on the public profile page, which other users can view. The report describes a stored cross-site scripting (XSS) issue in that description field, reached through a data: URI placed inside an HTML anchor.
Setup
The only precondition stated is a registered account. The researcher logs in with a registered username and works from the profile page. No specific browser, tool or version is named in the report.
Finding it
The researcher found that the product description inside the shop addition options of a public profile review accepts an anchor with a data URI. The description is stored and later shown to anyone viewing the public profile. The researcher used this to embed an anchor whose href is a data:text/html URI containing a base64-encoded script. The payload is only executed when a viewer clicks the link, so the trigger is user interaction rather than automatic execution on page load.
Exploitation
Step 1: Log in and open the profile
Log in with a registered username and go to the profile page. This is the page where recommendations are managed and displayed.
Step 2: Add a recommendation with the payload in the description
Click on add recommendation, fill in the product details, and put the following payload into the description:
<a href="data:text/html;charset=utf-7;base64,[redacted]=">Click Here</a>
The anchor text is Click Here. The href is a data: URI with MIME type text/html, the charset=utf-7 parameter and base64-encoded content. The report gives the decoding explicitly:
data:text/html;charset=utf-7;base64,[redacted]=
([redacted]=) : <script>alert('XSS')</script>
So the base64 blob decodes to a script element that calls alert('XSS'). The charset=utf-7 parameter is part of the URI as written; the report does not explain its role further.
Step 3: Save the form
Save the form after filling in the remaining columns.
Step 4: Trigger the payload from the public profile
When anyone views the public profile and clicks the HTML link, the XSS triggers. The report states that a video proof of concept was attached, but no media is included here.
Root cause
The description field of a product inside a public profile recommendation accepts an anchor whose href is a data:text/html URI, and clicking it on the public profile triggers the script. Because the anchor's href is a data:text/html URI, clicking it navigates to a document that the browser renders as HTML and whose script executes. The report does not describe the server-side or client-side sanitisation that was present, so the exact reason the anchor and the data: scheme survived is not stated;
Impact
The report's impact statement is that an attacker can execute XSS in the victim user using the Judge platform. The execution requires the victim to view the public profile and click the link, so it is a stored, interaction-dependent XSS.
Fix
Variants to test
- Try other URL schemes in an anchor
hrefin the same description field, such asjavascript:. A positive result is the script running when the link is clicked. - Try the same
data:text/htmlanchor in other free-text fields that are rendered on public pages, such as review bodies or shop details. A positive result is the stored markup being rendered to another user. - Try whether the payload executes without a click, for example by placing markup that runs on render rather than on navigation. A positive result is execution on page load.
Hunting notes
This kind of bug tends to hide in user-controlled profile and review content that is rendered to other users, especially fields that accept rich text or HTML. During recon, look for public profile pages and review pages that display user-supplied descriptions, and check whether HTML in those fields is stored and rendered. The report showed impact by storing the payload in a public profile and demonstrating that a viewer who clicks the link triggers script execution.
What happened, in plain words
Judge.me is the platform involved here. The part of the site involved here is the public profile: a page that a registered user can set up, and that anyone can look at. On that profile you can add a recommendation, which is a small entry describing a product. That entry has a description field, and the description is shown on the public profile.
The researcher found that this description field accepts an anchor with a data URI. HTML is the language web pages are written in; a browser reads it and turns it into headings, links, images and so on. That class of bug is called stored cross-site scripting, or stored XSS. "Stored" because the malicious content is saved on the server and served later; "cross-site" because the script runs in someone else's session on the site, not the attacker's.
The researcher put a link into the description. The link's destination was not an ordinary web address but a data: URI, which is a way of putting a whole small document directly inside a link instead of pointing to a file on a server. That embedded document was HTML containing a script, encoded in base64 (a way of writing any data using only letters, digits and a few symbols, so it can travel safely inside text). When another user opened the public profile and clicked the link, the browser rendered the embedded document and ran the script.
So the bug needs two things: the description field accepting raw HTML, and a victim clicking the link. The report's impact statement is that an attacker can execute XSS in the victim user using the Judge platform.
Setup
The only precondition the report states is a registered account. The researcher logs in with a registered username and works from the profile page. No specific browser, tool or version is named.
Finding it
The researcher found that the product description inside the shop addition options of a public profile review accepts an anchor with a data URI. The description is stored and later shown to anyone viewing the public profile. The researcher used this to embed an anchor (an HTML link element) whose href (the destination attribute) is a data:text/html URI containing a base64-encoded script. The payload only executes when a viewer clicks the link, so the trigger is user interaction rather than automatic execution on page load.
Exploitation
Step 1: Log in and open the profile
Log in with a registered username and go to the profile page. This is the page where recommendations are managed and displayed.
Step 2: Add a recommendation with the payload in the description
Click on add recommendation, fill in the product details, and put the following payload into the description:
<a href="data:text/html;charset=utf-7;base64,[redacted]=">Click Here</a>
Line by line:
<a ...>Click Here</a>is an HTML link. The text between the tags,Click Here, is what the visitor sees and clicks.href="..."is the attribute that says where the link goes. Normally it would be something likehttps://example.com.data:text/html;charset=utf-7;base64,...is adata:URI. Instead of pointing to a page on a server, it carries the page's content inside the link itself.text/htmlsays the content is an HTML document, so the browser will render it as a page.charset=utf-7is a character-set parameter included in the URI as written; the report does not explain its role further.base64,says the rest is base64-encoded.[redacted]=is the base64 blob. The report gives the decoding explicitly:
data:text/html;charset=utf-7;base64,[redacted]=
([redacted]=) : <script>alert('XSS')</script>
So the base64 blob decodes to a script element that calls alert('XSS'). alert is a browser function that pops up a message box; it is the standard harmless way to prove that a script ran. The report does not explain the charset=utf-7 parameter further.
Step 3: Save the form
Save the form after filling in the remaining columns.
Step 4: Trigger the payload from the public profile
When anyone views the public profile and clicks the HTML link, the XSS triggers. The report states that a video proof of concept was attached, but no media is included here.
Root cause
The description field of a product inside a public profile recommendation accepts an anchor whose href is a data:text/html URI, and clicking it on the public profile triggers the script. Because the anchor's href is a data:text/html URI, clicking it navigates to a document that the browser renders as HTML and whose script executes.
Impact
The execution requires the victim to view the public profile and click the link, so it is a stored, interaction-dependent XSS.
Fix
Variants to test
- Try other URL schemes in an anchor
hrefin the same description field, such asjavascript:. A positive result is the script running when the link is clicked. - Try the same
data:text/htmlanchor in other free-text fields that are rendered on public pages, such as review bodies or shop details. A positive result is the stored markup being rendered to another user. - Try whether the payload executes without a click, for example by placing markup that runs on render rather than on navigation. A positive result is execution on page load.
Hunting notes
This kind of bug tends to hide in user-controlled profile and review content that is rendered to other users, especially fields that accept rich text or HTML. During recon, look for public profile pages and review pages that display user-supplied descriptions, and check whether HTML in those fields is stored and rendered. The report showed impact by storing the payload in a public profile and demonstrating that a viewer who clicks the link triggers script execution.
Glossary
- XSS (cross-site scripting): a bug where a site lets an attacker's code run inside another user's browser on that site.
- Stored XSS: XSS where the malicious content is saved on the server and served to later visitors, rather than being reflected back immediately.
- HTML: the language web pages are written in; browsers read it to build the page.
- Script: a small program that runs in the browser, usually written in JavaScript.
- Anchor: an HTML link element, written
<a href="...">text</a>. - href: the attribute of an anchor that holds the destination address.
- data: URI: a way of embedding a whole document inside a link or attribute instead of pointing to a server file.
- MIME type: a label such as
text/htmlthat tells the browser what kind of content it is receiving. - charset: the character encoding used to interpret text;
utf-7is one such encoding. - base64: an encoding that turns any data into letters, digits and a few symbols so it can travel safely inside text.
- alert: a browser function that shows a pop-up message; commonly used to prove a script ran.
- Sanitisation: cleaning user-supplied content so that only safe markup and safe URL schemes remain.
- Allowlist: a list of things that are permitted; anything not on the list is rejected.
- Public profile: a page on Judge.me that a registered user can set up and that anyone can view.
- Recommendation: an entry a user adds to their profile describing a product.
- Recon: the research phase where you look around a target to find features worth testing.