Skip to content
XSS Write-up Beginner

How I Discovered 5 XSS Vulnerabilities and Built an Automated XSS

A parameter on a subdomain reflected user input without proper encoding, allowing an attacker to inject JavaScript that executed in a victim's browser. The author found five such cross-site scripting issues, one manually and four with an automated scanner.

Youssefhussein Follow

Published on medium.com

As a penetration tester, one of my primary focuses is identifying web application vulnerabilities, particularly Cross-Site Scripting (XSS). During a recent bug hunting session, I discovered five XSS vulnerabilities in a single subdomain.

Youssefhussein, 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 reflected the utm_source parameter into the HTML response without encoding or filtering, and the web application firewall did not block the script tag.

Impact

An attacker could run JavaScript in a victim's browser, which could lead to actions such as stealing session data or performing actions on the victim's behalf, though the text does not detail specific consequences.

What the attacker needed

Victim visits a crafted URL; target parameter reflects input

How it was found

  1. Collect endpoints from the subdomain using GAU and Katana.
  2. Remove duplicate URLs with URO.
  3. Identify parameters that reflect user input using Gxss.
  4. Manually test the utm_source parameter with a script payload and observe JavaScript execution.
  5. Run Dalfox on the list of reflecting parameters to find more XSS issues.

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.

Cross-site scripting (XSS) happens when a website takes text from a user and puts it into a page without making it safe, so a malicious script can run in another visitor's browser. Here, a URL parameter was echoed back into the page, and a crafted script tag ran when the page loaded. The author also used a scanner to find four more parameters with the same problem.

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 Youssefhussein

View all

3 more disclosed reports, 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.