Genius XSS !
A reflected XSS existed in a parameter that was partially URL-encoded by the server, leaving characters such as single quotes and parentheses unescaped. An attacker could inject a payload that decodes and evaluates JavaScript, allowing theft of cookies.
medium.com
Published on medium.com
Before I start if you want to pass the challenge I made from the case I met in real app, and which I am about to tell right now, please pass the Lab 2 of my advanced XSS labs 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 run arbitrary JavaScript in a victim's browser and steal their cookies, though the text only demonstrates an alert and does not show a real cookie theft.
What the attacker needed
Victim clicks a crafted link
How it was found
- Collect URLs and inject a marker string into parameters.
- Scan the responses and search the logs for the marker to find reflections.
- Visit the reflected URL with view-source to confirm the injection.
- Craft a payload that uses decodeURIComponent and eval to run JavaScript.
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.
The website took a value from the URL and put it into the page, but only encoded some special characters. Because a few dangerous characters were left alone, the author could sneak in JavaScript that the browser would run. That let them show an alert and could let them steal the visitor's cookies.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.