Skip to content
XSS Write-up Beginner

Practical and Easy Steps to Find XSS with a REAL CASE Study

A reflected XSS vulnerability was found in a parameter after a single quote caused an error, and an SVG payload with an onload handler bypassed the WAF to trigger a popup. An attacker could execute arbitrary JavaScript in a victim's browser.

BugRey Follow

Published on medium.com

In this tutorial, I will provide step-by-step instructions on how to find an Cross Site Scripting(XSS) Vulnerability (Reflected XSS).

./Rey~, 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 parameter value was reflected into the HTML without proper output encoding, and the WAF's filter was bypassed by the specific payload encoding.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing cookies or performing actions on behalf of the user.

What the attacker needed

Victim clicks a crafted link; parameter reflects input

How it was found

  1. Find parameters on the target website using tools or Google dorking.
  2. Insert a single quote at the end of a parameter value and check for an error.
  3. Try SQL injection payloads, which were blocked by the WAF.
  4. Inject an XSS payload using an SVG with an onload handler, which bypassed the WAF and triggered a popup.

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 when a website puts user input into a page without cleaning it, so an attacker can make the site run their JavaScript. Here, a parameter reflected a crafted value that included an SVG image with an onload event, which ran a confirm popup. The site's web application firewall (WAF) was bypassed by the specific encoding.

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 BugRey

View all

1 more disclosed report, 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.