Skip to content
XSS Write-up Intermediate

From Self-XSS to Account Takeover: How I Turned a Low-Severity Fi

A product description field allowed HTML injection that executed only in the admin panel when an owner edited the product. A lower-privileged manager could store a payload that ran in the owner's session, leading to account takeover.

Kanishkdadhich Follow

Published on medium.com

While testing an e-commerce platform that allows merchants to create stores and sell products online, I discovered a vulnerability that initially looked almost useless.

Kanishkdadhich, 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 missing output encoding of the product description when rendered in the admin panel, combined with insufficient privilege separation between managers and owners.

Impact

A lower-privileged manager could execute JavaScript in the store owner's session, leading to full account takeover including changing settings, phone numbers, emails, and deleting the store.

What the attacker needed

A store account; ability to add staff members; victim (owner) opens product edit page

How it was found

  1. Create a store account and explore product upload functionality.
  2. Test the product description field with a simple broken image payload and observe execution.
  3. Intercept the request and adjust the payload to bypass client-side sanitisation.
  4. Create a manager account with product management permissions.
  5. Using the manager account, create a product with the payload in the description and publish it.
  6. Log in as the owner and open the product editing page to trigger the payload.

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.

This is a stored cross-site scripting (XSS) bug: a user can save code in a product description, and that code runs later in someone else's browser. At first it seemed harmless because only the person who entered it saw it run, but a manager could make the store owner run it, giving the manager control of the owner's account.

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 Kanishkdadhich

View all

1 more disclosed report, best first.

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.