Skip to content
XSS Write-up Beginner

How i got Cross-site Scripting (XSS)Reflected Using an unknown technique

A reflected cross-site scripting vulnerability existed in a web application because user input was placed inside a JavaScript string without proper escaping. An attacker could inject a script tag that breaks out of the string and executes arbitrary JavaScript in the victim's browser.

0xmekky Follow

Published on medium.com

1After finding the parameter values are reflected in the response You will find it here

SaY_Mekky, 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

Impact

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

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Identify parameters that are reflected in the response.
  2. Use distinct values for each parameter to see which one is reflected.
  3. Observe that the value is placed inside a JavaScript string in a script tag.
  4. Try a basic JavaScript payload and see it does not work.
  5. Add a closing script tag followed by a new script tag with an alert payload.
  6. The payload executes and an alert box appears.

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 own JavaScript. Here, the input was placed inside a script tag as a string, and the attacker closed the script tag and added a new one to run code. This could let an attacker steal cookies or do things as the victim.

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 0xmekky

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.