My Latest Xss Finding Explained To Beginners Bug Bounty
A reflected cross-site scripting vulnerability existed in a parameter on an error page, where the value was reflected inside a script tag. An attacker could craft a link that, when visited, would execute arbitrary JavaScript in the victim's browser.
It’s been a while since i posted a writeup so i thought it would be wise to make one for beginners.
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 by tricking them into visiting a crafted link, potentially stealing data or performing actions on their behalf.
What the attacker needed
Victim clicks a crafted link
How it was found
- Find an error page on webarchive with a parameter called result in the URL.
- Notice the parameter value is reflected inside a script tag in the page source.
- Craft a payload that closes the script tag and adds an image tag with an onerror handler to execute 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.
Cross-site scripting (XSS) is when a website takes something a user typed or put in a link and shows it back on the page without cleaning it first. If that input contains code, the browser runs it as if the website itself had written it. Here, the input was placed inside a script tag, so the attacker had to close that tag first before adding their own code.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.