DOM XSS in Action: How I Found and Proved a Client-Side Vulnerabi
The report claims a DOM-based XSS vulnerability on a devtunnel-hosted login and search page, where a script in the URL fragment executed in the browser. An attacker could run arbitrary JavaScript in a victim's browser, potentially stealing cookies and storage data.
While exploring a devtunnel-based web application, I uncovered a subtle but dangerous vulnerability — DOM-based Cross-Site Scripting (XSS). Unlike traditional XSS, this one doesn’t rely on server responses.
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 read the URL fragment and wrote it into the page without sanitisation, allowing script execution.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser, potentially exfiltrating cookies, local storage and session storage, though the report only demonstrates an alert and a theoretical fetch payload.
What the attacker needed
Victim visits a crafted URL; target page uses unsafe DOM sink
The fix
The page should avoid unsafe sinks, sanitise dynamic input, and enforce a strong Content-Security-Policy; the text does not say whether it was fixed.
How it was found
- Run XSStrike against the target URL to find DOM sinks.
- Craft a script payload and URL-encode it.
- Append the encoded payload to the URL fragment.
- Load the URL in a headless browser with Selenium and capture a screenshot.
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.
DOM XSS is when a website's own JavaScript takes something from the URL, like the part after the # symbol, and puts it into the page without cleaning it first. That lets an attacker make the browser run their code as if it came from the site. Here, a script placed in the URL fragment caused an alert box to appear, which is the classic proof.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.