Skip to content
XSS Write-up Intermediate

Reflected XSS using Bookmark

A chatbot on a Samsung subdomain reflected user input into the page and console without sanitisation, allowing script execution. The author chained this with a malicious bookmark to turn a self-XSS into a reflected XSS that could steal cookies, though user interaction was required and the report was marked out of scope.

medium.com

Published on medium.com

Hello Hackers! In this write-up, I am going to share an amazing reflected XSS (RXSS) bug which I chained using the bookmark functionality.

cryptoshant🇮🇳, on medium.com

The full write-up lives on its author's site

It belongs to its author, 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 chatbot's display function inserted user input into the page and console without sanitising or encoding it.

Impact

An attacker could steal a victim's cookies if the victim clicked a malicious bookmark while on the site, but user interaction was required and the report was marked out of scope with very low impact.

What the attacker needed

Victim clicks a malicious bookmark; victim visits the Samsung site; attacker-controlled server

The fix

The bug was fixed according to the author, though the exact fix is not described.

How it was found

  1. Find the Nanona chatbot on the Samsung subdomain.
  2. Type a script payload into the chatbot and observe it execute.
  3. Notice that the same input is printed to the browser console.
  4. Inspect the JavaScript to find the displayUserInput function.
  5. Create a bookmark containing a javascript: payload that calls displayUserInput with an image onerror handler.
  6. Visit the site and click the bookmark to execute the payload and exfiltrate cookies.

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.

A chatbot on a website took whatever you typed and put it directly into the page and the browser's developer console without cleaning it first. That means if you typed code instead of a normal message, the browser would run it. The author then used a bookmark containing such code to make the attack work on someone else, but the victim had to click the bookmark themselves.

What is XSS?

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

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.