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.
1After finding the parameter values are reflected in the response You will find it here
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
- Identify parameters that are reflected in the response.
- Use distinct values for each parameter to see which one is reflected.
- Observe that the value is placed inside a JavaScript string in a script tag.
- Try a basic JavaScript payload and see it does not work.
- Add a closing script tag followed by a new script tag with an alert payload.
- 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.