Skip to content
XSS Write-up Intermediate

Turning Self XSS to good XSS via access control

A staff user without write permission could access the project creation page directly and create a project containing a stored XSS payload. When the organisation owner viewed the project, the script executed in the owner's browser, allowing the staff to run JavaScript in the owner's context.

Yusuf Yazir Follow

Published on hacklad.github.io

I will be covering a story of a bug I found in a private program as a result of improper access control. Access control is how a web application grant access to content and functions to some users and not other(OWASP).

Yusuf Yazir (@Hacklad), on hacklad.github.io

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

What the attacker needed

A staff account with read-only permission; victim (owner) views the created project

The fix

The vulnerability was fixed according to the report.

How it was found

  1. Log in as the organisation owner and note the URL of the create project page.
  2. Log in as a staff user with read-only permission.
  3. Navigate directly to the create project URL.
  4. Create a project with a script payload in the project name field.
  5. Log back in as the owner and open the project to trigger the stored script.

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.

Access control is how a website decides who can do what. Here, a low-privilege staff member was supposed to only read data, but they could still reach the page for creating a project by typing its address directly. They put a script in the project name, and when the owner later opened that project, the script ran in the owner's browser, which is called stored cross-site scripting (XSS).

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.