Skip to content
XSS Write-up Intermediate

How I Was Able to Take Over All Organizations on the Platform via Stored XSS chained with BAC and…

A broken access control flaw allowed adding any user ID to a page group, and a stored XSS in a widget parameter enabled stealing the CSRF token. Chaining these, an attacker could invite themselves as admin to any organisation whose user visited the malicious page.

0xs3fo Follow

Published on medium.com

بِسْ� ِ اللَّـهِ الرَّحْ� َـٰنِ الرَّحِي� ِ اللَّهُ� َّ صَلِّ وَسَلِّ� ْ وَبَارِكْ عَلَى سَيِّدِنَا � ُحَ� َّدٍ

Saif Eldin, 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 page group user addition lacked validation that the added user belonged to the same organisation, and the placeholderText parameter was not sanitised before being rendered.

Impact

An attacker could take over any organisation on the platform by adding users to a page group and exploiting stored XSS to send admin invites, potentially affecting all organisations.

What the attacker needed

Attacker has an account; victim views the malicious page; victim is a member of the page group

The fix

The platform should validate that added users belong to the same organisation and sanitise the placeholderText parameter to prevent XSS; the report states the issue was resolved.

How it was found

  1. Create a Page Group in my own organization.
  2. Edit a page and inject the payload into the placeholderText parameter.
  3. Use the Broken Access Control flaw to add the victim's User ID to the Page Group as an Editor.
  4. Once the victim visits the page, the XSS payload steals the CSRF token, fetches the organisation ID, and sends an admin invite to the attacker's email.
  5. Accept the invite, log in, and delete the original owner to take control of the organisation.

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.

The platform let users add anyone to a page group by guessing their numeric ID, even if they belonged to another company. Separately, a text field on a page could run malicious JavaScript when viewed. By combining these, an attacker could make a victim's browser silently send an invite to the attacker, giving them admin access to the victim's company.

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 0xs3fo

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.