Skip to content
XSS Disclosed report Beginner

Stored XSS from Display Settings triggered on Save and viewing realtime search demo

An attribute name containing an image tag with an error handler was stored and later rendered without encoding in display settings and the realtime search demo, triggering script on those pages.

ctee Follow

Originally disclosed on HackerOne

  • Triaged in 15 hours
  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 34 days

Here are the steps to trigger the XSS:

  1. Create a JSON record that will contain the following attribute: {"<img src=1 onerror=alert(document.domain)>": "XSS attribute"}

  2. Go to Indices -> Display and select the attribute <img src=1 onerror=alert(document.domain)> under Attributes for Faceting and click save.

  3. Note that XSS is triggered multiple times on that page.

  4. XSS is now triggered on https://www.algolia.com/explorer#?index=index_name as it also shows the attribute.

  5. Create a public UI Demo and to the public url, xss is triggered. I've created a demo url: https://www.algolia.com/realtime-search-demo/xsstest

Attachments

facetattribute.png
facetattribute.png From the original on HackerOne
public_page_xss.png
public_page_xss.png

The original report as published on HackerOne, by ctee. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

What the attacker needed

Ability to create a JSON record with a custom attribute name; access to Indices -> Display settings; victim views the affected page or public demo

How it was found

  1. Create a JSON record with an attribute name containing an image tag with an error handler.
  2. Go to Indices -> Display and select that attribute under Attributes for Faceting, then save.
  3. Observe the script executing multiple times on that page.
  4. View the attribute in the Algolia explorer, where the script also runs.
  5. Create a public UI Demo and visit its public URL, where the script runs again.

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 stored cross-site scripting (XSS) flaw lets someone save a piece of text that includes a small script, and later that script runs in other people's browsers when they view the page. Here, an attribute name was saved with an image tag that runs code when the image fails to load, and the site displayed it without making it safe.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by ctee

View all

2 more disclosed reports, best first.

More from Algolia

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.