Skip to content
XSS Write-up Intermediate

How I Found a Critical XSS On a Public Bug Bounty Program

An unauthenticated endpoint allowed editing of page content, and a field was rendered without sanitisation, enabling stored XSS. The author chained this with a cloned login page to potentially capture admin credentials.

medium.com

Published on medium.com

The only reconnaissance I did to find this domain was just a simple google dork.

1day, 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 application accepted unauthenticated edits and inserted the edited content into the page without proper output encoding or sanitisation.

Impact

An attacker could store script that runs for visitors, and by redirecting them to a cloned login page could potentially capture admin credentials, leading to account takeover and router compromise; however, direct cookie theft was blocked by HttpOnly and a specific Path.

What the attacker needed

No authentication needed; victim visits the infected page; attacker controls a server

How it was found

  1. Find a subdomain via a Google dork and visit the router login portal.
  2. Run a JavaScript bookmarklet to list endpoints and find /guest/preview.cgi, which exposes an admin page.
  3. Toggle Edit mode and modify a page element, then save; the change persists.
  4. Capture the save request to /guest/portal_admin_upload.cgi and note the edit_page JSON field.
  5. Replace the agree_button value with a script payload and send the request; the response says save success.
  6. Refresh the page and observe the script executing.

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 stored cross-site scripting (XSS) flaw lets an attacker save malicious code on a website, which then runs in the browsers of people who view that page. Here, anyone could change page text without logging in, and the changed text was not cleaned, so script code could be saved and executed.

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.