Skip to content
XSS Write-up Beginner

My first XSS: Reflected XSS in hidden parameter

A hidden URL parameter on a signup page reflected user input into the page source without proper sanitisation, allowing an attacker to inject a script. The author triggered a JavaScript popup, demonstrating reflected cross-site scripting.

anonysm Follow

Published on anonysm.medium.com

Hi, welcome back to another blog. In this blog, we're going to know how I found my first XSS in the Public Bugcrowd program.

Muthu D, on anonysm.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 a hidden parameter's value into the HTML without properly encoding single quotes, allowing script injection.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser via a crafted link, potentially leading to session theft or other client-side attacks.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. View the source code of the target signup page to find hidden parameters.
  2. Identify a hidden parameter with an empty value.
  3. Enter the parameter name in the URL and observe the value reflected in the source.
  4. Try special characters; single quotes are reflected while double quotes and angle brackets are filtered.
  5. Use a payload with single quotes to trigger an XSS 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.

A website took text from the web address and put it directly into the page without cleaning it. An attacker could craft a link that, when clicked, runs their own code in the victim's browser. This is called reflected cross-site scripting (XSS).

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 anonysm

View all

2 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.