Skip to content
XSS Write-up Intermediate

How I Found Multiple XSS Vulnerabilities Using Unknown Techniques

The article describes several cross-site scripting vulnerabilities found in different bug bounty programs, including DOM-based, reflected, and stored XSS via an SVG file upload. An attacker could execute malicious scripts in a victim's browser to steal cookies or perform account takeover.

infosecwriteups.com

Published on infosecwriteups.com

Today I’m going to talk about Multiple XSS Attacks Using Different Techniques, which I discovered while working in various bug bounty programs.

Khaledyassen, on infosecwriteups.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 inserted user-controlled input into the page without proper sanitisation or output encoding, and in one case allowed an SVG file with a script to be uploaded and later executed.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing cookies and achieving full account takeover; the last XSS was not accepted because the subdomain was out of scope.

What the attacker needed

Victim clicks a crafted link; attacker can upload an SVG file; attacker has an account; victim views the uploaded file

The fix

The vulnerabilities should be fixed by validating and sanitising user input, using a Content Security Policy, encoding output, and implementing a Web Application Firewall.

How it was found

  1. Gather subdomains and endpoints for the target domain using tools like gau and katana.
  2. Filter endpoints for parameters that reflect input using gf and Gxss.
  3. Scan the filtered endpoints with an automated XSS scanner such as Dalfox.
  4. For the DOM XSS, visit the vulnerable URL with a script payload in the dir parameter and observe the popup.
  5. For the reflected XSS, fuzz for hidden parameters with Arjun, then inject a script payload into the auth_status parameter, using case variation to bypass a block.
  6. For the stored XSS, register an account, inject a payload into the organisation name field, and upload an SVG file containing a script, then navigate to the uploaded file.

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) is a flaw where a website lets an attacker slip their own JavaScript into a page that other people view. When a victim loads that page, the script runs in their browser and can read their cookies or act as them. The article shows several ways this happened, such as through URL parameters or an uploaded image file.

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.