Skip to content
XSS Write-up Intermediate

Stored XSS — Escalated from High to Critical

A stored cross-site scripting (XSS) flaw in a contact note feature allowed a low-privileged user to run JavaScript in an organisation admin's browser. The attacker could then steal the admin's CSRF token and use it to promote their own account to organisation admin, leading to full organisation takeover.

YourFinalSin Follow

Published on medium.com

Recently, I discovered a critical stored XSS vulnerability on a self-hosted HackerOne bug bounty program. This issue was severe enough to allow a low-privileged account to escalate privileges directly to Organization Admin, eventually leading to a complete organization takeover, because you had full control as admin…

3NVZ, 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

The note feature did not filter user input and had a weak Content Security Policy, allowing script injection.

Impact

A low-privileged user could escalate to organisation admin and take over the entire organisation, including downgrading or removing other admins.

What the attacker needed

A low-privileged account; victim (admin) opens the contact; attacker can create a note on a contact

How it was found

  1. Create a low-privileged account and find the note feature on a contact card.
  2. Inject a script payload into a contact note; it executes when any user opens that contact.
  3. As the attacker, set up a test organisation with two users to study the promotion feature.
  4. Observe that promotion uses a PUT request to an API endpoint with origin validation and a CSRF token.
  5. Craft an XSS payload that fetches the admin's page, extracts the CSRF token, and sends a PUT request to promote the attacker.
  6. Wait for the organisation admin to open the injected contact; the exploit runs and the attacker becomes admin.

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.

Stored XSS means a website saves harmful code (like a script) and later shows it to other users. Here, a low-level user could leave a note on a contact card, and when an admin opened that contact, the code ran in the admin's browser. Because the admin was logged in, the code could act as the admin and change the attacker's role to admin.

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 YourFinalSin

View all

3 more disclosed reports, 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.