How i got 3 XSS in one page
A login page contained hidden input fields whose values were reflected from query parameters without encoding. An attacker could craft a link that triggers reflected cross-site scripting in the victim's browser.
medium.com
Published 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
Root cause
Likely the hidden form fields echoed query-string values into the HTML without encoding or validation.
Impact
An attacker could run script in a victim's browser via a crafted link, though the report was closed as a duplicate.
What the attacker needed
Victim opens a crafted link; target reflects query params unencoded
The fix
The hidden fields should encode or validate query-parameter values before reflecting them into the page.
How it was found
- Open the login page and note the visible inputs.
- Try injecting the visible inputs; they do not reflect.
- Notice hidden input fields in the same form.
- Add the hidden field names as query parameters with a value and send the request.
- Observe the value reflected unencoded in the response.
- Inject all three hidden parameters and confirm the script executes.
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 web page sometimes takes a value from the address bar and puts it straight into the page. If that value is a small script, the browser runs it as if the site itself wrote it. That lets an attacker run code in a victim's session when the victim opens a crafted link.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.