Skip to content
XSS Write-up Beginner

How I Found Dom Xss on School Website.

A parameter on a school website's subdomain was found to be vulnerable to DOM-based cross-site scripting. An attacker could craft a link that runs their own script in a victim's browser on that site.

debug0xa Follow

Published on medium.com

Good evening everyone, I’m debug a bug bounty Hacker, so I was bored and I wanted to do something fun, I decided to check a school in my country.

Debug 0xa, 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's client-side JavaScript wrote a URL parameter into the DOM without sanitising or encoding it.

What the attacker needed

A link the victim opens; target URL with an id parameter

How it was found

  1. Enumerate subdomains of the target domain
  2. Probe the subdomains to see which respond and what they run
  3. Crawl the live hosts to collect endpoints and parameters
  4. Pick the URL with an id parameter and test it for cross-site scripting
  5. Confirm the DOM-based cross-site scripting finding

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 DOM-based cross-site scripting bug means the page's own JavaScript takes something from the address bar, such as a parameter value, and puts it into the page without cleaning it. Because of that, a crafted link can make the site run code the attacker chose, inside the visitor's browser and under the site's name.

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.